List of usage examples for android.content Intent CATEGORY_DEFAULT
String CATEGORY_DEFAULT
To view the source code for android.content Intent CATEGORY_DEFAULT.
Click Source Link
From source file:com.yuanwei.android.BroadcastNotifier.java
public void broadcastUrl(int status, String url, String tag) { Intent localIntent = new Intent(); // The Intent contains the custom broadcast action for this app localIntent.setAction(Constants.BROADCAST_ACTION); localIntent.putExtra(Constants.EXTENDED_DATA_STATUS, status); // Puts log data into the Intent localIntent.putExtra(Constants.EXTENDED_FEED_URL, url); localIntent.putExtra(Constants.EXTENDED_FEED_TAG, tag); localIntent.addCategory(Intent.CATEGORY_DEFAULT); // Broadcasts the Intent mBroadcaster.sendBroadcast(localIntent); }
From source file:com.amgems.uwschedule.services.LoginService.java
protected void onHandleIntent(Intent intent) { LoginAuthenticator command = LoginAuthenticator.newInstance(getApplicationContext(), new Handler(), new DefaultHttpClient(), intent.getStringExtra(PARAM_IN_USERNAME), intent.getStringExtra(PARAM_IN_PASSWORD)); command.execute();/*from ww w. j a va 2 s . co m*/ Response response = command.getResponse(); Intent broadcastIntent = new Intent(); LocalBroadcastManager broadcastManager = LocalBroadcastManager.getInstance(this); broadcastIntent.setAction(ACTION_RESPONSE); broadcastIntent.addCategory(Intent.CATEGORY_DEFAULT); broadcastIntent.putExtra(PARAM_OUT_RESPONSE, response); if (response == Response.OK) { broadcastIntent.putExtra(PARAM_OUT_COOKIE, command.getCookie().toString()); } broadcastManager.sendBroadcast(broadcastIntent); }
From source file:com.sonaive.v2ex.ui.debug.TestActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_browse_images); mButterBar = findViewById(R.id.butter_bar); mDrawShadowFrameLayout = (DrawShadowFrameLayout) findViewById(R.id.main_content); overridePendingTransition(0, 0);//from ww w .j a v a 2 s . c o m registerHideableHeaderView(findViewById(R.id.headerbar)); // getLoaderManager().restartLoader(2, null, new FeedLoaderCallback()); // getLoaderManager().restartLoader(3, null, new NodeLoaderCallback()); /* * Creates a new Intent to send to the download IntentService. The Intent contains the * URL of the Picasa feature picture RSS feed */ mServiceIntent = new Intent(this, RSSPullService.class).setData(Uri.parse(PICASA_RSS_URL)); startService(mServiceIntent); /* * Creates an intent filter for DownloadStateReceiver that intercepts broadcast Intents */ // The filter's action is BROADCAST_ACTION IntentFilter statusIntentFilter = new IntentFilter(Constants.BROADCAST_ACTION); // Sets the filter's category to DEFAULT statusIntentFilter.addCategory(Intent.CATEGORY_DEFAULT); mDownloadStateReceiver = new DownloadStateReceiver(); LocalBroadcastManager.getInstance(this).registerReceiver(mDownloadStateReceiver, statusIntentFilter); }
From source file:ru.dublgis.androidhelpers.DesktopUtils.java
public static void showApplicationSettings(final Context ctx) { try {/*from ww w .j a v a 2s .c o m*/ final Intent intent = new Intent(); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setData(Uri.fromParts("package", ctx.getPackageName(), null)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); ctx.startActivity(intent); } catch (final Throwable throwable) { Log.e(TAG, "showApplicationSettings throwable: " + throwable); } }
From source file:com.example.locale.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LocaleUtil.initCustomLocales(this); setContentView(R.layout.activity_main); ButterKnife.bind(this); initToolbar();//w ww . j a v a 2 s . c om mAddLocale.setOnClickListener(this); mLoading.hide(); mFilter = (savedInstanceState != null) ? savedInstanceState.getString(FILTER) : null; mAdapter = new LocaleAdapter(mFilter); mAdapter.setLocaleListener(this); initRecyclerView(); showDefaultLocale(); mLocaleBroadcastReceiver = new LocaleBroadcastReceiver(); IntentFilter intentFilter = new IntentFilter(LocaleService.ACTION_LOCALE_SERVICE); intentFilter.addCategory(Intent.CATEGORY_DEFAULT); registerReceiver(mLocaleBroadcastReceiver, intentFilter); }
From source file:gov.wa.wsdot.android.wsdot.ui.HighImpactAlertsFragment.java
@Override public void onResume() { super.onResume(); IntentFilter alertsFilter = new IntentFilter( "gov.wa.wsdot.android.wsdot.intent.action.HIGHWAY_ALERTS_RESPONSE"); alertsFilter.addCategory(Intent.CATEGORY_DEFAULT); mHighwayAlertsSyncReceiver = new HighwayAlertsSyncReceiver(); getActivity().registerReceiver(mHighwayAlertsSyncReceiver, alertsFilter); mHandler.post(runnable);/*w w w . j a va 2 s.c o m*/ }
From source file:com.radioyps.gcm_test.MainActivity.java
private void registerReceiver() { if (!isReceiverRegistered) { IntentFilter msgIntentFilter = new IntentFilter(CommonConstants.LOCAL_BROADCAST_ACTION); msgIntentFilter.addCategory(Intent.CATEGORY_DEFAULT); LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReceiver, msgIntentFilter);//from w w w . j ava 2 s . c o m isReceiverRegistered = true; } }
From source file:com.android.shell.BugreportReceiver.java
/** * Build {@link Intent} that can be used to share the given bugreport. *///www . j a va 2 s . c o m private static Intent buildSendIntent(Context context, Uri bugreportUri, Uri screenshotUri) { final Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setType("application/vnd.android.bugreport"); intent.putExtra(Intent.EXTRA_SUBJECT, bugreportUri.getLastPathSegment()); intent.putExtra(Intent.EXTRA_TEXT, SystemProperties.get("ro.build.description")); final ArrayList<Uri> attachments = Lists.newArrayList(bugreportUri, screenshotUri); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments); final Account sendToAccount = findSendToAccount(context); if (sendToAccount != null) { intent.putExtra(Intent.EXTRA_EMAIL, new String[] { sendToAccount.name }); } return intent; }
From source file:com.cloudstudio.BarcodeScanner.java
/** * Starts an intent to scan and decode a barcode. *///ww w . j av a 2s .c om public void scan() { Intent intentScan = new Intent(SCAN_INTENT); intentScan.addCategory(Intent.CATEGORY_DEFAULT); // avoid calling other phonegap apps intentScan.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName()); this.cordova.startActivityForResult((CordovaPlugin) this, intentScan, REQUEST_CODE); }
From source file:com.powerall.plugin.barcodescanner.BarcodeScanner.java
/** * Starts an intent to scan and decode a barcode. *//*from ww w . j a v a2 s . c o m*/ public void scan() { Intent intentScan = new Intent(SCAN_INTENT); intentScan.addCategory(Intent.CATEGORY_DEFAULT); this.cordova.startActivityForResult((CordovaPlugin) this, intentScan, REQUEST_CODE); }