targetsdkversion

ActivityCompat.requestPermissions for targetSdkVersion 30 is not working

雨燕双飞 提交于 2021-02-09 07:33:59
问题 I have following permissions: private static final String[] LOCATION_PERMISSIONS = { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, }; I try to request permissions in my code with following line (activity is my current activity ref): ActivityCompat.requestPermissions(activity, LOCATION_PERMISSIONS, 1); Everything works fine if I have targetSdkVersion 29 or lower in my build.gradle file. Permissions dialog

ActivityCompat.requestPermissions for targetSdkVersion 30 is not working

◇◆丶佛笑我妖孽 提交于 2021-02-09 07:31:53
问题 I have following permissions: private static final String[] LOCATION_PERMISSIONS = { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, }; I try to request permissions in my code with following line (activity is my current activity ref): ActivityCompat.requestPermissions(activity, LOCATION_PERMISSIONS, 1); Everything works fine if I have targetSdkVersion 29 or lower in my build.gradle file. Permissions dialog

ActivityCompat.requestPermissions for targetSdkVersion 30 is not working

≯℡__Kan透↙ 提交于 2021-02-09 07:30:48
问题 I have following permissions: private static final String[] LOCATION_PERMISSIONS = { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, }; I try to request permissions in my code with following line (activity is my current activity ref): ActivityCompat.requestPermissions(activity, LOCATION_PERMISSIONS, 1); Everything works fine if I have targetSdkVersion 29 or lower in my build.gradle file. Permissions dialog

React-native app crashes on real android device

我与影子孤独终老i 提交于 2020-05-12 07:44:08
问题 I am using react-native and currently started using redux and created one app but when I am running that app on the emulator it is working fine. Then I connected my mobile with android 6 through USB on that also it is working. But in other devices of Android 8 it is not working then I have changed targetSdkVersion to 28 then also it not working I am not getting what is the problem. Following is my package.json { "name": "Demo", "version": "0.0.1", "private": true, "scripts": { "start": "node

“location provider requires ACCESS_FINE_LOCATION permission” even if I use runtime request permission

落花浮王杯 提交于 2020-01-06 05:26:09
问题 This is so weird. We all know that if <uses-sdk android:targetSdkVersion="23"/> is set to 23+, you must ask for runtime permissions besides declaring <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> in the manifest. This has been working with no problem for years. Now, The problem is that when I am setting targetSdkVersion to "26", the LocationManager is not working anymore! and throws this error: "gps" location provider requires ACCESS_FINE_LOCATION permission The

targetSdkVersion gradle strange value

拜拜、爱过 提交于 2019-12-11 06:17:42
问题 So, I cloned this project from Github and while going through its build.gradle , I found this strange configuration, particularly for targetSdkVersion . Now, before I jump into the details of what it is, let me mention that the project has two modules - app (the main one) and callrecord (encapsualting the call recording functionality) Here is the build.gradle file for the same: apply plugin: 'com.android.application' android { compileSdkVersion project.sdk defaultConfig { applicationId "com

How to make AQuery images load when targetSdkVersion is API 28?

怎甘沉沦 提交于 2019-12-08 19:00:28
When targetSdkVersion = 27, the AQuery URL images load good. But when it equals 28, the images don't load and the image loading place holder is shown. Any ideas how to solve this so that I can target API 28? I don't know why, but I added <!-- for targetsdk 28 --> <uses-library android:name="org.apache.http.legacy" android:required="false"/> on AndroidManifest.xml, and AQuery now works again on targetSdk 28. 来源: https://stackoverflow.com/questions/53077124/how-to-make-aquery-images-load-when-targetsdkversion-is-api-28

How to make AQuery images load when targetSdkVersion is API 28?

笑着哭i 提交于 2019-12-08 08:19:26
问题 When targetSdkVersion = 27, the AQuery URL images load good. But when it equals 28, the images don't load and the image loading place holder is shown. Any ideas how to solve this so that I can target API 28? 回答1: I don't know why, but I added <!-- for targetsdk 28 --> <uses-library android:name="org.apache.http.legacy" android:required="false"/> on AndroidManifest.xml, and AQuery now works again on targetSdk 28. 来源: https://stackoverflow.com/questions/53077124/how-to-make-aquery-images-load

Delphi - New apps on Google Play must target Android 8 (API level 26) - PUSH notification in background

自作多情 提交于 2019-12-06 00:40:27
问题 From August 2018, all new apps on Google Play must target Android 8 (API level 26) or higher, and from November 2018, all app updates on Google Play must of the same apps on Google Play. Right now the only way you have to upload a new App that target Android 8 is to edit the file AndroidManifest.template.xml and replace targetSdkVersion = "% targetSdkVersion%" by: Android: targetSdkVersion = "26" The problem is that from that moment the app has the restrictions introduced by Android O. The

Android targetSdkVersion 17 @JavascriptInterface

一笑奈何 提交于 2019-12-05 11:31:46
targetSdkVersion 是设置希望的SDK版本 ,如果设置了此属性,那么在程序执行时,如果目标设备的API版本正好等于此数值,他会告诉Android平台:此程序在此版本已经经过充分测,没有问题。不必为此程序开启兼容性检查判断的工作了。 也就是说,如果targetSdkVersion与目标设备的API版本相同时,运行效率可能会高一些。 但是,这个设置仅仅是一个声明、一个通知,不会有太实质的作用, 比如说,使用了targetSdkVersion这个SDK版本中的一个特性,但是这个特性在低版本中是不支持的,那么在低版本的API设备上运行程序时,可能会报错:java.lang.VerifyError。也就是说,此属性不会帮你解决兼容性的测试问题。 js调用java的时候,如果设置了targetSdkVersion,当targetSdkVersion<17时没问题,targetSdkVersion>=17时不成功 如果您在编写HTML5应用,需要在JS代码中访问Java中的函数,则您会用到WebView的addJavascriptInterface()函数。因为安全问题,在Android4.2中(如果应用的android:targetSdkVersion数值为17+)JS只能访问带有 @JavascriptInterface注解的Java函数。 之前