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:org.montanafoodhub.app.FragmentBase.java
protected void initializeReceiver(HubInit.HubType type) { _hubType = type;//w w w . j av a2 s.c om _intentFilter = new IntentFilter(Hub.HUB_DATA_REFRESH); _intentFilter.addCategory(Intent.CATEGORY_DEFAULT); _broadcastReceiver = getBroadcastReceiver(); _receiverInitialized = true; }
From source file:cn.edu.zafu.corepage.core.CoreConfig.java
public static void unInit() { Intent intent = new Intent(); intent.setAction(CoreConfig.ACTION_EXIT_APP); intent.addCategory(Intent.CATEGORY_DEFAULT); getLocalBroadcastManager().sendBroadcast(intent); BaseActivity.unInit();// w w w . j ava 2 s. c o m mLocalBroadcatManager = null; }
From source file:org.montanafoodhub.app.service.HubInitService.java
@Override protected void onHandleIntent(Intent intent) { boolean firstRunAfterInstall = intent.getBooleanExtra(EXTRA_APP_FIRST_RUN, true); if (firstRunAfterInstall == true) { new InitHub(this).refresh(); new CertificationHub(this).refresh(); new AdHub(this).refresh(); new OrderHub(this).refresh(); new ItemHub(this).refresh(); new BuyerHub(this).refresh(); new ProducerHub(this).refresh(); } else {/*from w w w . j a va 2 s . c o m*/ new InitHub(this).run(); new CertificationHub(this).run(); new AdHub(this).run(); new OrderHub(this).run(); new ItemHub(this).run(); new BuyerHub(this).run(); new ProducerHub(this).run(); } Intent broadcastIntent = new Intent(); broadcastIntent.setAction(HUB_INIT_FINISHED); broadcastIntent.addCategory(Intent.CATEGORY_DEFAULT); LocalBroadcastManager.getInstance(this).sendBroadcast(broadcastIntent); }
From source file:com.thingsee.tracker.REST.BroadCastNotifier.java
public void broadcastIntentWithPositionAndVendorThingId(int status, String vendorThingId, double latitude, double longitude, float accuracy, double timestamp, float current_level) { Intent localIntent = new Intent(); localIntent.setAction(CommonConstants.BROADCAST_ACTION); localIntent.addCategory(Intent.CATEGORY_DEFAULT); localIntent.putExtra(CommonConstants.EXTENDED_DATA_STATUS, status); localIntent.putExtra(CommonConstants.EXTENDED_VENDOR_THING_ID, vendorThingId); localIntent.putExtra(CommonConstants.EXTENDED_LOCATION_ITEM_LAT, latitude); localIntent.putExtra(CommonConstants.EXTENDED_LOCATION_ITEM_LNG, longitude); localIntent.putExtra(CommonConstants.EXTENDED_LOCATION_ITEM_ACCURACY, accuracy); localIntent.putExtra(CommonConstants.EXTENDED_LOCATION_ITEM_TIMESTAMP, timestamp); localIntent.putExtra(CommonConstants.EXTENDED_CURRENT_LEVEL, current_level); mBroadcaster.sendBroadcast(localIntent); }
From source file:com.oceanwing.at.BroadcastNotifier.java
public void broadcast(int status, String log) { Intent localIntent = new Intent(); // The Intent contains the custom broadcast action for this app localIntent.setAction(BROADCAST_ACTION); localIntent.putExtra(EXTENDED_DATA_STATUS, status); // Puts log data into the Intent localIntent.putExtra(EXTENDED_STATUS_LOG, log); localIntent.addCategory(Intent.CATEGORY_DEFAULT); // Broadcasts the Intent mBroadcaster.sendBroadcast(localIntent); }
From source file:monakhv.android.samlib.BooksActivity.java
@Override protected void onResume() { super.onResume(); if (author_id != -1) { AuthorController sql = new AuthorController(this); Author a = sql.getById(author_id); setTitle(a.getName());/* w w w . j a v a 2s.com*/ } else { setTitle(getText(R.string.menu_selected_go)); } receiver = new DownloadReceiver(); IntentFilter filter = new IntentFilter(DownloadReceiver.ACTION_RESP); filter.addCategory(Intent.CATEGORY_DEFAULT); registerReceiver(receiver, filter); }
From source file:org.montanafoodhub.app.HubApplication.java
private void startHubInitService() { // setup the broadcast receiver for when the service has finished IntentFilter filter = new IntentFilter(HubInitService.HUB_INIT_FINISHED); filter.addCategory(Intent.CATEGORY_DEFAULT); _hubInitReceiver = getHubInitReceiver(); LocalBroadcastManager.getInstance(this).registerReceiver(_hubInitReceiver, filter); // start the service SharedPreferences prefs = getApplicationContext().getSharedPreferences(Preferences.File, Context.MODE_PRIVATE); _firstAppRun = prefs.getBoolean(Preferences.FIRST_RUN_AFTER_INSTALL, true); Intent startIntent = new Intent(this, HubInitService.class); startIntent.putExtra(HubInitService.EXTRA_APP_FIRST_RUN, _firstAppRun); startService(startIntent);/* w ww. j av a 2 s. co m*/ }
From source file:com.google.zxing.BarcodeScanner.java
/** * Starts an intent to scan and decode a barcode. *//*from w w w. ja v a 2 s . c om*/ public void scan() { Intent intentScan = new Intent(SCAN_INTENT); intentScan.addCategory(Intent.CATEGORY_DEFAULT); this.cordova.startActivityForResult((Plugin) this, intentScan, REQUEST_CODE); }
From source file:io.rapidpro.androidchannel.UnclaimedFragment.java
public void onAttach(android.app.Activity activity) { super.onAttach(activity); m_receiver = new ClaimCodeReceiver(); IntentFilter filter = new IntentFilter(); filter.addAction(Intents.UPDATE_RELAYER_STATE); filter.addCategory(Intent.CATEGORY_DEFAULT); activity.registerReceiver(m_receiver, filter); }
From source file:cn.androidy.network.download.BroadcastNotifier.java
/** * Uses LocalBroadcastManager to send an {@link Intent} containing {@code status}. The * {@link Intent} has the action {@code BROADCAST_ACTION} and the category {@code DEFAULT}. * * @param status {@link Integer} denoting a work request status *///w w w .j a v a2s . c om public void broadcastIntentWithState(int status) { Intent localIntent = new Intent(); // The Intent contains the custom broadcast action for this app localIntent.setAction(Constants.BROADCAST_ACTION); // Puts the status into the Intent localIntent.putExtra(Constants.EXTENDED_DATA_STATUS, status); localIntent.addCategory(Intent.CATEGORY_DEFAULT); // Broadcasts the Intent mBroadcaster.sendBroadcast(localIntent); }