android-permissions

android:permission in <application>

£可爱£侵袭症+ 提交于 2019-12-08 10:23:18
问题 I have noticed that Android framework allows android:permission in <application> . For example, consider the following manifest file. <application android:permission="android.permission.INTERNET"> ... </application> In the above example, to launch my application the launcher app (e.g., home screen) needs INTERNET permission. In reality, no one permission protect their application (I may be wrong here). But, I really don't understand the practical use-case of it. When will we use permissions

Android Send SMS Permission working on other 23+ devices but not with the OnePlus 5

风格不统一 提交于 2019-12-08 09:54:19
问题 I have an application that requests permission to send SMS from the user then sends a formatted SMS in the background. This works on all other 23+ devices except my new OnePlus 5. Does anyone know what might be going on? 回答1: May be it is happening because of the third party app permission. One plus uses Oxygen Os and Settings are managed from a custom settings view in Oxygen OS. You should open the application Settings page instead Intent intent = new Intent(); intent.setAction(Settings

Android doesn't work if I use mobile data instead of wifi

我的梦境 提交于 2019-12-08 07:53:00
问题 When I launch my android app and I try to do a login process using WiFi data, it's all right. But if I launch the app again and I try to to the same process using mobile data, the process still waiting until I get an error. The code is: class AsyncLogin extends AsyncTask< String, String, String > { String username, password; protected void onPreExecute() { pDialog = new ProgressDialog(MainActivity.this); pDialog.setMessage("Login..."); pDialog.setIndeterminate(false); pDialog.setCancelable

How to add Multiple permissions in the permissions Request [duplicate]

一世执手 提交于 2019-12-08 07:22:33
问题 This question already has answers here : Android 6.0 multiple permissions (22 answers) Closed last year . I would like to know how to add multiple permissions on a single request. This is regarding the Marshmallow version of android. 回答1: You need to create an arraylist of permission required List<String> permissionsNeeded = new ArrayList<String>(); final List<String> permissionsList = new ArrayList<String>(); if (!addPermission(permissionsList, Manifest.permission.READ_PHONE_STATE))

How to ask for user permissions in Android 6

吃可爱长大的小学妹 提交于 2019-12-08 06:37:30
问题 I am totally confused regarding the new permission system in Android 6 (Marshmallow). I am using two so called 'dangeorus permissions' - <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> And I use these permissions in many places. I need to access the user accounts for Registering the app, Sending Feedback etc.And I also access Device Id for registering the app. I wrote two functions to get the list of

Android permissions are set by default and application doesn't know if they are off

混江龙づ霸主 提交于 2019-12-08 05:36:09
问题 I updated xamarin android and now compile app using version 7.0(Nougat). But when I deploy app on 6.0.1(marshmallow), all permissions are already set. When I turn off location permission from settings, alert displays "this app was designed for an older version of android. denying permission may cause it to no longer function as intended". Then if we deny permission and method Context.CheckSelfPermission in the app return Permission.Granted anyway. Is this xamarin issue or something change in

AOSP Marshmallow modify/set default permission

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 05:13:57
问题 I have built my own AOSP Marshmallow on my Nexus 5 device and got trouble with the permissions. If I add a new permission into the AndroidManifest.xml of an existing application, this permission will be by default turned off. I have to manually set it. The other permission for example Contacts is being active (the once I did not modify and seems to be standard even after factory reset). So there has to be a file which gives conclusion about the standard permission of the applications. I just

What permissions are needed by each Google Play Services component?

落花浮王杯 提交于 2019-12-08 03:31:30
问题 As I found out in Why are permissions being automatically added to my AndroidManifest when including Google Play Services library, various Google Play Services components implicitly add permissions to your app starting in Google Play Services 7.5. But obviously not all components require the same permissions - for instance, play-services-games:7.8.0 doesn't require any. Is there an easy way to tell what permissions will be added by a particular Google Play Services component? 回答1: Visit

Understanding how android app is installed by PackageManagerService

橙三吉。 提交于 2019-12-08 01:30:24
问题 So I've been digging around AOSP trying to figure out how an android app is installed. So far this is where I'm at: The apk File will be sent from PackageInstallerActivity to InstallAppProgress where it invokes the PackageManager method installPackage(). The previous call to PackageManager gets directed to the PackageManagerService, with the magic of AIDL (took some time for me to understand this). In the core method installPackageWithVerification() an instance of the PackageHandler gets

Uninstall an app programmatically

我怕爱的太早我们不能终老 提交于 2019-12-08 01:26:36
问题 I want to develop an open source app for uninstalling applications. How can I do this? And how can I uninstall an app that is in /system/app/ after I gain root access? Thanks 回答1: You can execute adb commands from within your app if you have root access like this Process process = Runtime.getRuntime().exec("your command"); BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(process.getInputStream())); use try catch as well for this code 回答2: After a little searching on