[android-developers] Target activity Launchmode - singleTask

2012-03-13 Thread rk
Hi,

The scenario is, my application constructs an intent and uses
startActivityForResult() to launch target activity from third-party-
application,

Sometimes Third party applications declare the target activity's
launch-mode as singleTask, due to this setting, my application
receives cancel-result as per documentation, but user can see the
target activity and select an item(which is supposed to be returned
and utilised in my application).

When user press back-button, my activity/application wont get any
data, as it has already received cancel-result, due to singleTask
launchmode of target activity.
At this point user feels, that my application is not processing the
data passed from target activity (I feel its pretty bad user
experience).

Is there any API/work around to know the target Activites lauchnmode,
so that I can avoid calling target actitvity and display an error
message to user.
Is there any flag/configuration that overrides target activity's
launchmode ie singeltask?

Thanks
Rk

-- 
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] Target activity Launchmode - singleTask

2012-03-13 Thread Marcin Orlowski

 Is there any API/work around to know the target Activites lauchnmode,
 so that I can avoid calling target actitvity and display an error
 message to user.


You may need to write your own chooser (if you use it) and then use
PackageManager to find that out and filter out apps that you do not want
user to call. Alternatively, depending on what apps you call for results, I
believe it might be also suitable to check for presence of certain packages
on user device and warn him about described problem in advance.

Is there any flag/configuration that overrides target activity's launchmode
 ie singeltask?


Don't think so regular app could do that.


Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/*,
*Google+*http://bit.ly/webnetmobile-gpand
*Twitter http://webnetmobile.com/twitter/*

-- 
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