android-permissions

WebView WebRTC not working

家住魔仙堡 提交于 2019-11-30 12:54:08
I'm trying to show WebRTC chat in WebView . Related to this documentation WebView v36 supports WebRTC . For my test i'm using device with Chrome/39.0.0.0 and added permissins to manifest: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <user-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> but when entered into chat see chromium error in the log (device doesn't show \ translate anything, only 'loading' progress bar) : W

Call 911 in Android

只愿长相守 提交于 2019-11-30 12:46:47
I want to call Emergency number using Android SDK. I am using following code to call the number (911). This code works fine for all the numbers except 911 (Emergency Number). When I use 911, then it shows the dialer screen that I don't want. Is there any procedure to call 911 without open the dialer or can we stop the user to edit the number in Dialer screen? Uri callUri = Uri.parse("tel://911"); Intent callIntent = new Intent(Intent.ACTION_DIAL,callUri); callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_NO_USER_ACTION); startActivity(callIntent); The code provided should

Android M: Programmatically revoke permissions

ぃ、小莉子 提交于 2019-11-30 07:58:03
问题 I am currently playing around with android m's new permission system. What i am planning is to add a screen to my in-app settings where the user can grant or revoke permissions. The screen would look like the regular system settings screen, but will have additional information why my app needs the specific permission. This settings screen would be an addition to the regular permission handling as suggested in the Documentation. The workflow would be: granting permission: open the systems

Android App not asking for permissions when installing

家住魔仙堡 提交于 2019-11-30 07:52:48
问题 I work in the IT department of my university and we work on an app that installs the correct setup for the eduroam WiFi (maybe you have heard of it). However I have a problem running it on my own LG G4 with Android 6.0. When installing the compiled *.apk it doesn't ask for any permissions although they are set in the AndroidManifest.xml. It was working on all previous Android versions. Is it mandatory now to ask for permissions at run time? 回答1: If your target SDK version is 23 then you need

Android Custom Permission Fails Based on App Install Order

谁说胖子不能爱 提交于 2019-11-30 06:50:24
Having issues with my apps on Google Play. I have a free app which utilizes a custom permission. This permission allows access to paid apps. These paid apps act as "keys" and unlock features in the free app. Basically the free app will attempt to start the intent of one of the paid apps. The paid app will do some stuff and return saying whether the free app should unlock features or not. Problem arises based on the order of app installation. If the free app is installed first then a paid app, the free app can't start the intent. Returns permission denial. If the paid app is installed first

Checking if permissions have been granted already by user in Android

ⅰ亾dé卋堺 提交于 2019-11-30 06:44:04
I have defined all the dangerous permissions in a String array as below: String[] perms = {Manifest.permission.READ_CONTACTS, Manifest.permission.READ_PHONE_STATE, Manifest.permission.CALL_PHONE, Manifest.permission.MODIFY_PHONE_STATE}; Then to check if they have been granted I run this: for (int i = 0; i < perms.length; i++) { if(ContextCompat.checkSelfPermission(this,perms[i])!=PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this,perms, permsRequestCode); break; } } For some reason this does not work. It asks for permission once, and then if I manually disable it from

How to check if Android Permission is actually being used?

主宰稳场 提交于 2019-11-30 05:35:55
I am maintaining one existing (very-huge, very-sensitive) Android Application. The other day, I have received an email from my client that, the Application might be declaring the Permissions that are not actively being used. For example, they wants me to remove "WRITE_EXTERNAL_STORAGE" permission. I have removed it and compiled it and run the App. There is NO error at all. But, just because of that, I don't think I can assume that permission is not actively being used at all. My question is "Is there anyway I can easily and simply check the permission if it is actively being used ?" Frankly, I

Push notifications (GCM) permission at runtime?

柔情痞子 提交于 2019-11-30 05:35:54
I have read that it is necessary to ask the user for some permissions at runtime for API 23 and up. For example: android.permission.ACCESS_FINE_LOCATION . Is it necessary (or even possible) to ask for a runtime permission for using GCM/push notifications at runtime if API is 23 or higher? I have tried using the requestPermissions method at runtime, but it doesn't seem to work (nothing happens) when I use it with any GCM/push notification related permissions. I have the following permissions in my Manifest for this purpose: <uses-permission android:name="android.permission.INTERNET"/> <uses

Android 8 requires READ_PHONE_STATE when calling SmsManager.sendTextMessage()

一曲冷凌霜 提交于 2019-11-30 04:43:01
My application can't send sms on new android 8 update. I get error that I don't have READ_PHONE_STATE permission. java.lang.SecurityException: Neither user 10179 nor current process has android.permission.READ_PHONE_STATE. at android.os.Parcel.readException(Parcel.java:1942) at android.os.Parcel.readException(Parcel.java:1888) at com.android.internal.telephony.ISms$Stub$Proxy.sendTextForSubscriber(ISms.java:789) at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:329) at android.telephony.SmsManager.sendTextMessage(SmsManager.java:312) at com.cordova.plugins.sms.Sms.send

ActivityCompat.requestPermissions does not show prompt

北战南征 提交于 2019-11-30 04:20:49
问题 I'm attempting to request ACCESS_FINE_LOCATION permissions in order to get the user's current location. My logging indicates that my app does not currently have this permission when querying ContextCompat.checkSelfPermission() , but when calling ActivityCompat.requestPermissions() nothing is displayed. My Google map code (implementing OnMapReadyCallback and ActivityCompat.OnRequestPermissionsResultCallback() ) is in a FragmentActivity . I have managed to get the requestPermissions() function