You are on page 1of 1

Activity

Get data passed from calling activity (firstActivity)


#xml
//each activity has its own layout.
#import
import android.os.Bundle;
import android.content.Intent;
#onCreate/Anywhere
Bundle info = intent.getExtras(); //???intent
if (info != null) { /* Retrieve vals with info.getBlah(...) - key-value pairs */
}
#Manifest
<activity android:name=".secondActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".firstActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.in
tent.category.DEFAULT" />
</intent-filter>
</activity>
#end

You might also like