0
我有一個鏈接「openactivity://」,我的應用程序有活動:com.example.MyAct安卓:通過聯動啓動的活動
有沒有辦法通過打開活動「com.example.MyAct」點擊鏈接?
我有試過:
<activity android:name=".MyAct"
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="openactivity"/>
</intent-filter>
</activity >
但不必總是工作,它似乎不高版本的Android設備上工作(這並不在我的HTC感覺版本2.3.4的工作和HTC One X版本4.0.3)
你可以發佈代碼..? – 2012-04-25 13:08:56
另請參見http://stackoverflow.com/questions/3471503/how-to-listen-for-a-custom-uri – Rajesh 2012-04-25 13:09:44
嗨Rajesh,我嘗試過的方式intent-filter和Uri data = getIntent( ).getData();但這不適用於所有的Android設備 – kairen 2012-04-25 13:13:04