跳转到指定应用的首页
1 | /** |
跳转到指定应用的指定页面
1 | /** |
Intent open a picture file public
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Intent to open a PDF file
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Intent to open a text file
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Intent to open the audio file
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Intent to open the video file
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Intent to open the CHM file:
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Intent to open a Word document:
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Android Excel intent:
1 | Intent intent = new Intent("android.intent.action.VIEW"); |
Display Html page:
1 | Uri uri = Uri.parse ("http://www.google.com"); |
Show map:
1 | Uri uri = Uri.parse ("geo: 38.899533, -77.036476"); |
Call the dialer:
1 | Uri uri = Uri.parse ("tel: xxxxxx"); |
Call :
1 | Uri uri = Uri.parse ("tel: xxxxxx"); |
1 | /*permission: |
Call to send text messages of the program :
1 | Intent intent = new Intent (Intent.ACTION_VIEW); |
Send SMS :
1 | Uri uri = Uri.parse("smsto:0800000123"); |
Send MMS :
1 | Uri uri = Uri.parse("content://media/external/images/media/23"); |
Send an Email :
1 | Uri uri = Uri.parse ("mailto: xxx@abc.com"); |
Send an Email with body :
1 | Intent intent = new Intent(Intent.ACTION_SEND); |
Send an Email with body,to,cc :
1 | Intent intent = new Intent(Intent.ACTION_SEND); |
Send an Email with attachments :
1 | Intent intent = new Intent(Intent.ACTION_SEND); |
Uninstall the program :
1 | Uri uri = Uri.fromParts ("package", strPackageName, null); |
Install the apk :
1 | Uri installUri = Uri.fromParts("package", "xxx", null); |
Search applications
1 | Uri uri = Uri.parse("market://search?Q=pname:pkg_name"); |
Google Search Launch Web Browser
1 | Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); |
Send text using Intent (to messaging apps)
1 | Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); |
Create Shortcut on “Home Screen”
1 | Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); |
Manifest file:
1 | <intent-filter> |
清空手机 Cookie
1 | CookieSyncManager.createInstance(getApplicationContext()); |
用注释来控制隐藏字段 {@hide}
1 | /** |