-1

I have app gradle like that

apply plugin: 'com.android.application'

android {

    compileSdkVersion 24
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.ahmed.bigovenrecipes"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {

        release {

            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {

        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
    compile 'com.squareup.picasso:picasso:2.3.3'
    testCompile 'junit:junit:4.12'
}

and I want to put Internet permission put I don't know in which part.

Komal12
  • 3,340
  • 4
  • 16
  • 25

2 Answers2

4

Just add the following code in your AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET" />
Willi Mentzel
  • 27,862
  • 20
  • 113
  • 121
tahsinRupam
  • 6,325
  • 1
  • 18
  • 34
  • @Willi Mentzel, thats my trademark ! ;) – tahsinRupam Jul 04 '17 at 07:59
  • 3
    There are rules on SO. Salutations should not be part of an answer. – Willi Mentzel Jul 04 '17 at 08:05
  • 1
    https://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts – Willi Mentzel Jul 04 '17 at 08:05
  • 1
    "Hope it helps" is your trademark? Like you don't even know if you answer is helpful or not? Pretty bad trademark, but like Willi said, that's not accepted anyway. – Tom Jul 04 '17 at 08:18
  • @Tom, lol. I would like to think that as a signature of modesty. If not acceptable then it's ok. I've been using it for last 7 months and this is the first time someone corrected me :p – tahsinRupam Jul 04 '17 at 08:54
  • @tahsinRupam No harm done! You would do a good service if you would remove this very salutation from all answers you gave! :D – Willi Mentzel Jul 04 '17 at 15:54
0

If you want to use internet permission, Open Androidmanifest.xml

put this <uses-permission android:name="android.permission.INTERNET" /> at the top inside of manifest file.

Just for your info, you don't need the permission to access internet. Because, all of your internet related tasks are handed over to other applications.

If your application needs network sockets, then your application needs internet permission to use them. Simple as that.

ZeroOne
  • 8,996
  • 4
  • 27
  • 45