Re: [android-developers] how to-Start new activity with also current activity running

2012-09-06 Thread HK
specific.

On Wednesday, September 5, 2012 11:28:28 PM UTC+9, MagouyaWare wrote:
>
> Is "Activity A" a specific activity of a specific app or just any 
> arbitrary activity?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, Sep 5, 2012 at 6:34 AM, Dan >wrote:
>
>> By "not readily" he means that there is no nice public API for
>> "what application has focus", but things that look close (e.g.
>> RunningAppProcessInfo importance sounds close, but requires
>> polling, is slow to update, and refers to scheduler time, not
>> what the user is doing.)   If you want to play non public API
>> games pre-JellyBean you could watch for ActivityManager
>> messages for application start (JellyBean restricts the Log
>> output so you need to be a system app to see it.)
>>
>> The Google company line for not providing such an API seems
>> to range from privacy to performance.  The net result is that
>> if the performance monitoring tools provided (stuff under
>> Settings or dumpsys) don't match your needs precisely, tough
>> luck, you don't get to harness the app developers out there
>> to create something beyond what Google provides.
>>
>> Unless your company has some bizarre change request process,
>> you'll be much happier having activity A do some IPC you can
>> count on.
>>
>>
>> On Tuesday, September 4, 2012 10:24:46 PM UTC-4, HK wrote:
>>>
>>> Yes, Activity A belongs to a different team. I can ask for change 
>>> request if possible.
>>>
>>> 1) But what do you mean by 'not readily' ? is it possible to detect ?
>>>
>>> 2) I was wondering if there was another solution using 
>>> TYPE_SYSTEM_DIALOG which I am guessing if it can be called from a Service 
>>> rather than an Activity. But nobody replied to this post.
>>>
>>> On Wednesday, September 5, 2012 11:18:04 AM UTC+9, Mark Murphy (a 
>>> Commons Guy) wrote:

 On Tue, Sep 4, 2012 at 10:12 PM, HK  wrote: 
 > So,  in Activity A's onPause, is it possible to find which activity 
 is 
 > launched ? i.e., when Activity B is launched, is it possible to find 
 in 
 > Activity A's onPause that Activity B is launched ? 

 Not readily. Moreover, you "do not have much control" over Activity A. 

 -- 
 Mark Murphy (a Commons Guy) 
 http://commonsware.com | http://github.com/commonsguy 
 http://commonsware.com/blog | http://twitter.com/commonsguy 

 Android Training in NYC: 
 http://marakana.com/training/**android/
  

>>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-06 Thread HK
Thanks.

On Wednesday, September 5, 2012 9:34:17 PM UTC+9, Dan wrote:
>
> By "not readily" he means that there is no nice public API for
> "what application has focus", but things that look close (e.g.
> RunningAppProcessInfo importance sounds close, but requires
> polling, is slow to update, and refers to scheduler time, not
> what the user is doing.)   If you want to play non public API
> games pre-JellyBean you could watch for ActivityManager
> messages for application start (JellyBean restricts the Log
> output so you need to be a system app to see it.)
>
> The Google company line for not providing such an API seems
> to range from privacy to performance.  The net result is that
> if the performance monitoring tools provided (stuff under
> Settings or dumpsys) don't match your needs precisely, tough
> luck, you don't get to harness the app developers out there
> to create something beyond what Google provides.
>
> Unless your company has some bizarre change request process,
> you'll be much happier having activity A do some IPC you can
> count on.
>
> On Tuesday, September 4, 2012 10:24:46 PM UTC-4, HK wrote:
>>
>> Yes, Activity A belongs to a different team. I can ask for change request 
>> if possible.
>>
>> 1) But what do you mean by 'not readily' ? is it possible to detect ?
>>
>> 2) I was wondering if there was another solution using TYPE_SYSTEM_DIALOG 
>> which I am guessing if it can be called from a Service rather than an 
>> Activity. But nobody replied to this post.
>>
>> On Wednesday, September 5, 2012 11:18:04 AM UTC+9, Mark Murphy (a Commons 
>> Guy) wrote:
>>>
>>> On Tue, Sep 4, 2012 at 10:12 PM, HK  wrote: 
>>> > So,  in Activity A's onPause, is it possible to find which activity is 
>>> > launched ? i.e., when Activity B is launched, is it possible to find 
>>> in 
>>> > Activity A's onPause that Activity B is launched ? 
>>>
>>> Not readily. Moreover, you "do not have much control" over Activity A. 
>>>
>>> -- 
>>> Mark Murphy (a Commons Guy) 
>>> http://commonsware.com | http://github.com/commonsguy 
>>> http://commonsware.com/blog | http://twitter.com/commonsguy 
>>>
>>> Android Training in NYC: http://marakana.com/training/android/ 
>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-06 Thread HK
Thanks.

On Wednesday, September 5, 2012 9:29:47 PM UTC+9, Mark Murphy (a Commons 
Guy) wrote:
>
> On Tue, Sep 4, 2012 at 10:24 PM, HK > 
> wrote: 
> > Yes, Activity A belongs to a different team. I can ask for change 
> request if 
> > possible. 
>
> If Activity A belongs to a different team, you should be coordinating 
> with them, having them fix their activity so onPause() is not 
> destructive (such as by moving that logic to onStop() so a 
> dialog-themed activity can appear and Activity A can remain visually 
> intact), or by negotiating some sort of broadcast Intent whereby you 
> can let them know that you are taking over the foreground. The 
> onStop() approach, with Activity B being a dialog-themed activity, 
> would seem to be the simplest approach given your description. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.1 Available! 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-05 Thread Justin Anderson
Is "Activity A" a specific activity of a specific app or just any arbitrary
activity?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Sep 5, 2012 at 6:34 AM, Dan  wrote:

> By "not readily" he means that there is no nice public API for
> "what application has focus", but things that look close (e.g.
> RunningAppProcessInfo importance sounds close, but requires
> polling, is slow to update, and refers to scheduler time, not
> what the user is doing.)   If you want to play non public API
> games pre-JellyBean you could watch for ActivityManager
> messages for application start (JellyBean restricts the Log
> output so you need to be a system app to see it.)
>
> The Google company line for not providing such an API seems
> to range from privacy to performance.  The net result is that
> if the performance monitoring tools provided (stuff under
> Settings or dumpsys) don't match your needs precisely, tough
> luck, you don't get to harness the app developers out there
> to create something beyond what Google provides.
>
> Unless your company has some bizarre change request process,
> you'll be much happier having activity A do some IPC you can
> count on.
>
>
> On Tuesday, September 4, 2012 10:24:46 PM UTC-4, HK wrote:
>>
>> Yes, Activity A belongs to a different team. I can ask for change request
>> if possible.
>>
>> 1) But what do you mean by 'not readily' ? is it possible to detect ?
>>
>> 2) I was wondering if there was another solution using TYPE_SYSTEM_DIALOG
>> which I am guessing if it can be called from a Service rather than an
>> Activity. But nobody replied to this post.
>>
>> On Wednesday, September 5, 2012 11:18:04 AM UTC+9, Mark Murphy (a Commons
>> Guy) wrote:
>>>
>>> On Tue, Sep 4, 2012 at 10:12 PM, HK  wrote:
>>> > So,  in Activity A's onPause, is it possible to find which activity is
>>> > launched ? i.e., when Activity B is launched, is it possible to find
>>> in
>>> > Activity A's onPause that Activity B is launched ?
>>>
>>> Not readily. Moreover, you "do not have much control" over Activity A.
>>>
>>> --
>>> Mark Murphy (a Commons Guy)
>>> http://commonsware.com | http://github.com/commonsguy
>>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>>
>>> Android Training in NYC: 
>>> http://marakana.com/training/**android/
>>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-05 Thread Dan
By "not readily" he means that there is no nice public API for
"what application has focus", but things that look close (e.g.
RunningAppProcessInfo importance sounds close, but requires
polling, is slow to update, and refers to scheduler time, not
what the user is doing.)   If you want to play non public API
games pre-JellyBean you could watch for ActivityManager
messages for application start (JellyBean restricts the Log
output so you need to be a system app to see it.)

The Google company line for not providing such an API seems
to range from privacy to performance.  The net result is that
if the performance monitoring tools provided (stuff under
Settings or dumpsys) don't match your needs precisely, tough
luck, you don't get to harness the app developers out there
to create something beyond what Google provides.

Unless your company has some bizarre change request process,
you'll be much happier having activity A do some IPC you can
count on.

On Tuesday, September 4, 2012 10:24:46 PM UTC-4, HK wrote:
>
> Yes, Activity A belongs to a different team. I can ask for change request 
> if possible.
>
> 1) But what do you mean by 'not readily' ? is it possible to detect ?
>
> 2) I was wondering if there was another solution using TYPE_SYSTEM_DIALOG 
> which I am guessing if it can be called from a Service rather than an 
> Activity. But nobody replied to this post.
>
> On Wednesday, September 5, 2012 11:18:04 AM UTC+9, Mark Murphy (a Commons 
> Guy) wrote:
>>
>> On Tue, Sep 4, 2012 at 10:12 PM, HK  wrote: 
>> > So,  in Activity A's onPause, is it possible to find which activity is 
>> > launched ? i.e., when Activity B is launched, is it possible to find in 
>> > Activity A's onPause that Activity B is launched ? 
>>
>> Not readily. Moreover, you "do not have much control" over Activity A. 
>>
>> -- 
>> Mark Murphy (a Commons Guy) 
>> http://commonsware.com | http://github.com/commonsguy 
>> http://commonsware.com/blog | http://twitter.com/commonsguy 
>>
>> Android Training in NYC: http://marakana.com/training/android/ 
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-05 Thread Mark Murphy
On Tue, Sep 4, 2012 at 10:24 PM, HK  wrote:
> Yes, Activity A belongs to a different team. I can ask for change request if
> possible.

If Activity A belongs to a different team, you should be coordinating
with them, having them fix their activity so onPause() is not
destructive (such as by moving that logic to onStop() so a
dialog-themed activity can appear and Activity A can remain visually
intact), or by negotiating some sort of broadcast Intent whereby you
can let them know that you are taking over the foreground. The
onStop() approach, with Activity B being a dialog-themed activity,
would seem to be the simplest approach given your description.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.1 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
Yes, Activity A belongs to a different team. I can ask for change request 
if possible.

1) But what do you mean by 'not readily' ? is it possible to detect ?

2) I was wondering if there was another solution using TYPE_SYSTEM_DIALOG 
which I am guessing if it can be called from a Service rather than an 
Activity. But nobody replied to this post.

On Wednesday, September 5, 2012 11:18:04 AM UTC+9, Mark Murphy (a Commons 
Guy) wrote:
>
> On Tue, Sep 4, 2012 at 10:12 PM, HK > 
> wrote: 
> > So,  in Activity A's onPause, is it possible to find which activity is 
> > launched ? i.e., when Activity B is launched, is it possible to find in 
> > Activity A's onPause that Activity B is launched ? 
>
> Not readily. Moreover, you "do not have much control" over Activity A. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Android Training in NYC: http://marakana.com/training/android/ 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread Mark Murphy
On Tue, Sep 4, 2012 at 10:12 PM, HK  wrote:
> So,  in Activity A's onPause, is it possible to find which activity is
> launched ? i.e., when Activity B is launched, is it possible to find in
> Activity A's onPause that Activity B is launched ?

Not readily. Moreover, you "do not have much control" over Activity A.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
Ok.

So,  in Activity A's onPause, is it possible to find which activity is 
launched ? i.e., when Activity B is launched, is it possible to find in 
Activity A's onPause that Activity B is launched ?

On Wednesday, September 5, 2012 10:40:34 AM UTC+9, Mark Murphy (a Commons 
Guy) wrote:
>
> On Tue, Sep 4, 2012 at 9:29 PM, HK > 
> wrote: 
> > The behavior I am looking for which I think not supported by Android: 
> > Activity A is running which I do not have much control, it doesn't 
> belong to 
> > me. 
> > I start Activity B whose only purpose is to display some dialogs. When I 
> > start Activity B, Activity A's onPause is called and this onPause draws 
> the 
> > screen blank. 
> > So I was expecting some solution where Activity A's onPause is not 
> called. I 
> > know this is not normally possible with Android's concept, so I was 
> hoping 
> > if some developers in this forum has some tweaks. 
>
> Sorry, but onPause() is always called if some other activity takes 
> over the foreground. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Android Training in NYC: http://marakana.com/training/android/ 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread Mark Murphy
On Tue, Sep 4, 2012 at 9:29 PM, HK  wrote:
> The behavior I am looking for which I think not supported by Android:
> Activity A is running which I do not have much control, it doesn't belong to
> me.
> I start Activity B whose only purpose is to display some dialogs. When I
> start Activity B, Activity A's onPause is called and this onPause draws the
> screen blank.
> So I was expecting some solution where Activity A's onPause is not called. I
> know this is not normally possible with Android's concept, so I was hoping
> if some developers in this forum has some tweaks.

Sorry, but onPause() is always called if some other activity takes
over the foreground.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
Justin,

The behavior I am looking for which I think not supported by Android:
Activity A is running which I do not have much control, it doesn't belong 
to me.
I start Activity B whose only purpose is to display some dialogs. When I 
start Activity B, Activity A's onPause is called and this onPause draws the 
screen blank.
So I was expecting some solution where Activity A's onPause is not called. 
I know this is not normally possible with Android's concept, so I was 
hoping if some developers in this forum has some tweaks.
thanks.

On Wednesday, September 5, 2012 6:23:51 AM UTC+9, MagouyaWare wrote:
>
> I have an app that has an effect similar to what you are trying to 
> accomplish (I think)...
>
> If you take a look at AppSwipe! in the Google Play Store you will see that 
> I do not get a black background... AppSwipe! runs as an activity that has a 
> transparent background.
>
> https://play.google.com/store/apps/details?id=com.magouyaware.appswipe
>
> Is this what you are trying to implement?  If so, then it has absolutely 
> nothing to do with whether or not onPause() gets called on the activity in 
> the background.  If this is not what you are trying to do, then please 
> clarify...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Tue, Sep 4, 2012 at 10:14 AM, TreKing 
> > wrote:
>
>> On Tue, Sep 4, 2012 at 1:28 AM, HK > >wrote:
>>
>>> My activity B is started from a service and is only meant for Alert 
>>> dialogs and nothing else. So I don't want activity A to go into onPause and 
>>> show background black.
>>
>>
>> If you start some Activity B after another Activity A, A's onPause will 
>> be called. That is how Android works. If you don't want this behavior, then 
>> don't start another Activity.
>>
>>
>>
>> -
>> TreKing  - Chicago 
>> transit tracking app for Android-powered devices
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread Justin Anderson
I have an app that has an effect similar to what you are trying to
accomplish (I think)...

If you take a look at AppSwipe! in the Google Play Store you will see that
I do not get a black background... AppSwipe! runs as an activity that has a
transparent background.

https://play.google.com/store/apps/details?id=com.magouyaware.appswipe

Is this what you are trying to implement?  If so, then it has absolutely
nothing to do with whether or not onPause() gets called on the activity in
the background.  If this is not what you are trying to do, then please
clarify...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Sep 4, 2012 at 10:14 AM, TreKing  wrote:

> On Tue, Sep 4, 2012 at 1:28 AM, HK  wrote:
>
>> My activity B is started from a service and is only meant for Alert
>> dialogs and nothing else. So I don't want activity A to go into onPause and
>> show background black.
>
>
> If you start some Activity B after another Activity A, A's onPause will be
> called. That is how Android works. If you don't want this behavior, then
> don't start another Activity.
>
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread TreKing
On Tue, Sep 4, 2012 at 1:28 AM, HK  wrote:

> My activity B is started from a service and is only meant for Alert
> dialogs and nothing else. So I don't want activity A to go into onPause and
> show background black.


If you start some Activity B after another Activity A, A's onPause will be
called. That is how Android works. If you don't want this behavior, then
don't start another Activity.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread skink


HK wrote:
> I have mentioned this above. Please see above threads. This is the whole
> point of discussion in this post: how to avoid onPause getting called on
> activity A!
>



no, this is not a point: you cannot avoid that

black screen comes from activity B, that is a point

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
I have mentioned this above. Please see above threads. This is the whole 
point of discussion in this post: how to avoid onPause getting called on 
activity A!

On Tuesday, September 4, 2012 7:00:55 PM UTC+9, skink wrote:
>
>
>
> HK wrote: 
> > onPause of Activity A will be called. 
> > 
>
>
> so what? 
> this is what onPause is for... 
>
> whats your exact problem with onPause being called? 
>
> pskink 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread skink


HK wrote:
> onPause of Activity A will be called.
>


so what?
this is what onPause is for...

whats your exact problem with onPause being called?

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
onPause of Activity A will be called.

On Tuesday, September 4, 2012 6:34:27 PM UTC+9, skink wrote:
>
>
>
> HK wrote: 
> > Yes, it set in Androidmanifiest.xml: 
> > android:theme="@android:style/Theme.DeviceDefault.Dialog". 
> > 
> > But this doesn't work. 
> > 
> > 
>
> what doesn't work? 
>
> pskink 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread Parthi K
exactly wt s your ??

On Tue, Sep 4, 2012 at 3:02 PM, skink  wrote:

>
>
> HK wrote:
> > Yes, it set in Androidmanifiest.xml:
> > android:theme="@android:style/Theme.DeviceDefault.Dialog".
> >
> > But this doesn't work.
> >
> >
>
> what doesn't work?
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread skink


HK wrote:
> Yes, it set in Androidmanifiest.xml:
> android:theme="@android:style/Theme.DeviceDefault.Dialog".
>
> But this doesn't work.
>
>

what doesn't work?

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
Yes, it set in Androidmanifiest.xml:
android:theme="@android:style/Theme.DeviceDefault.Dialog".

But this doesn't work.

On Tuesday, September 4, 2012 4:29:42 PM UTC+9, skink wrote:
>
>
>
> HK wrote: 
> > I have tried all these. But all these will call onPause of activity A. 
> > thanks. 
> > 
>
> did you try to set the style of activity B to Theme.Dialog? 
>
> pskink 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread skink


HK wrote:
> I have tried all these. But all these will call onPause of activity A.
> thanks.
>

did you try to set the style of activity B to Theme.Dialog?

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread HK
I have tried all these. But all these will call onPause of activity A.
thanks.

On Tuesday, September 4, 2012 4:13:56 PM UTC+9, skink wrote:
>
>
>
> HK wrote: 
> > Because, I don't want onPause to be called of the current running 
> activity. 
> > This will show background black. 
> > My activity B is started from a service and is only meant for Alert 
> dialogs 
> > and nothing else. So I don't want activity A to go into onPause and show 
> > background black. 
> > 
>
> i am not sure if this is what you want but but what about this: 
>
> you can use the 
> Dialog theme and make your 
> Activity appear like a dialog 
> box: 
>  
> Or if you want the 
> background to be 
> transparent, use the 
> Translucent theme: 
>  
>
> pskink 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-04 Thread skink


HK wrote:
> Because, I don't want onPause to be called of the current running activity.
> This will show background black.
> My activity B is started from a service and is only meant for Alert dialogs
> and nothing else. So I don't want activity A to go into onPause and show
> background black.
>

i am not sure if this is what you want but but what about this:

you can use the
Dialog theme and make your
Activity appear like a dialog
box:

Or if you want the
background to be
transparent, use the
Translucent theme:


pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread HK
I think you mean:
popup.getWindow().setBackgroundDrawable(new 
ColorDrawable(android.graphics.Color.TRANSPARENT));

I have tried this, but it doesn't work.
thanks.

On Tuesday, September 4, 2012 3:18:37 PM UTC+9, MagouyaWare wrote:
>
> I have activity A running. I want to start my new activity B so that 
>> activity A is also running. Is this possible ?
>>
>> Normally, when activity B is started, activity A is put on hold and 
>> onPause is called. I don't want this to happen. But instead I want activity 
>> A running normally and on top activity B running.
>>
>> I don't have control over activity A. And activity B is only for 
>> displaying Alert dialogs.
>>
>> Is this possible in Android ?
>>
>
> Sorry, I don't think this is possible... Actually I just thought of a 
> scenario where it might be possible.  If you make Activity B have a 
> trasparent (or semi-transparent) background then onPause() might not get 
> called.  I have not verified that is the case, but you could try it and see.
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Mon, Sep 3, 2012 at 11:59 PM, HK  >wrote:
>
>> Hi Jugni,
>>
>> Yes, I know. That's the reason  I am asking if its possible.
>>
>> As I mentioned, I don't have control over Activity A, only B. Activity A 
>> doesn't belong to me. My activity is activity B.
>>
>> I didn't understand 'use class file'. Can you please explain in detail ?
>>
>> thanks.
>>
>>
>> On Tuesday, September 4, 2012 2:33:33 PM UTC+9, jugni wrote:
>>>
>>> Hello HK,
>>>
>>> If you know the android life cycle then you may know that when we go to 
>>> next activity then first activity should be on pause.So if you want the 
>>> alert dialog then you can also show in the same activity.So why you create 
>>> the new activity.Or if you want to handle different dialog thenuse the 
>>> class file and then just call the class file from activity so activity will 
>>> be running and alert dialog also popup.
>>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread HK
Because, I don't want onPause to be called of the current running activity. 
This will show background black.
My activity B is started from a service and is only meant for Alert dialogs 
and nothing else. So I don't want activity A to go into onPause and show 
background black.

On Tuesday, September 4, 2012 3:16:57 PM UTC+9, TreKing wrote:
>
> On Tue, Sep 4, 2012 at 1:26 AM, HK >wrote:
>
>> Normally, when activity B is started, activity A is put on hold and 
>> onPause is called. I don't want this to happen. 
>
>
> And why not ... ?
>
>
> -
> TreKing  - Chicago 
> transit tracking app for Android-powered devices
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread Justin Anderson
>
> I have activity A running. I want to start my new activity B so that
> activity A is also running. Is this possible ?
>
> Normally, when activity B is started, activity A is put on hold and
> onPause is called. I don't want this to happen. But instead I want activity
> A running normally and on top activity B running.
>
> I don't have control over activity A. And activity B is only for
> displaying Alert dialogs.
>
> Is this possible in Android ?
>

Sorry, I don't think this is possible... Actually I just thought of a
scenario where it might be possible.  If you make Activity B have a
trasparent (or semi-transparent) background then onPause() might not get
called.  I have not verified that is the case, but you could try it and see.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Mon, Sep 3, 2012 at 11:59 PM, HK  wrote:

> Hi Jugni,
>
> Yes, I know. That's the reason  I am asking if its possible.
>
> As I mentioned, I don't have control over Activity A, only B. Activity A
> doesn't belong to me. My activity is activity B.
>
> I didn't understand 'use class file'. Can you please explain in detail ?
>
> thanks.
>
>
> On Tuesday, September 4, 2012 2:33:33 PM UTC+9, jugni wrote:
>>
>> Hello HK,
>>
>> If you know the android life cycle then you may know that when we go to
>> next activity then first activity should be on pause.So if you want the
>> alert dialog then you can also show in the same activity.So why you create
>> the new activity.Or if you want to handle different dialog thenuse the
>> class file and then just call the class file from activity so activity will
>> be running and alert dialog also popup.
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread TreKing
On Tue, Sep 4, 2012 at 1:26 AM, HK  wrote:

> Normally, when activity B is started, activity A is put on hold and
> onPause is called. I don't want this to happen.


And why not ... ?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread HK
Hi Jugni,

Yes, I know. That's the reason  I am asking if its possible.

As I mentioned, I don't have control over Activity A, only B. Activity A 
doesn't belong to me. My activity is activity B.

I didn't understand 'use class file'. Can you please explain in detail ?

thanks.

On Tuesday, September 4, 2012 2:33:33 PM UTC+9, jugni wrote:
>
> Hello HK,
>
> If you know the android life cycle then you may know that when we go to 
> next activity then first activity should be on pause.So if you want the 
> alert dialog then you can also show in the same activity.So why you create 
> the new activity.Or if you want to handle different dialog thenuse the 
> class file and then just call the class file from activity so activity will 
> be running and alert dialog also popup.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread HK
As I mentioned, I don't have control over A, only B.
I don't want A's onPause called when B is started.
I didn't understand your second bullet:
  "or try to read and do about intent and apply it..."

thanks.

On Tuesday, September 4, 2012 2:31:18 PM UTC+9, Ibrahim wrote:
>
>
>- if you want to run activity B then do intent on A..
>-   or try to read and do about intent and apply it...
>
>
> On 4 September 2012 10:56, HK > wrote:
>
>> Hi,
>>
>> I have activity A running. I want to start my new activity B so that 
>> activity A is also running. Is this possible ?
>>
>> Normally, when activity B is started, activity A is put on hold and 
>> onPause is called. I don't want this to happen. But instead I want activity 
>> A running normally and on top activity B running.
>>
>> I don't have control over activity A. And activity B is only for 
>> displaying Alert dialogs.
>>
>> Is this possible in Android ?
>>
>> thank you.
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread jagruti sangani
Hello HK,

If you know the android life cycle then you may know that when we go to
next activity then first activity should be on pause.So if you want the
alert dialog then you can also show in the same activity.So why you create
the new activity.Or if you want to handle different dialog thenuse the
class file and then just call the class file from activity so activity will
be running and alert dialog also popup.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to-Start new activity with also current activity running

2012-09-03 Thread Ibrahim Sada
   - if you want to run activity B then do intent on A..
   -   or try to read and do about intent and apply it...


On 4 September 2012 10:56, HK  wrote:

> Hi,
>
> I have activity A running. I want to start my new activity B so that
> activity A is also running. Is this possible ?
>
> Normally, when activity B is started, activity A is put on hold and
> onPause is called. I don't want this to happen. But instead I want activity
> A running normally and on top activity B running.
>
> I don't have control over activity A. And activity B is only for
> displaying Alert dialogs.
>
> Is this possible in Android ?
>
> thank you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en