You hav to add a new tag on the android manifest so that android knows
what activities are in play. So, you simply add this tag inside the
application tag of your android manifest (double click the android
manifest in eclipse and go to the xml tab)
< manifest ....>
<application...>
<activity android:name="com.android.agent.UserData"></activity>
</application>
</manifest>
Inside your activities you can add permissions as well, otherwise some
intent actions won't work
<activity android:name="com.android.agent.UserData">
<intent-filter>
<action android:name="android.settings.LOCALE_SETTINGS"></action>
</intent-filter>
</activity>
You can define user permissions right afeter your application tag, or
simply use the permissions tab to add permisions
< manifest ....>
<application...>
<activity ...></activity>
<activity ...></activity>
<activity ...></activity>
<activity ...></activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.CHANGE_CONFIGURATION"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
</manifest>
Good luck!
On Jan 31, 7:21 pm, "Roberts, Mark" <[email protected]>
wrote:
> The thing that always gets me is that I have not defined the second
> activity in the manifest.
>
> Snapper
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[email protected]] On Behalf Of Mark Murphy
> Sent: Saturday, January 31, 2009 12:58 PM
> To: [email protected]
> Subject: [android-beginners] Re: how to move from one screen to another
> ?
>
> Ziv Tatian wrote:
>
> > Hi all,
>
> > I have two activities that i've created: a welcome screen with a
> > continue button on it, and a user details activity.
> > I want to go to the user details activity from my welcome activity
> > when i click on the continue button.
> > I've tried the following code but i get an error when i try to run it
> > on the emulator whenever i press the continue button.
> > here's the code:
>
> > public class Welcome extends Activity {
> > /** Called when the activity is first created. */
>
> > �...@override
> > public void onCreate(Bundle savedInstanceState)
> > {
> > super.onCreate(savedInstanceState);
> > setContentView(R.layout.main);
> > Button continueButton = (Button) findViewById(R.id.go);
> > continueButton.setOnClickListener(new
> View.OnClickListener() {
>
> > public void onClick(View view) {
> > Intent mIntent = new Intent(view.getContext
> > (),UserData.class);
> > startActivity(mIntent);
> > }
> > });
> > }
>
> > }
>
> > can anyone help with that?
>
> What is the error as reported in the error log? (adb logcat, DDMS, or
> Eclipse to examine the log)
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---