android-permissions

Marshmallow Intent.ACTION_BOOT_COMPLETED

前提是你 提交于 2019-12-12 03:28:49
问题 i have a rotted Nexus6 With Android6 . I've created a system app (located in system/app ) i wish to execute a simple code when receiving ACTION_BOOT_COMPLETED but for some reason the code does not executes.. Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.atest"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="

Reading network activity logs on Android

南笙酒味 提交于 2019-12-12 03:24:32
问题 Can we read the app intra / inter net activity log on Android programmatically without having root access? If yes, can we do so for all apps on the device? 回答1: For your application yes, it is possible, but you need to use some layer in the HTTP requests that handles the requests and logs the information. For example using retrofit: setLogLevel(LogLevel.FULL).setLog(new AndroidLog("YOUR_LOG_TAG")) For all the applications in the device you need root, or install a custom proxy, for example:

Android M - anyway to know if a user has chosen never to show the grant permissions dialog ever again?

邮差的信 提交于 2019-12-12 03:24:21
问题 If an all calls ActivityCompat.requestPermissions() then the OS displays a dialog with Deny or Permit buttons. There is also a never show this again tick box. However there's no way that I can see for the app to know if the user has ticked this box - within onRequestPermissionsResult() the grantResults parameter is PERMISSION_DENIED if the user clicks Deny and also if the user ticks the tick box before clicking Deny. So is there anyway an app can find out if the user doesn't want to see that

Other similar apps don't do Permission controls

浪子不回头ぞ 提交于 2019-12-12 02:43:22
问题 I am developing a camera app for android, and this app obviously require the Camera permission to work. I have an Android 6 smartphone and I have just noticed that other similar apps don't show the permission request dialog but in Settings->Applications, I see that the permission is already granted for these apps. How is this possible ? Maybe because these are old apps ? 回答1: How is this possible ? Their targetSdkVersion is below 23. 来源: https://stackoverflow.com/questions/40474852/other

Android permission doesn't work even if I have declared it

笑着哭i 提交于 2019-12-12 02:21:02
问题 I'm trying to write code to send an SMS from an Android app, but when I try to send the SMS it sends me back the error: 09-17 18:37:29.974 12847-12847/**.**.****E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: **.**.****, PID: 12847 java.lang.SecurityException: Sending SMS message: uid 10092 does not have android.permission.SEND_SMS. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ISms$Stub$Proxy

Not able to get Android run time permission result

余生颓废 提交于 2019-12-12 01:47:44
问题 I want to check SMS reading permission is Granted or not in API 23+. So I implemented its as follows; if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_SMS) != PackageManager.PERMISSION_GRANTED){ ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_SMS}, PERMISSIONS_REQUEST_READ_SMS); } Handling permission resp. as follows; @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {

Android permissions not being requested

戏子无情 提交于 2019-12-12 00:38:51
问题 I have my permissions set in my AndroidManifest.xml with no errors, yet when testing is on my device, the permissions are not requested. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="crproductionsptyltd.autoflora"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" > <activity android:name=".MainActivity"

Application Not Asking to get Permissions

纵饮孤独 提交于 2019-12-11 21:37:59
问题 I have this code to get the following permissions (READ_PHONE_STATE, READ_CONTACTS, WRITE_CONTACTS) : int permissionCheck = ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_PHONE_STATE); int permissionCheck1 = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS); int permissionCheck2 = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_CONTACTS); if (permissionCheck != PackageManager.PERMISSION_GRANTED && permissionCheck1 !=

Can we change the text of a permission in android

青春壹個敷衍的年華 提交于 2019-12-11 21:24:39
问题 I know this sounds silly and also not a technical question, but, I think, its important to know and SO is the best place. I have searched abit before posting here. Can we change the text of the permission? Let's say I am using a permission, "GET_ACCOUNTS". This will display, "Your Accounts" and "Discover known accounts", to the user when he installs the application. Let's say I want to inform the user, that this permission is only being used for "push notifications" and hence i want to change

Permission error is still showing even when added permission in manifest

落爺英雄遲暮 提交于 2019-12-11 18:32:44
问题 I implemented AlertDialog in my class which extend Application class, also added proper permission in manifest file: <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> See my code: private void showAlertDialog(Context context) { DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // do some stuff eg: context.onCreate(super) } }; AlertDialog.Builder builder = new AlertDialog