0
我需要(如果可能的话)来处理的“URL”像这样(在一封电子邮件中我需要打开我的应用程序(“WICS”)):的android:如何阅读意图URI额外的数据
http://wics/resetPassword/[email protected]/FOOBARTOKEN
我有这个在我的AndroidManifest.xml
<activity android:name=".ResetPasswordActivity">
android:label="@string/app_name">
<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:scheme="http"
android:host="wics"/>
</intent-filter>
</activity>
我怎样才能得到我的ResetPasswordActivity “[email protected]” 和 “FOOBARTOKEN”?
我插入此代码:
Intent intent = getIntent();
Uri uri = (Uri)intent.getData();
可是现在呢?拆分“uri”字符串并获得3td和第4个元素?
请接受答案。谢谢。总是愿意分享知识。 – Remario
谢谢@Caspain。我已经做了类似你的评论,但我认为这不是正确的方法。再次感谢。 – ZioBudda