taskaffinity

Not Working corss-application activities with taskAffinity in Android 11

一笑奈何 提交于 2021-01-28 20:24:49
问题 I have two application, App A and App B, now I want to start an activity in App B from App A, the launchmode of this Activity is “singleTask”. The order: Activity X (App A) ———> Activity Y (App B) ———> Activity Z (App B, launchMode=“singleTask”) As default AndroidManifest config, there will be two App shown in the Task Manager, I hope users can only see App A label in Task Manager, so when they switch between tasks they don’t click App B. Before Android 11(Android R), I use the attribute

android 4.4.X: taskAffinity & launchmode vs. Activity lifecycle

怎甘沉沦 提交于 2019-12-04 10:46:07
问题 I developed a simple application, which demostrates some strange behaviour on Android 4.4.X devices I noticed. Lets say I want to have 2 "main" activities, where the first says "Hello" (by starting 'HelloActivity') every second time it is resumed and the second one has android:launchMode="singleTask" android:taskAffinity=".MyAffinity" defined. Second one is started by the first one. My Code Manifest is pretty simple: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />

android 4.4.X: taskAffinity & launchmode vs. Activity lifecycle

被刻印的时光 ゝ 提交于 2019-12-03 06:26:45
I developed a simple application, which demostrates some strange behaviour on Android 4.4.X devices I noticed. Lets say I want to have 2 "main" activities, where the first says "Hello" (by starting 'HelloActivity') every second time it is resumed and the second one has android:launchMode="singleTask" android:taskAffinity=".MyAffinity" defined. Second one is started by the first one. My Code Manifest is pretty simple: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style

setting cpu affinity of a process from the start on linux

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 23:11:59
问题 I want to set the cpu affinity of a process on linux when it is starting. There are methods like sched_setaffinity and taskset, but they need the processid of the process. They may cause potential migration like a process was started on a core but after the use of sched_setaffinity/taskset, they were migrated to another core. What I want to do is to start a new process on a specific core from the beginning. 回答1: taskset can be used both to set the affinity of a running process or to launch a

Android launch an activity from a broadcast receiver

拥有回忆 提交于 2019-11-28 05:57:31
问题 I know it may not be best practice but this is what i want to do. When my broadcast receiver is called - start a new activity which has is not fullscreen and has a transparent background - which opens on top of your current activity / desktop wallpaper. The code I have so far is as follows: I create + call a new activity with : Intent testActivityIntent = new Intent(context, com.andy.tabletsms.work.SMSPopup.class); testActivityIntent.putExtra("com.andy.tabletsms.message", main.msgs.get(i));

Android Task Affinity Explanation

旧巷老猫 提交于 2019-11-27 10:26:51
What exactly is the attribute taskAffinity used for? I have gone through the documentation but I couldn't understand much. Can anyone explain task affinity in laymans terms? What is Android Task Affinity used for? An android application has Activities that form a stack like a deck of cards. If you start an android application, and start five activities A,B,C,D,E. They will form a stack E - chat view D - weather screen C - map view B - weather screen A - login screen E was the last Activity to be started and it is showing. If you close E, D will be shown. If you close D, C will be shown. etc.

Android Task Affinity Explanation

怎甘沉沦 提交于 2019-11-26 12:51:53
问题 What exactly is the attribute taskAffinity used for? I have gone through the documentation but I couldn\'t understand much. Can anyone explain task affinity in laymans terms? 回答1: What is Android Task Affinity used for? An android application has Activities that form a stack like a deck of cards. If you start an android application, and start five activities A,B,C,D,E. They will form a stack E - chat view D - weather screen C - map view B - weather screen A - login screen E was the last