aspose file tools*
The moose likes Android and the fly likes Two or more activities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Two or more activities" Watch "Two or more activities" New topic
Author

Two or more activities

Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Hello, i have strange problem.

Lets say i want to create app with button, after pressing button move to another window for example with another button with different action.

And it works, but there is strange problem, when im testing it on real devices (for example HTC Wild Fire S, Or HTC Desire)

After installing my app, its showing TWO SHORTCUTS with the same name (name of app) and after runningthem

first is opening program, and second is opening second window of tihis program (window which should appear after pressing button from program)

I just created new activity java file, and xml file for window gui, and in my main activity i have added this in action listener for button:



Thanks for help!
zoheb hassan
Ranch Hand

Joined: Apr 01, 2009
Posts: 146

Can you Post the Manifest of this program, as far as i can predict you might have copied the intent filter of the main Program and pasted the same for the second activity and your manifest might look like this



All you have to correct this is to delete the complete intent-filter node for second activity

-Zoheb
Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Indeed, you are right.

Now it works, thank you for help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Two or more activities
 
Similar Threads
My Custom Intents do not work
Problem in starting activity from broadcast receivers
How to Start New Activity
Broadcast Receiver and Activities
problem with window.ShowModelDialog()