public static Intent getDial(String phoneNumber)
{
Intent intent = new Intent();
intent.setAction("android.intent.action.DIAL");
if (!(TextUtils.isEmpty(phoneNumber)))
intent.setData(Uri.parse("tel:" + phoneNumber));
return intent;
}
public static Intent getCall(String phoneNumber)
{
Intent intent = new Intent();
intent.setAction("android.intent.action.CALL");
intent.setData(Uri.parse("tel:" + phoneNumber));
return intent;
}
public static Intent getRecentCall()
{
return new Intent("android.intent.action.CALL_BUTTON");
}
public static Intent getRawContactsInsert()
{
return new Intent("android.intent.action.INSERT",
ContactsContract.RawContacts.CONTENT_URI);
}
public static Intent getRawContactsEdit(long raw_contact_id)
{
return new Intent("android.intent.action.EDIT", ContentUris.withAppendedId(
ContactsContract.RawContacts.CONTENT_URI, raw_contact_id));
}
public static Intent getWifiSetting()
{
return new Intent("android.settings.WIFI_SETTINGS");
}
Android代码工具集——常见意图(intent)操作
最新推荐文章于 2022-02-20 14:09:53 发布