android-permissions

Install Android system app, silent update without Google play on rooted device.

空扰寡人 提交于 2019-12-21 20:37:04
问题 I am trying to get my app to download an update from an ftp site, in the form of a new version of the apk. After download the apk should be installed silently, without any confirmation from a user. I have the download part under control. I can also do this with confirmation from the user. The problem is the silent update part. From what I can tell the only way to do this is by installing the app as a system app. This is where I need some help. I have tried alot of things. The most success I

Marshmallow app permission revoke notification? [duplicate]

有些话、适合烂在心里 提交于 2019-12-21 13:16:38
问题 This question already has an answer here : Android Marshmallow Callback when user revokes permissions from settings ? (1 answer) Closed 4 years ago . In Android 6.0 (Marshmallow), users can revoke specific app permissions, even after granting it from inside the app. I know I can check permissions with ContextCompat.checkSelfPermission() . But Is there a way for my app to get notified when the user revokes one of my app's permissions, without repeated checking with ContextCompat

Grant Uri permission to another activity

浪子不回头ぞ 提交于 2019-12-21 12:00:45
问题 I'm trying to get image from device gallery and then show it in another activity. Code in my activity: private void startGallery() { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("image/*"); startActivityForResult(intent, REQ_OPEN_GALLERY) } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQ_OPEN_GALLERY && resultCode == Activity.RESULT_OK) { Uri imageUri = data

Receive intent “android.settings.APPLICATION_DETAILS_SETTINGS” for my app

核能气质少年 提交于 2019-12-21 05:49:23
问题 I want to get the package name and class name of the received intent , But am not able to get it. I want to make my app secure so it asks for password before being uninstalled. Only the user who Installed the app knows the password, so only he/she can uninstall the app. My code for Receiver: public class PackageReceiver extends BroadcastReceiver { @ Override public void onReceive (Context context, Intent intent) { if (intent.getAction().equals("android.settings.APPLICATION_DETAILS_SETTINGS"))

WhatsApp could access SMS without having permission to it

让人想犯罪 __ 提交于 2019-12-21 05:14:11
问题 I have not granted SMS permission to WhatsApp on my device HonorView10 running on EMUI9 . Recently I changed the number registered with WhatsApp and it send the verification code to new number (the sim is on same device as it is dual SIM). WhatsApp read the SMS and completed the verification process. Is it possible in Android to read SMS without permission? Or it is bug in EMUI9? I am just curious. 回答1: WhatsApp could access SMS without having permission to it I think whats app is using SMS

How can I check permission under API level 23? [duplicate]

烂漫一生 提交于 2019-12-21 04:31:16
问题 This question already has answers here : Is it available to set checkSelfPermission on minimum SDK < 23? (5 answers) Closed 3 years ago . One of my app has a permission RECORD_AUDIO and my app's targetSdkVersion is 22. I cannot check permission at runtime. But I notice if I install my app in Android 6.0 and above. Users can manually deny permission in System App permissions Settings. So my question is how can I check whether my app is grand Audio permission under API level 23? I have searched

How can I check permission under API level 23? [duplicate]

﹥>﹥吖頭↗ 提交于 2019-12-21 04:31:13
问题 This question already has answers here : Is it available to set checkSelfPermission on minimum SDK < 23? (5 answers) Closed 3 years ago . One of my app has a permission RECORD_AUDIO and my app's targetSdkVersion is 22. I cannot check permission at runtime. But I notice if I install my app in Android 6.0 and above. Users can manually deny permission in System App permissions Settings. So my question is how can I check whether my app is grand Audio permission under API level 23? I have searched

Android Robolectric unit test for Marshmallow PermissionHelper

旧巷老猫 提交于 2019-12-21 03:38:23
问题 I wanna learn Robolectric to use it for unit tests on an Android Marshmallow app. I wrote a PermissionHelper with some methods to make permission handling a bit easier. To get started with unit tests for this class, I am trying to test the most simple method: public static boolean hasPermissions(Activity activity, String[] permissions) { for (String permission : permissions) { int status = ActivityCompat.checkSelfPermission(activity, permission); if (status == PackageManager.PERMISSION_DENIED

What kind of Android application will require android.permission.READ_PHONE_STATE permission?

霸气de小男生 提交于 2019-12-21 03:13:23
问题 I have seen some Android apps on my phone require this android.permission.READ_PHONE_STATE permission. I don't know if I could trust them. I know this permission will give the app access to many information. I'm particularly interested in what functionality in an Android app normally require the information like DeviceId , SimSerialNumber , SubscriberId ? 回答1: Phone state provides access to a lot of information about the phone. Usual usages will be for reading the IMEI of your phone and your

What is the difference between shouldShowRequestPermissionRationale and requestPermissions?

末鹿安然 提交于 2019-12-20 19:04:52
问题 I am building an app that requires user location. I am following the Android training documentation from here which says: shouldShowRequestPermissionRationale return the boolean indicating whether or not we should show UI with rationale for requesting a permission (dangerous permission, ACCESS_FINE_LOCATION) Now in this code (taken from the documentation itself) : if (ContextCompat.checkSelfPermission(thisActivity, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { //