2016年6月2日 星期四

Android Scheme


在AndroidManifest 新增:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data        android:host="test"        android:scheme="test" />
</intent-filter>

加在你要的activity裡



在你Activity頁面新在下面那段就可接收值
getIntent().getData()