android-8.0-oreo

Unable to change language in Oreo

大兔子大兔子 提交于 2019-11-30 20:35:51
I'm trying to use Arabic and English in my app. Its working fine on devices running on nougat or below. But it's not working on oreo devices. Is there some new code requirement in API 26? I am using the Code below. public void changeLanguage(Context context, String language) { Locale locale = new Locale(language); Locale.setDefault(locale); Configuration config = context.getResources().getConfiguration(); config.setLocale(locale); context.createConfigurationContext(config); context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics()); } and I'm passing "en"

android.permission.ANSWER_PHONE_CALLS How I can use? for auto answer

强颜欢笑 提交于 2019-11-30 19:58:30
问题 As per android developer documentation Android 8.0 (API level 26) introduces several new permissions related to telephony: The ANSWER_PHONE_CALLS permission allows your app to answer incoming phone calls programmatically. To handle an incoming phone call in your app, you can use the acceptRingingCall() method. How my app give voice answer to incoming call ? but I have not found any guide or examples about of this . so I want automatic answer with voice(from raw folder in app) (I have need

Can't change the language of my app with Oreo android

本小妞迷上赌 提交于 2019-11-30 19:13:23
问题 (EDIT) I used a solution for locale change to change the language of my app and it is not working in oreo. It's working perfectly on my samsung S4, but not on my S9. So I am doing the locale change like this: public void initAppLanguages(Context context, String lang){ PreferenceUtil.setSelectedLanguageId(lang); LocaleUtils.setLocale(context, lang ); MyApplication.reouvrir=1; Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName()); this

Background execution not allowed. Android O pendingintent

一世执手 提交于 2019-11-30 19:07:42
I have a service that schedules a pendingintent which starts my notification. However, since Android O I am getting this error. I did some research, and stumbled upon context.registerReceiver , but that does not seem to fix the problem. Error: W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:my.great.package flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher ``` My pendingintent: Intent myNotification = new Intent("services

Getting crash on JobIntentService onComplete

隐身守侯 提交于 2019-11-30 17:22:03
问题 I am getting following crash reports for Android 8, but I could not find a reason or fix for this: java.lang.IllegalArgumentException: Given work is not active: JobWorkItem{id=1 intent=Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.xxx.android cmp=com.xxx.android/com.pushio.manager.PushIOGCMIntentService (has extras) } dcount=1} at android.app.job.JobParameters.completeWork(JobParameters.java:221) at android.support.v4.app.JobIntentService$JobServiceEngineImpl

How to use Calligraphy with multi-language support Oreo

旧城冷巷雨未停 提交于 2019-11-30 15:17:11
I'm developing an app that need to support multiple languages and if the language is RTL I have to apply a custom font. For the requirement I have created my Class that extends Application . Everything was perfect till I got Oreo version device (Before I have Marshmellow enabled device). In Oreo if we want to change the language we have to create a custom ContextWrapper class, here problem come in. To use Calligraphy we need to Override the attachBaseContext method. And To change language we need to Override the attachBaseContext too I tried to call super.attachBaseContext in the Overrided

How long is the “JobService execution time limit” mentioned in Android's JobIntentService docs?

◇◆丶佛笑我妖孽 提交于 2019-11-30 13:17:48
While converting an app to be ready for Android Oreo, I read the docs on JobIntentService over here . In there I find (important part emphasised): When running as a pre-O service, the normal service execution semantics apply: [...] When running as a Job, the typical JobService execution time limit will apply, after which the job will be stopped (cleanly, not by killing the process) and rescheduled to continue its execution later. If I look at the documented limitations there is no word about any execution time limits. Also JobScheduler does not mention anything . Is this a time limit I should

tgkill - native error on Android 8.0 Samsung S8

最后都变了- 提交于 2019-11-30 12:08:20
Recently I started getting Android native crashes (reported in Google Play vitals). They happen only on Samsung Galaxy S8 or S8+ phones with Android 8. According to the stack trace it is related to the UI renderer thread. However I don't know how to fix it or even where exactly in the app does it happen. Any idea how to find out where in the app does this happen? And why only Galaxy S8 with Android 8 are affected? Thanks. backtrace: #00 pc 0000000000071854 /system/lib64/libc.so (tgkill+8) #01 pc 000000000001e058 /system/lib64/libc.so (abort+88) #02 pc 0000000000008248 /system/lib64/liblog.so (

Android Oreo Notification Crashes System UI

爱⌒轻易说出口 提交于 2019-11-30 11:43:20
I've managed to get notifications working in older API's, but not Oreo. Creating the notification causes my app to still work fine (no messages in logcat), however SystemUI crashes and reboots in an endless cycle while the Activity is running. The is the error in logcat for the systemui process: java.lang.IllegalArgumentException: width and height must be > 0 My code: private void showPlayingNotification() { NotificationCompat.Builder builder = mNotificationUtils.getAndroidChannelNotification(this, "Play", mMediaSessionCompat); if( builder == null ) { Log.i("Play Notification","No notification

AlarmManager and Notifications in Android 8.0(Oreo)

时光毁灭记忆、已成空白 提交于 2019-11-30 09:41:34
问题 In my app i have a alarm that is repeting every thursday, i am using AlarmManger, everything is working fine in all previous versions of android, but now with android 8.0(oreo), the alarm Isn't firing, below is the classes that i use to set my alarm. From what i searched i need to set the alarm explicitly, but I dont understand how. MainActivity: try { Intent alarmIntent = new Intent(this, typeof(AlarmReceiver)); PendingIntent pending = PendingIntent.GetBroadcast(this, 0, alarmIntent,