草庐IT

java - 如何在 PIE 下使用私有(private)创建者(如 EGLContext)创建对象?

Android下定义了这个类:publicabstractclassEGLObjectHandle{privatefinallongmHandle;protectedEGLObjectHandle(longhandle){mHandle=handle;}publiclonggetNativeHandle(){returnmHandle;}}还有publicclassEGLContextextendsEGLObjectHandle{privateEGLContext(longhandle){super(handle);}}现在我的问题是我想用我的句柄创建一个EGLContext。该怎么做

android - 仅 PIE : SharedPreferences IllegalStateException

在尝试初始化我们的共享首选项单例类时,我们遇到了IllegalStageException,但我不知道是什么原因造成的。这里的任何人都可以告诉我这可能是什么原因造成的吗?注意:这只发生在Pie上这是来自GooglePlay控制台的报告(崩溃未在Crashlytics中显示):java.lang.RuntimeException:atandroid.app.ActivityThread.handleBindApplication(ActivityThread.java:5876)atandroid.app.ActivityThread.access$1100(ActivityThread

android - Android 9.0(PIE)如何获取WIFI SSID?

Android9.0(PIE)如何获取WIFISSID?我的代码在android版本8.1.0之前工作正常,但它不适用于Android9.0ConnectivityManagerconnManager=(ConnectivityManager)activity.getSystemService(Context.CONNECTIVITY_SERVICE);NetworkInfonetworkInfo=connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);if(networkInfo.isConnected()){WifiMan

android - 如何在 Android Pie 中获取 pdf 文件的实际文件路径?

这个问题在这里已经有了答案:onActivityResult'sintent.getPath()doesn'tgivemethecorrectfilename(2个答案)关闭3年前。目前我面临无法检索pdf的实际文件路径的问题。我尝试了我得到的所有解决方案,但无法获得AndroidPie中的实际文件路径。任何帮助都将不胜感激。代码:-Intent打开文件管理器并允许选择pdf文件。Intentintent=newIntent();intent.setType("application/pdf");intent.setAction(Intent.ACTION_GET_CONTENT);S

Android Pie : WebView showing error for plain HTTP on some sites, 即使使用 usesClearTextTraffic ="true"

我们的Android应用程序中有一个WebView,最终用户可以浏览到他们想要的任何站点。AndroidPie默认禁用纯HTTP,因此我们将usesClearTextTraffic="true"添加到我们的list中。这适用于某些网站,但不适用于其他网站,例如google.com!在无法运行的网站上,我们仍然会收到net::ERR_CLEARTEXT_NOT_PERMITTED,就好像我们没有设置list设置一样。我认为它可能与HSTS有关,但在那种情况下,我只希望WebView立即重定向到HTTPS。那么问题来了,为什么AndroidWebView仍然无法通过纯HTTP浏览某些站点,

android - 如何在 Android Pie 中使用蓝牙 HID 设备配置文件?

我正在尝试使用蓝牙HID设备配置文件服务为AndroidP编写一个应用程序以用作蓝牙键盘。根据documentation我应该使用方法BluetoothAdapter.getProfileProxy(Context,BluetoothProfile.ServiceListener,int)来获取BluetoothHidDevice代理对象。在我的AndroidPie设备(Nokia7plus)上调试期间,服务监听器从未被调用(onServiceConnected),并且我在Logcat中收到以下错误:CouldnotbindtoBluetoothHIDDeviceServicewith

android - Android Pie 上的 DownloadManager 请求延迟

我一直在使用DownloadManagerAPI可在一个应用程序中处理大约3年的下载。最近我有一些AndroidPie用户提示说,有时下载会在真正开始之前停滞几分钟,从而影响用户体验:他们中的一些人不得不重新安装应用程序才能使它们正常工作,另一些人随着时间的推移自行解决了这个问题。请注意,我没有为DownloadManager.Request实例设置任何特殊设置(例如allowedNetworkTypes、setRequiresCharging...)。我对问题的理解是请求卡在了pending中。或paused在开始之前状态很长一段时间。没有注意到SDK28中引入的任何重大更改,尽管这

Android 9 (Pie), Context.startForegroundService() 没有调用 Service.startForeground() : ServiceRecord

首先,我看了这些;Context.startForegroundService()didnotthencallService.startForeground()Context.startForegroundService()didnotthencallService.startForegroundAndroid9(Pie)Only:Context.startForegroundService()didnotthencallService.startForeground()-WorksfineonOreoRemoteServiceExceptionContext.startForegro

android - 谷歌地图在 Android Pie 上崩溃

我正在运行最新版AndroidPie的GooglePixel上测试Googlemap。Causedbyjava.lang.ClassNotFoundExceptionDidn'tfindclass"org.apache.http.ProtocolVersion"onpath:DexPathList[[zipfile"/data/user_de/0/com.google.android.gms/app_chimera/m/0000000e/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.and

Android 9 (Pie) 只有 : Context. startForegroundService() 然后没有调用 Service.startForeground() - 在 Oreo 上工作正常

我们调整了针对奥利奥的持续通知,效果很好。现在,仅在Pie上(不会在Oreo设备上发生),我们收到标题错误。Pie中的前台服务是否发生了我遗漏的某些更改?这是前台服务的onCreate代码->overridefunonCreate(){super.onCreate()valnotification:Notification=NotificationCompat.Builder(this,packageName).setSmallIcon(R.drawable.status_notification_icon).setContentTitle(getString(R.string.ong