[android-developers] Re: AliasActivity: Two Questions
Well, what exactly is the difference between the two to understand them better? - Juan T. On Oct 15, 10:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/... - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
The activity-alias tag can only be used to link to another activity implement in the same manifest as the tag appears, and when this alias is launched by the system it just directly launches the target activity so there is no actual implementation behind it. The AliasActivity class is just a standard Activity implementation that is built into the system, which you can use as the implementation for one of your activities. When launched, the system actually launches the AliasActivity in your process, which reads from your manifest the intent description to launch, starts that other activity, and then finishes itself. So if you can use activity-alias, you should to do so, since it is much more efficient. The main purpose of AliasActivity is to be able to generate a .apk containing no code that just provides a top-level application icon for some other activity in the system, typically launching the browser to display a particular web page. On Oct 16, 10:26 am, jtaylor [EMAIL PROTECTED] wrote: Well, what exactly is the difference between the two to understand them better? - Juan T. On Oct 15, 10:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/... - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
The activity-alias tag appears to enable different manifest attributes for the same activity. AliasActivity is something I'd have to see in an example to really understand it. At least it sounds uncommon. - Juan T. On Oct 16, 4:44 pm, hackbod [EMAIL PROTECTED] wrote: The activity-alias tag can only be used to link to another activity implement in the same manifest as the tag appears, and when this alias is launched by the system it just directly launches the target activity so there is no actual implementation behind it. The AliasActivity class is just a standard Activity implementation that is built into the system, which you can use as the implementation for one of your activities. When launched, the system actually launches the AliasActivity in your process, which reads from your manifest the intent description to launch, starts that other activity, and then finishes itself. So if you can use activity-alias, you should to do so, since it is much more efficient. The main purpose of AliasActivity is to be able to generate a .apk containing no code that just provides a top-level application icon for some other activity in the system, typically launching the browser to display a particular web page. On Oct 16, 10:26 am, jtaylor [EMAIL PROTECTED] wrote: Well, what exactly is the difference between the two to understand them better? - Juan T. On Oct 15, 10:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/... - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/Photostream - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/Photostream - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
Hmmm.. I tested it again and the startActivity()/finish() seems to be working now. It may have been an issue with an exception that was thrown in the child activity during initialization. I would launch the app, briefly see the entry-point activity, get a first draw of the child, and then a error dialog. When I clicked past the error dialog, I would see the entry-point activity again, then the child activity, then another error dialog that would close the app. I didn't commit my code at that point and don't remember specifics. But slightly related... Is there anyway to prevent the brief view of the redirecting activity's UI? It seems silly to push through start/resume/pause/stop when the app has already requested a new startActivity() or finish() from onCreate(). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
You may need to give more information on what you are doing. If the flicker you are seeing is happening when you launch your app from the home screen, this is not atually your app but a preview of it based on its theme and such in the manifest. If you can't make this match what will ultimately run, you can set the theme to be something like a dialog so the system won't show it (since without the content a dialog won't look anything like what the user sees). But if you do that, it will feel like the app takes slower to launch. Best is to have the manifest set up so that the preview looks close to what they see so the user can see this while the app is launching. On Oct 13, 6:31 am, Anm [EMAIL PROTECTED] wrote: Hmmm.. I tested it again and the startActivity()/finish() seems to be working now. It may have been an issue with an exception that was thrown in the child activity during initialization. I would launch the app, briefly see the entry-point activity, get a first draw of the child, and then a error dialog. When I clicked past the error dialog, I would see the entry-point activity again, then the child activity, then another error dialog that would close the app. I didn't commit my code at that point and don't remember specifics. But slightly related... Is there anyway to prevent the brief view of the redirecting activity's UI? It seems silly to push through start/resume/pause/stop when the app has already requested a new startActivity() or finish() from onCreate(). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
It looks like the sample code for AliasActivity isn't currently being included in the SDK, I'll get that changed. For what it's worth, though, the main utility of it is if you want to create an .apk that doesn't include any code but just resource definitions to launch other things. For you it's probably just as easy to write your own Activity that calls startActivity() with the desired Intent and then finish() (which is all AliasActivity does after parsing the XML intent definition). Redirecting to another activity -is- done with startActivity() and then finish(). I don't know off-hand why you are having troubles. The Forwarding and Redirection API demos can be used as examples: http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/ On Oct 12, 8:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---