use of android.content.Intent in project UltimateAndroid by cymcsg.
the class ProgressMenuItemActivity method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.action_refresh:
Intent reloadService = new Intent(this, ReloadIntentService.class);
reloadReceiver.startProgress();
this.startService(reloadService);
return true;
case R.id.howToUse:
BasicUtils.sendIntent(this, HowToUseActivity.class, "data", "ProgressMenuItemActivity");
return true;
default:
return super.onOptionsItemSelected(item);
}
}
use of android.content.Intent in project kickmaterial by byoutline.
the class CategoriesListActivity method launch.
public static void launch(@Nonnull Activity context, @Nonnull Category category, View sharedElement) {
final Bundle options = KickMaterialBaseActivity.getSharedElementsBundle(context, sharedElement);
Intent intent = new Intent(context, CategoriesListActivity.class);
intent.putExtra(ARG_CATEGORY, Parcels.wrap(category));
ActivityCompat.startActivityForResult(context, intent, DEFAULT_REQUEST_CODE, options);
}
use of android.content.Intent in project android by cSploit.
the class System method checkNetworking.
public static boolean checkNetworking(final Activity current) {
if (!mNetwork.isConnected()) {
Intent intent = new Intent();
intent.putExtra(WifiScannerFragment.CONNECTED, false);
current.setResult(Activity.RESULT_OK, intent);
String title = current.getString(R.string.error);
String message = current.getString(R.string.wifi_went_down);
new FatalDialog(title, message, current).show();
return false;
}
return true;
}
use of android.content.Intent in project photo-picker-plus-android by chute.
the class ServicesActivity method recordVideo.
@Override
public void recordVideo() {
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
mediaPath = AppUtil.getOutputMediaFileUri(MediaType.VIDEO);
intent.putExtra(MediaStore.EXTRA_OUTPUT, mediaPath);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
startTheCamera(intent, Constants.CAMERA_VIDEO_REQUEST);
}
use of android.content.Intent in project photo-picker-plus-android by chute.
the class IntentUtil method deliverDataToInitialActivity.
public static void deliverDataToInitialActivity(final FragmentActivity context, final List<AssetModel> collection, AccountModel accountModel) {
final PhotoPickerPlusIntentWrapper wrapper = new PhotoPickerPlusIntentWrapper(new Intent(context, ServicesActivity.class));
wrapper.setMediaCollection(collection);
if (accountModel != null) {
wrapper.setAccountModel(accountModel);
}
wrapper.getIntent().addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
wrapper.startActivity(context);
}
Aggregations