List of usage examples for android.content Intent Intent
protected Intent(Parcel in)
From source file:Main.java
public static void mediaScan(Context context, Uri uri) { Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); intent.setData(uri);/*w w w . ja v a 2 s . c om*/ context.sendBroadcast(intent); }
From source file:Main.java
public static void GoSetting(Activity activity) { Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS); activity.startActivity(intent); }
From source file:Main.java
public static void doIt(Context context, String number) { Intent phoneIntent = new Intent(Intent.ACTION_CALL); phoneIntent.setData(Uri.parse("tel:" + number)); context.startActivity(phoneIntent);//w ww . j av a2s . co m }
From source file:Main.java
public static void openSetting(Activity activity) { Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS); activity.startActivity(intent); }
From source file:Main.java
public static void openAppList(Context mContext) { Intent intent = new Intent(Settings.ACTION_APPLICATION_SETTINGS); mContext.startActivity(intent); }
From source file:Main.java
public static Intent buildIntent(final Context context, String action, String data) { Intent intent = new Intent(action); intent.putExtra("what", data); intent.setPackage(context.getPackageName()); return intent; }
From source file:Main.java
public static void UnRegister(Context context) { Intent unregIntent = new Intent("com.google.android.c2dm.intent.UNREGISTER"); unregIntent.putExtra("app", PendingIntent.getBroadcast(context, 0, new Intent(), 0)); context.startService(unregIntent);//from www . j ava2 s .c om }
From source file:Main.java
public static void oepnSetting(Context context) { Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.getApplicationContext().startActivity(intent); }
From source file:Main.java
public static void dial(Context context, String phoneNum) { Intent dial = new Intent(Intent.ACTION_DIAL); dial.setData(Uri.parse("tel:" + phoneNum)); context.startActivity(dial);//from ww w. ja va2 s . co m }
From source file:Main.java
public static void setAlarm(Context context) { Intent alarmas = new Intent(AlarmClock.ACTION_SET_ALARM); alarmas.putExtra(AlarmClock.EXTRA_MESSAGE, "New Alarm"); alarmas.putExtra(AlarmClock.EXTRA_HOUR, 10); alarmas.putExtra(AlarmClock.EXTRA_MINUTES, 30); context.startActivity(alarmas);/*w ww. j a va 2s.c o m*/ }