2016-10-02 7 views

답변

0

Intent은 앱의 "의도"를 나타내고 모든 활동은 의도에 의해 호출됩니다. 당신은 당신의 SecondActivity 싶어 implicit or explicit intent.

당신의 활동 또는 다른 응용 프로그램에서 시작되기 시작 귀하의 SecondActivity 당신과 함께 시작됩니다

, 당신은이에 대한 사용자 지정 Action를 정의 할 필요가있다.

<activity android:name=".SecondActivity" > 
<intent-filter> 
    <action android:name="com.example.DO_SOME_ACTION" /> 
    <category android:name="android.intent.category.DEFAULT" /> 
</intent-filter> 

당신은이 같은 응용 프로그램에서 활동을 시작할 수 :

Intent intent = new Intent(); 
intent.setAction("com.example.DO_SOME_ACTION"); 
startActivity(intent); 
관련 문제