2017-02-04 1 views
1

의도 필터로 활동을 시작,하지만 난 액션 매개 변수를 사용하여 시작 활동을 읽고 있어요 책 : 하지 않음이 고전적인 방법으로안드로이드 : 텐트 또는 항상 텐트로 활동을 시작

그러나

Intent intent = new Intent(this,ActivityResult.class); 
이런 식으로 :

String PICK_BUS_ACTION = "com.example.utente.decompilare" + ".action.PICK_BUS_ACTION"; 
Intent intent = new Intent(PICK_BUS_ACTION); 

그리고 매니페스트에 인 텐트 필터가 :

<activity android:name=".ActivityResult"> 
     <intent-filter> 
      <action android:name="com.example.utente.decompilare.action.PICK_BUS_ACTION" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 

두 가지 방법을 시도했지만 차이점을 찾지 못했습니다. 더 나은 무엇입니까? 그 차이점은 무엇입니까?

+0

https://developer.android.com/guide/components/intents-filters.html#Types, ** 암시 적 ** ** ** 명시적인 ** – pskink

답변

0

두 번째 앱은 다른 앱을 시작하는 데 사용됩니다.

+0

을 읽으십시오.하지만 의도와 함께 다른 앱을 시작할 수도 있습니다. – Curio

관련 문제