Hi , Thanks for your valuable suggestions. Actually we want to know if it is possible using launch modes and task affinities basically without changing the System Image.
We want to place our application over other applications, while keeping the background application working as normal. Please note our application may not be full screen. Thus this also creates another problematic scenario:- Our android activity stack is having following activity A, B, C. The order in which the activities have opened is : C->B->A (with A on top of the stack). And activity B, C are full screen but A is not full screen. Now we close activity B by clicking a close button in Activity B which finishes the activity (Note activity B is visible as A is not full screen). Expected behavior :- Activity C and Activity A should be visible. That is Activity Stack is A, C (with activity A on top). But this not the behavior that is shown. Actual Behavior happening :- On closing activity B we see a black screen with activity A on top. Note : Our constraint is that we can't change system image. Thanks , Ankit On Jul 29, 12:54 pm, firstName lastName <[email protected]> wrote: > Try SYSTEM_ALERT_WINDOW > <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> > > Create a service and in the service, > > WindowManager mWindowManager = > (WindowManager)getSystemService(WINDOW_SERVICE); > > LayoutInflater inflater = > (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); > mTopView = (ViewGroup) inflater.inflate(R.layout.top_view, null); > > WindowManager.LayoutParams mWmlp = new > WindowManager.LayoutParams(LayoutParams.FILL_PARENT, > LayoutParams.FILL_PARENT); > mWmlp.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | > WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; > mWmlp.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; > mWmlp.width = 300; > mWmlp.height = 200; > mWmlp.format = PixelFormat.TRANSPARENT; > mWmlp.x = 0; > mWmlp.y = 0; //will be in the center of screen > mWindowManager.addView(mTopView, mWmlp); > > On Fri, Jul 29, 2011 at 3:44 PM, Dianne Hackborn <[email protected]>wrote: > > > What I am saying is you shouldn't use an activity, you should go modify the > > SystemUI code to introduce your window there in the same way the status bar > > is done. > > > On Thu, Jul 28, 2011 at 10:37 PM, trickybit <[email protected]> wrote: > > >> Is there a way for an activity to specify the type of its main window, > >> in time for it to matter? > > >> Thanks > > >> On Jul 28, 12:11 pm, Dianne Hackborn <[email protected]> wrote: > >> > I suggest looking at the SystemUI process > >> > (frameworks/base/packages/SystemUI), which is responsible for showing > >> the > >> > status bar and extending as desired. > > >> > First question you will need to answer is what layer your UI goes in to: > >> > above everything including the lock screen, above the system bar / > >> > notifications, above toasts, just above apps. It is likely you will > >> need to > >> > define a new private window type with its own layer (assigned in > >> > PhoneWindowManager) to get it z-ordered where you want. > > >> > On Thu, Jul 28, 2011 at 1:32 AM, Ankit <[email protected]> wrote: > >> > > Hi , > >> > > I want to keep my application ( Application A ) on the top always in > >> > > Android. Application A is not a full screen application, it is a > >> > > floating window or dialog theme based application. The Application A > >> > > can launch other application.\ from its own UI portion also other > >> > > applications can be launched from background from Home screen > >> > > shortcut / Application Launcher screen. > >> > > How can we do it? > > >> > > Also the application which are in the background with Application A on > >> > > top should work normally. e.g. it can Launch other activities (of it > >> > > own own or some other application), dialog etc. > > >> > > Second doubt/ requirement is - Activity Y is below Activity X, > >> > > Activity X is below Activity A (of Application A) . Activity X has a > >> > > close/exit button which would finish its own activity X. Now when that > >> > > button is pressed the activity get closed but leaves a black screen > >> > > below activity A. > > >> > > Why does this happen (i think may be because it requires the Back > >> > > stack to be rearranged) and is their a turn around way of being able > >> > > to do this. > > >> > > If any application in the background launches another activity/ > >> > > application then also my application ( Application A ) should come at > >> > > the top of the launched activity/application. > > >> > > Thanks , > >> > > Ankit > > >> > > -- > >> > > You received this message because you are subscribed to the Google > >> > > Groups "Android Developers" group. > >> > > To post to this group, send email to > >> [email protected] > >> > > To unsubscribe from this group, send email to > >> > > [email protected] > >> > > For more options, visit this group at > >> > >http://groups.google.com/group/android-developers?hl=en > > >> > -- > >> > Dianne Hackborn > >> > Android framework engineer > >> > [email protected] > > >> > Note: please don't send private questions to me, as I don't have time to > >> > provide private support, and so won't reply to such e-mails. All such > >> > questions should be posted on public forums, where I and others can see > >> and > >> > answer them. > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email to [email protected] > >> To unsubscribe from this group, send email to > >> [email protected] > >> For more options, visit this group at > >>http://groups.google.com/group/android-developers?hl=en > > > -- > > Dianne Hackborn > > Android framework engineer > > [email protected] > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see and > > answer them. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

