AndroidManifest.xml
<activity android:name=".XXX">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="*" android:pathPattern=".*\\calculator/.*" android:scheme="http" />
</intent-filter>
</activity>
JAVA:
String XXXX = "http://xxxxxxxxxx";
Intent intent = new Intent();
intent = new Intent(Intent.ACTION_VIEW,Uri.parse(XXXX));
startActivity(intent);
沒有留言:
張貼留言