android-9.0-pie

Android P visibilityawareimagebutton.setVisibility can only be called from the same library group

不羁岁月 提交于 2019-12-08 22:46:15
问题 I'm trying to use the new Android P FloatingActionButton that's part of the com.google.android.material.floatingactionbutton.FloatingActionButton and I'm getting this warning: VisibilityAwareImageButton.setVisibility can only be called from the same library group (groupId=com.google.android.material) import com.google.android.material.floatingactionbutton.FloatingActionButton import android.view.View class MainActivity : AppCompatActivity() { lateinit var demoFab: FloatingActionButton

Keyboard doesn't show up when enter to activity in Android Pie (API-28)

一笑奈何 提交于 2019-12-08 15:45:28
问题 I want to pop up the device keyboard when I enter to Email Login screen. I declared the windowSoftInputMode to "stateVisible" in the AndroidManifest.xml file: <activity android:name=".activities.EmailLoginActivity" android:launchMode="singleTask" android:screenOrientation="portrait" android:windowSoftInputMode="stateVisible" /> I have followed this documentation. Results: On devices that run Android API up to 27, the keyboard is shown. On devices that run the Android API 28, the keyboard is

TelephonyManager.EXTRA_INCOMING_NUMBER is null in android 9 [duplicate]

孤街浪徒 提交于 2019-12-07 18:04:59
问题 This question already has answers here : Getting the caller ID in Android 9 (2 answers) Closed 8 months ago . I am not able to get the caller phone number using TelephonyManager.EXTRA_INCOMING_NUMBER in android 9 devices. Its always null. I have added the required permissions in my manifest file. <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_CALL_LOG"/> //// <receiver android:name="packagename" android:enabled=

Android P , download does not start using download manager?

守給你的承諾、 提交于 2019-12-07 11:59:11
问题 I am trying to download files using the download manager and the download does not seem to be starting on Android P (running on the emulator). It works fine on Android Oreo and Android Marshmallow. Here is the code. DownloadManager.Request downloadRequest = new DownloadManager.Request(Uri.parse(URLS.URLforDownloadingFileData(fileName))); File file = new File(mobileInfo.getExternalFileStorageDirectory(),fileName); downloadRequest.setDestinationUri(Uri.fromFile(file)); downloadRequest.setTitle

NsdManager discovery does not work on Android 9

被刻印的时光 ゝ 提交于 2019-12-07 11:29:30
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(serviceType: String?) { println("DEBUG: onDiscoveryStarted $serviceType") } override fun onDiscoveryStopped

Read numbers from the PHONE_STATE intent action android 9 Not working

丶灬走出姿态 提交于 2019-12-07 02:28:33
问题 I was trying to retrieve the phone number from intent extra through onrecieve() method for the following broadcast receiver registered in manifest file. <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> <action android:name="android.intent.action.NEW_OUTGOING_CALL" /> </intent-filter> I can successfully able to read the phone number for all the version except android pie upgraded in my pixel 2 device. According to the documentation, app requires additional permission

Is there an API to detect which theme the OS is using - dark or light (or other)?

只谈情不闲聊 提交于 2019-12-06 21:51:07
问题 Background On recent Android versions, ever since Android 8.1, the OS got more and more support for themes. More specifically dark theme. The problem Even though there is a lot of talk about dark mode in the point-of-view for users, there is almost nothing that's written for developers. What I've found Starting from Android 8.1, Google provided some sort of dark theme . If the user chooses to have a dark wallpaper, some UI components of the OS would turn black (article here). In addition, if

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

天大地大妈咪最大 提交于 2019-12-05 16:15:27
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 = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard

SQLite: No Such Table Error Android P problem

﹥>﹥吖頭↗ 提交于 2019-12-05 12:00:45
Until Android P everything worked fine with my code but now in Android P I'm having a lot of problems working with databases. I have .db sqlite database files stored on assets folder. I was importing them into the database space of android and it worked fine until Android P. In android P I'm getting this exception: SQLite: No Such Table Error I searched here and found this, and I tryed to apply the accepted answer: Android P - 'SQLite: No Such Table Error' after copying database from assets The problem is that now I'm having another problem and It still doesn't works. Now I'm having the

Android P: `NotificationManager.cancel` does not work if user has replied to notification

别等时光非礼了梦想. 提交于 2019-12-04 22:23:11
问题 NotificationManager.cancel(id) no longer clears the notification on Android P, if you have already replied to the notification with text. Is there a way to clear a notification after the user has replied to it in Android P? build.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 27 defaultConfig { applicationId "com.example.notificationnocancel" minSdkVersion 23 targetSdkVersion 25 versionCode 1