android-7.0-nougat

Programmatically open app in split screen

时光总嘲笑我的痴心妄想 提交于 2021-02-18 19:19:21
问题 How do I open another app in a split screen in the android N (SDK 24)? In the documentation I found this: Launch New Activities in Multi-Window Mode When you launch a new activity, you can hint to the system that the new activity should be displayed adjacent to the current one, if possible. To do this, use the flag Intent.FLAG_ACTIVITY_LAUNCH_TO_ADJACENT. Passing this flag requests the following behaviour: If the device is in split-screen mode, the system attempts to create the new activity

Programmatically open app in split screen

笑着哭i 提交于 2021-02-18 19:19:12
问题 How do I open another app in a split screen in the android N (SDK 24)? In the documentation I found this: Launch New Activities in Multi-Window Mode When you launch a new activity, you can hint to the system that the new activity should be displayed adjacent to the current one, if possible. To do this, use the flag Intent.FLAG_ACTIVITY_LAUNCH_TO_ADJACENT. Passing this flag requests the following behaviour: If the device is in split-screen mode, the system attempts to create the new activity

WebView language error Android N

不羁岁月 提交于 2021-02-08 07:57:21
问题 I am aware of this question asked before about the WebView being broken in Android N especially with localization. I have another problem which I cannot figure out how to fix. As shown in pic, I have two languages set on my Pixel device running 7.1.1. Now, I'm trying to load the following url in a WebView in my app. "https://accounts.google.com/ServiceLogin?<my-params>" What I notice is that the page loads in Chinese instead of English which is my current Locale language. I tried opening the

Broadcast receiver for nought and Oreo + devices not working

青春壹個敷衍的年華 提交于 2021-01-27 18:22:34
问题 public class ScreenReceiver extends BroadcastReceiver { private boolean screenOff; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { screenOff = true; } else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { screenOff = false; } } <receiver android:name=".ScreenReceiver" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> <action android

Android 7.0 showing TextView Inflating error

[亡魂溺海] 提交于 2020-07-10 05:56:11
问题 My XML CODE:- <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp"> <TextView android:id="@+id/tvCollege" android:layout_width="wrap_content" android:layout_height="wrap_content"

Android 7.0 showing TextView Inflating error

点点圈 提交于 2020-07-10 05:56:07
问题 My XML CODE:- <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp"> <TextView android:id="@+id/tvCollege" android:layout_width="wrap_content" android:layout_height="wrap_content"

DialogFragment buttons pushed off screen API 24 and above

痞子三分冷 提交于 2020-04-11 18:34:11
问题 I am making a custom DialogFragment that displays a selectable list of data. The list is too long to fit on the screen without scrolling. For up to API 23, everything seems to work fine, but when I test on API 24+, the DialogFragment's button's are no longer visible. I looked at Missing buttons on AlertDialog | Android 7.0 (Nexus 5x), but that doesn't seem to apply because my buttons do show up when I reduce the amount of content in the list so that it all fits on the screen. How can I make

Job scheduler in android nougat is not running

六月ゝ 毕业季﹏ 提交于 2020-01-25 07:18:42
问题 I am trying to make job scheduler run after every 3 seconds but it doesnt work on android noughat. Here is my code. mJobScheduler = (JobScheduler) getSystemService( Context.JOB_SCHEDULER_SERVICE ); JobInfo.Builder builder = new JobInfo.Builder( 1, new ComponentName( getPackageName(), JobSchedulerService.class.getName() ) ); builder.setPeriodic(3000); builder.setRequiresDeviceIdle(false); builder.setPersisted(true); JobInfo j=builder.build(); mJobScheduler.schedule(j); Job Scheduling service

Job scheduler in android nougat is not running

假装没事ソ 提交于 2020-01-25 07:18:31
问题 I am trying to make job scheduler run after every 3 seconds but it doesnt work on android noughat. Here is my code. mJobScheduler = (JobScheduler) getSystemService( Context.JOB_SCHEDULER_SERVICE ); JobInfo.Builder builder = new JobInfo.Builder( 1, new ComponentName( getPackageName(), JobSchedulerService.class.getName() ) ); builder.setPeriodic(3000); builder.setRequiresDeviceIdle(false); builder.setPersisted(true); JobInfo j=builder.build(); mJobScheduler.schedule(j); Job Scheduling service

TelephonyManager's PhoneStateListener is not called on Nougat

只愿长相守 提交于 2020-01-23 11:11:48
问题 I have made a sample app and the PhoneStateListener TelephonyManager telephony = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); //TelephonyManager object telephony.listen(new PhoneStateListener() { @Override public void onCallStateChanged(int state, String incomingNumber) { Log.i("brian", "call state = " + state + " incoming number " + incomingNumber); switch (state) { case TelephonyManager.CALL_STATE_IDLE: break; case TelephonyManager.CALL_STATE_RINGING: break; case