Category : android-8.0-oreo

I am integrating google smart lock in my android application but in some devices i am getting this error when trying to save credentials to google. I am using following code to save credentials – Credential credential = new Credential.Builder(email) .setPassword(password) .build(); saveCredentials(credential); After search on google for this solution found that need to disable ..

Read more

I’m facing similar problem mentioned here in this SO post. Have notification channel got created something like this, NotificationChannel channel = new NotificationChannel(CHANNEL_ID_FOOBAR, getContext().getString(R.string.notification_channel_foobar), NotificationManager.IMPORTANCE_DEFAULT); notificationManager.createNotificationChannel(channel); The string used as channel name R.string.notification_channel_foobar is not getting reflected with appropriate locale string when keyboard language gets changed. The suggested solution is to listen for ACTION_LOCALE_CHANGED and ..

Read more

I am trying to edit the way a child divider is drawn in the ExpandableListView class for Android. My reasons for this objective are as follows: I would like to shorten child divider length and height. As of now, the child drawable file looks like this <?xml version="1.0" encoding="utf-8"?> <inset xmlns:android="http://schemas.android.com/apk/res/android" android:insetLeft="@dimen/main_activity_nav_drawer_child_margin_left" android:insetTop="2dp"> <shape android:shape="rectangle" ..

Read more

I want to convert android view to image file and save it to internal storage in Android Oreo device. But my following code is not working. Here is XML code:- <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:id="@+id/layout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="20dp" android:background="@color/teal_200" android:gravity="center" android:orientation="horizontal" app:layout_constraintBottom_toTopOf="@+id/btnSaveID" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" ..

Read more

I am trying to encrypt (and decrypt) some sensitive files on Android using AES/GCM/NoPadding with a 256-byte key held in the Android Key Store and on Android 8, if I use a byte buffer larger than 4072 bytes, the encryption fails every time with the following crytic exception Caused by: javax.crypto.IllegalBlockSizeException at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:491) at javax.crypto.Cipher.doFinal(Cipher.java:1619) ..

Read more

I did implement a notification feature in android using the Notification.Builder in Android OREO+. I need to cancel the notification after a certain time frame, if the user has not clicked on the notification. which i completed using the setTimeOutAfter method. https://developer.android.com/reference/android/app/Notification.Builder.html#setTimeoutAfter(long). Now, i need to send a message to server that the notification wasn’t ..

Read more

There are number of channel registered on the notification channel. When user checks the minimize notification function, only notification from the minimized channel should be disapeared. But currerntly the issue is that when a user checks the minimized notification function, the already existing normal notification and minimized notificiation will disapper. I want it to be ..

Read more