Violation of the Permissions policy in google play - android

Our app was currently removed from google play for having the SMS permission. We already removed the permission and uploaded a new apk but the status of the project is still removed. Do we have to wait for them to review, it or is there any other necessary steps/action needed for the project to be back on Google Play?

Fillup google docs for permission.
Make sure your SMS permission is given in manifest and give the pop up in user level.
Contact google developers as soon as possible.
See this

May be any of the 3rd party library you are using in your project is already using those permissions. And when you build your project it merged all the AndroidManifest file in a single Merged Manifest file. This is the reason you are getting this warning because your final manifest has any of those permission(s).
Solution 1: After build your project,
Open your project's AndroidManifest file.
Open the Merged Manifest tab in the bottom.
Search for any of those permission. (example- READ_SMS)
If you get any, now it's time to remove them. Check the example
Example: If you see READ_SMS permission in Merged Manifest file, so now open your project's AndroidManifest file and add the line written below to remove that permission from your project-
<uses-permission android:name="android.permission.READ_SMS" tools:node="remove" />
Add the above permission line in your AndroidManifest file, and that's it. It will remove the Permission from the Merged Manifest file and your issue will be resolved.
AndroidManifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.myapp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_SMS" tools:node="remove" />
<application
android:name=".MyApp"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:allowBackup">
<activity
android:name=".SplashActivity"
android:screenOrientation="portrait"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Solution 2: Replace/Remove those 3rd Party library which are using these permissions.
Solution 3: For safe side you can add these lines in your AndroidManifest file.
<uses-permission
android:name="android.permission.RECEIVE_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.SEND_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.RECEIVE_WAP_PUSH"
tools:node="remove" />
<uses-permission
android:name="android.permission.RECEIVE_MMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_CALL_LOG"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_CALL_LOG"
tools:node="remove" />
<uses-permission
android:name="android.permission.PROCESS_OUTGOING_CALLS"
tools:node="remove" />
these lines will remove all the restricted permission(s) according to Permission Policy if any used.
Hope it will be helpful.

The issue happened with our apk as well, we removed the alpha,beta and internal test channel apks with updated apks without any violation of policy and they restored the production apk for us.

Related

how to merge these two AndroidManifest files

I am currently using this AndroidManifest in my project: Current Manifest, however I am trying to use this other AndroidManifest from a website in order to implement an image upload service : Manifest to add
I have been searching for answers but I haven't been able to merge these 2 files successfully. The Current Manifest picture of course is not the entirety of it, but I simply showed you the most important parts. Am I able to merge both packages, with both applications and activities?
current manifest
<manifest
package="org.briarproject.briar"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.bluetooth"/>
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_LOGS"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<application
android:name="org.briarproject.briar.android.BriarApplicationImpl"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:logo="#mipmap/ic_launcher_round"
android:theme="#style/BriarTheme">
<activity
android:name="org.briarproject.briar.android.reporting.DevReportActivity"
android:excludeFromRecents="true"
android:exported="false"
manifest to add
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.simplifiedlearning.volleymysqlexample">
<!-- the internet permission -->
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Do you still want to merge them (or still are wondering how to do it, after reading other peoples comments) ?.
If so (you could have used a separate module or make a library), one way is like this:
I kept your old package name as the external main one
I made sure I had all permissions of both manifest's
I kept the new Activity's intent-filter (so it's the first Activity on launch)
You need to physically copy the new source code (directory/s) into your current source code
("net.simplifiedlearning.volleymysqlexample.MainActivity" meaning physically "...\net\simplifiedlearning\volleymysqlexample\MainActivity" {windows path convention})
Merging manifest's is quite a simple operation, merging resources can be a lot of work. Questions you have to ask yourself:
Do I need resources from the new project and copy/merge them into the current ?
(They may be many and incompatible, strings,layouts, styles and themes in particular but many more ...).
Is the build system of the new project merged into your project ?
Example resource directories (not to mention all the files):
res +
+---drawable-hdpi
+---drawable-land-hdpi
+---drawable-land-ldpi
+---drawable-land-mdpi
+---drawable-land-xhdpi
+---drawable-land-xxhdpi
+---drawable-land-xxxhdpi
+---drawable-mdpi
+---drawable-port-hdpi
+---drawable-port-ldpi
+---drawable-port-mdpi
+---drawable-port-xhdpi
+---drawable-port-xxhdpi
+---drawable-port-xxxhdpi
+---drawable-xhdpi
+---drawable-xxhdpi
+---layout
+---menu
+---mipmap-hdpi
+---mipmap-ldpi
+---mipmap-mdpi
+---mipmap-xhdpi
+---mipmap-xxhdpi
+---mipmap-xxxhdpi
+---values
+---xml
The merged manifest:
<manifest
package="org.briarproject.briar"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.bluetooth"/>
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_LOGS"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<application
android:name="org.briarproject.briar.android.BriarApplicationImpl"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:logo="#mipmap/ic_launcher_round"
android:theme="#style/BriarTheme">
<activity android:name="org.briarproject.briar.android.reporting.DevReportActivity">
android:label="#string/crash_report_title"
</activity>
<activity android:name="net.simplifiedlearning.volleymysqlexample.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
your code shows two differentes packages, anyway, merge several manifest is a gradle or IDE task:
"Your APK file can contain just one AndroidManifest.xml file, but your Android Studio project may contain several—provided by the main source set, build variants, and imported libraries. So when building your app, the Gradle build merges all manifest files into a single manifest file that's packaged into your APK."
source: https://developer.android.com/studio/build/manifest-merge.html

Neither user 10063 nor current process has android.permission.ACCESS_NETWORK_STATE [duplicate]

I know it may be silly question and I have referred all the similar question before but unfortunately I could resolve this issue. Most probably it is problem in my Manifest.xml file.
When I am trying to access location, app is crashing
here is my manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.tt.test" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".sTest"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.test.tt.test.sService">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </service>
<service android:name="com.test.tt.test.sServiceRequest" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
</application>
when I run it throw this error
java.lang.SecurityException: Neither user 11029 nor current process has android.permission.ACCESS_COARSE_LOCATION.
Similar with other permissions. I can not see any mistake in my manifest file. Help appreciated
If you are running on a device on Android Marshmallow and above:
If the device is running Android 6.0 or higher and if the app's target SDK is 23 or higher, the app not just have to list the permissions in the manifest but also must request each dangerous permission it needs while the app is running.
More info:
http://developer.android.com/training/permissions/requesting.html
and
http://developer.android.com/guide/topics/security/permissions.html#normal-dangerous
This means you have some wrong information or malformed info in your menifest file and that is the reason none of your Permission is not identified by your app. Just make sure you have cleaned ANDROIDMANIFEST file with any malformed data.
It will work and all permission should be outside Application tag
move the uses-permission outside application just below the manifest tag
Moving permission section solved my problem with "Neither user or current process has android.permission.READ_PHONE_STATE". Thank you so much to everyone in this forum.
In reference to others, my changes are bellow:
Original:
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<activity android:name=".NfcRead"></activity>
</application>
Change:
<uses-permission android:name="android.permission.NFC" />
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<activity android:name=".NfcRead"></activity>
</application>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
This exception is related to the runtime permission system in Android 6 and above. The Location permission comes under dangerous permission [check here], so you must have to fulfill below 2 minimum requirements to handle these permissions:
Declared below 2 permission in manifest (These permissions must be outside application tag)
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION " />
Check for the granted permission at runtime using checkSelfPermission() and request permissions using requestPermissions() if not already granted.
If you have already done both of the above then and still getting error then check below:
You App's targetSdkVersion (should be >=23) [If the application's targetSdkVersion is set to less than 23. It will be assumed that application is not tested with new permission system yet and will switch to the same old behavior: user has to accept every single permission at install time and they will be all granted once installed].
Check if you have any thing wrong with you manifest file. You might have malformed manifest file.
Check if you are calling any function, that works on location data, before the user Accept/revoked runtime location permission dialog?
Clean you app (Clean build) and re-run.
Hope this may help :-)

Neither user nor current process has android.permission.ACCESS_COARSE_LOCATION

I know it may be silly question and I have referred all the similar question before but unfortunately I could resolve this issue. Most probably it is problem in my Manifest.xml file.
When I am trying to access location, app is crashing
here is my manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.tt.test" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".sTest"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.test.tt.test.sService">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </service>
<service android:name="com.test.tt.test.sServiceRequest" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
</application>
when I run it throw this error
java.lang.SecurityException: Neither user 11029 nor current process has android.permission.ACCESS_COARSE_LOCATION.
Similar with other permissions. I can not see any mistake in my manifest file. Help appreciated
If you are running on a device on Android Marshmallow and above:
If the device is running Android 6.0 or higher and if the app's target SDK is 23 or higher, the app not just have to list the permissions in the manifest but also must request each dangerous permission it needs while the app is running.
More info:
http://developer.android.com/training/permissions/requesting.html
and
http://developer.android.com/guide/topics/security/permissions.html#normal-dangerous
This means you have some wrong information or malformed info in your menifest file and that is the reason none of your Permission is not identified by your app. Just make sure you have cleaned ANDROIDMANIFEST file with any malformed data.
It will work and all permission should be outside Application tag
move the uses-permission outside application just below the manifest tag
Moving permission section solved my problem with "Neither user or current process has android.permission.READ_PHONE_STATE". Thank you so much to everyone in this forum.
In reference to others, my changes are bellow:
Original:
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<activity android:name=".NfcRead"></activity>
</application>
Change:
<uses-permission android:name="android.permission.NFC" />
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<activity android:name=".NfcRead"></activity>
</application>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
This exception is related to the runtime permission system in Android 6 and above. The Location permission comes under dangerous permission [check here], so you must have to fulfill below 2 minimum requirements to handle these permissions:
Declared below 2 permission in manifest (These permissions must be outside application tag)
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION " />
Check for the granted permission at runtime using checkSelfPermission() and request permissions using requestPermissions() if not already granted.
If you have already done both of the above then and still getting error then check below:
You App's targetSdkVersion (should be >=23) [If the application's targetSdkVersion is set to less than 23. It will be assumed that application is not tested with new permission system yet and will switch to the same old behavior: user has to accept every single permission at install time and they will be all granted once installed].
Check if you have any thing wrong with you manifest file. You might have malformed manifest file.
Check if you are calling any function, that works on location data, before the user Accept/revoked runtime location permission dialog?
Clean you app (Clean build) and re-run.
Hope this may help :-)

After minor refractoring existing android application to new project, home screen icon got removed

I had my existing android project going unmanageable due to unnecessary research codes, so I decided to create a new project with only necessary code that's required for the app. I uploaded the same on play store's beta environment. As the app got updated on my phone, the already existing app icon on home screen got removed. Did I make any mistake in the code development?
Please help
EDIT: Added Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.abc"
android:installLocation="preferExternal"
android:versionCode="52"
android:versionName="5.0.004" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name="com.example.abc.Appname"
android:allowBackup="true"
android:icon="#drawable/launcher"
android:label="#string/app_name"
android:theme="#style/Theme.CustomTheme" >
<activity
android:name="com.example.abc.SplashScreen"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_app_name"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</manifest>
Reverted back the application name to old file name (java class) and the same in manifest file. The launcher icon was created while installing via Google play store's beta environment.
Still unsure why the application name and java class names had an impact on the launcher icons. Any idea?

How to add manifest permission to an application?

I am trying to access HTTP link using HttpURLConnection in Android to download a file, but I am getting this warning in LogCat:
WARN/System.err(223): java.net.SocketException: Permission denied (maybe missing INTERNET permission)
I have added android.Manifest.permission to my application but it's still giving the same exception.
Assuming you do not have permissions set from your LogCat error description, here is my contents for my AndroidManifest.xml file that has access to the internet:
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<application ...
</manifest>
Other than that, you should be fine to download a file from the internet.
Permission name is CASE-SENSITIVE
In case somebody will struggle with same issue, it is case sensitive statement, so wrong case means your application won't get the permission.
WRONG
<uses-permission android:name="ANDROID.PERMISSION.INTERNET" />
CORRECT
<uses-permission android:name="android.permission.INTERNET" />
This issue may happen ie. on autocomplete in IDE
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.photoeffect"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.example.towntour.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<activity
android:name="com.photoeffect.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
If you are using the Eclipse ADT plugin for your development, open AndroidManifest.xml in the Android Manifest Editor (should be the default action for opening AndroidManifest.xml from the project files list).
Afterwards, select the Permissions tab along the bottom of the editor (Manifest - Application - Permissions - Instrumentation - AndroidManifest.xml), then click Add... a Uses Permission and select the desired permission from the dropdown on the right, or just copy-paste in the necessary one (such as the android.permission.INTERNET permission you required).
Copy the following line to your application manifest file and paste before the <application> tag.
<uses-permission android:name="android.permission.INTERNET"/>
Placing the permission below the <application/> tag will work, but will give you warning. So take care to place it before the <application/> tag declaration.
FOR FLUTTER DEVELOPERS.
Go to
android/app/main/AndroidManifest.xml
Outside the
application tag
but inside the
manifest tag
Add
<uses-permission android:name="android.permission.INTERNET" />
Add the below line in your application tag:
android:usesCleartextTraffic="true"
To be look like below code :
<application
....
android:usesCleartextTraffic="true"
....>
And add the following tags above of application
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
to be like that :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.themarona.app">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
When using eclipse, Follow these steps
Double click on the manifest to show it on the editor
Click on the permissions tab below the manifest editor
Click on Add button
on the dialog that appears Click uses permission. (Ussually the last item on the list)
Notice the view that appears on the rigth side Select "android.permission.INTERNET"
Then a series of Ok and finally save.
Hope this helps
I am late but i want to complete the answer.
An permission is added in manifest.xml like
<uses-permission android:name="android.permission.INTERNET"/>
This is enough for standard permissions where no permission is prompted to the user. However, it is not enough to add permission only to manifest if it is a dangerous permission. See android doc. Like Camera, Storage permissions.
<uses-permission android:name="android.permission.CAMERA"/>
You will need to ask permission from user. I use RxPermission library that is widely used library for asking permission. Because it is long code which we have to write to ask permission.
RxPermissions rxPermissions = new RxPermissions(this); // where this is an Activity instance // Must be done during an initialization phase like onCreate
rxPermissions
.request(Manifest.permission.CAMERA)
.subscribe(granted -> {
if (granted) { // Always true pre-M
// I can control the camera now
} else {
// Oups permission denied
}
});
Add this library to your app
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.tbruyelle:rxpermissions:0.10.1'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
}
That may be also interesting in context of adding INTERNET permission to your application:
Google has also given each app Internet access, effectively removing the Internet access permission. Oh, sure, Android developers still have to declare they want Internet access when putting together the app. But users can no longer see the Internet access permission when installing an app and current apps that don’t have Internet access can now gain Internet access with an automatic update without prompting you.
Source: http://www.howtogeek.com/190863/androids-app-permissions-were-just-simplified-now-theyre-much-less-secure/
Bottom line is that you still have to add INTERNET permission in manifest file but application will be updated on user's devices without asking them for new permission.
You have to use both Network and Access Network State in manifest file while you are trying load or access to the internet through android emulator.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
If you are giving only .INTERNET permission, it won't access to the internet.
** For Activity Recognition like Foot Step Counter
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
** For Internet
<uses-permission android:name="android.permission.INTERNET" />
** For Call Phone
<uses-permission android:name="android.permission.CALL_PHONE" />
[![enter image description here][1]][1]
If you're using Android Studio, hover over the code that requires the permission and click "Add Permission .."
Then you can check the changes in AndroidManifest.xml with git.

Categories

Resources