android-9.0-pie

How to get current wifi connection name in android pie(9) devices?

 ̄綄美尐妖づ 提交于 2020-01-11 10:22:33
问题 I know it is very simple for you. Here I am just tried to get WiFi name in android pie devices. I am able to get WiFi name till Nogout devices with the help of below line of code. String ssid = wifiInfo.getSSID(); I have tried lots of answer and Android developer docs but unfortunately, I can not get a WiFi name on my mobile(Nokia 6.1 plus). I Know I am doing mistakes. I just want a code there I can get a wifi name from my mobile to my android studio logcat. 回答1: This is related to

Unable to open PDF from internal storage for viewing on Android 8 and 9 using File Provider

徘徊边缘 提交于 2020-01-06 04:36:30
问题 For Android 8 and 9 only. I have a PDF filer here - String url = "file:///storage/emulated/0/Android/data/com.verna.poc/files/Download/mypdf.pdf"; I'm trying to open this file for viewing using this - File file= new File(url); file.setReadable(true, false); Intent intent = new Intent(Intent.ACTION_VIEW); Uri pdfUri = FileProvider.getUriForFile(getApplicationContext(), BuildConfig.APPLICATION_ID + ".provider", file); intent.setDataAndType(pdfUri, "application/pdf"); intent.addFlags(Intent.FLAG

NoClassDefFoundError after migrating to Android API 28

≡放荡痞女 提交于 2019-12-24 01:42:14
问题 I know, similar questions have been asked, but I think, my situation is different. Please don't delete. I've started getting NoClassDefFoundError error after migrating to API 28, just like many other folks. I've seen others experienced this issue because Google has deprecated org.apache classes, which required changing manifest, but I don't use apache classes in my project. What makes investigation difficult is that there is no custom classes in the stack trace below, and it's not even clear

NsdManager discovery does not work on Android 9

你。 提交于 2019-12-23 03:57:16
问题 I have tried for a good time now to get the NsdManager discovery function to work on Android 9. It works on any Android version prior to that without any problems. For testing purposes I use this simple code snippet and there is a permission for "INTERNET" in the manifest. var nsdManager = context.getSystemService(Context.NSD_SERVICE) as NsdManager nsdManager.discoverServices("_https._tcp", NsdManager.PROTOCOL_DNS_SD, object: NsdManager.DiscoveryListener { override fun onDiscoveryStarted

Fix for Security “Crypto” on Nougat does not work for Pie

扶醉桌前 提交于 2019-12-23 02:02:45
问题 A user run my application in Android Pie, he got the crash.There was fix for Android N (fix from varotariya vajsi): SecureRandom sr = SecureRandom.getInstance("SHA1PRNG", new CryptoProvider()); ... public final class CryptoProvider extends Provider { /** * Creates a Provider and puts parameters */ public CryptoProvider() { super("Crypto", 1.0, "HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)"); put("SecureRandom.SHA1PRNG", "org.apache.harmony.security.provider.crypto.SHA1PRNG

Failed to find Platform SDK with path: platforms;android-P

亡梦爱人 提交于 2019-12-22 06:46:18
问题 Error:FAILURE: Build failed with an exception. What went wrong: A problem occurred configuring project ':app'. Failed to find Platform SDK with path: platforms;android-P apply plugin: 'com.android.application' android { compileSdkVersion 'android-P' defaultConfig { applicationId "com.google.codelabs.mdc.java.shrine" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary =

Android 9.0 NotificationManager.notify() throwing java.lang.SecurityException

纵然是瞬间 提交于 2019-12-21 17:01:46
问题 I have been unable to reproduce this problem myself, but so far 5 users have reported it. I did recently publish an app update that changed the target SDK from 27 to 28 which I sure plays a part in this. All 5 users are running some flavor Android 9 on some kind of Pixel device. As am I. The app responds to an alert situation by calling setting up a notification and calling NotificationManager.notify(). This notification references a notification channel that tries to play an audio file

Webview.loadData not working on 8.1 and 9.0

故事扮演 提交于 2019-12-21 04:38:11
问题 I have an article app, I am showing articles in webview. In android version 8.1 and 9.0 This webview is not working. The app shows NOTHING in article activity. mWebView.setVisibility(View.VISIBLE); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setLoadWithOverviewMode(true); mWebView.getSettings().setUseWideViewPort(true); mWebView.getSettings().setMinimumFontSize(14); String htmlContent = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + "<head>" + "<meta http-equiv=

Views not loading after updating device to Android Pie 9.0

99封情书 提交于 2019-12-20 06:39:54
问题 I recently updated my phone to Android 9.0. The app which I was developing was working fine in earlier Android version. But after the update some views which require internet are not loading. Blank spaces are being displayed in their places. It has a ViewPager as banner and 2 RecyclerView below categories and deals respectively. They all require internet to load data. I don't know know if any extra permissions or dependencies are required in Android Pie. The logs show NetworkDispatcher.run:

DownloadManager requests delayed on Android Pie

戏子无情 提交于 2019-12-19 02:01:05
问题 I have been using the DownloadManager APIs to handle downloads in one app for about 3 years. Recently I had some users on Android Pie complaining that sometimes downloads get stuck for several minutes before actually starting, thus compromising the UX: some of them had to reinstall the app to make them work correctly, some others had the issue fixed itself over time. Please note that I haven't set any special settings to the DownloadManager.Request instances (e.g. allowedNetworkTypes ,