List of usage examples for android.content Intent FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
int FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
To view the source code for android.content Intent FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET.
Click Source Link
From source file:com.color.kid.kidpaint.activity.OptionsActivity.java
private void startLoadImageIntent() { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); startActivityForResult(intent, REQUEST_CODE_LOAD_PICTURE); }
From source file:com.ratebeer.android.gui.fragments.BrewerViewFragment.java
@OptionsItem(R.id.menu_share) protected void onShare() { if (brewer != null) { // Start a share intent for this event Intent s = new Intent(Intent.ACTION_SEND); s.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); s.setType("text/plain"); s.putExtra(Intent.EXTRA_TEXT,/*from ww w . java 2 s . c om*/ getString(R.string.brewers_share, brewer.brewerName, Integer.toString(brewer.brewerId))); startActivity(Intent.createChooser(s, getString(R.string.brewers_sharebrewer))); } }
From source file:com.xengar.android.stocktracker.ui.DetailFragment.java
private Intent createQuoteHistoryIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, mStockHistory + STOCK_SHARE_HASHTAG); return shareIntent; }
From source file:com.ratebeer.android.gui.fragments.PlaceViewFragment.java
@OptionsItem(R.id.menu_share) protected void onShare() { if (place != null) { // Start a share intent for this event Intent s = new Intent(Intent.ACTION_SEND); s.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); s.setType("text/plain"); s.putExtra(Intent.EXTRA_TEXT, getString(R.string.places_share, place.placeName, place.placeID)); startActivity(Intent.createChooser(s, getString(R.string.places_shareplace))); }/*from ww w . j a v a 2s . c om*/ }
From source file:com.gdgdevfest.android.apps.devfestbcn.ui.AnnouncementsFragment.java
@Override public void onListItemClick(ListView l, View v, int position, long id) { if (mCursor == null) { return;/*from w w w. j a v a2 s. co m*/ } mCursor.moveToPosition(position); String url = mCursor.getString(AnnouncementsQuery.ANNOUNCEMENT_URL); Intent postDetailIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); postDetailIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); UIUtils.preferPackageForIntent(getActivity(), postDetailIntent, UIUtils.GOOGLE_PLUS_PACKAGE_NAME); startActivity(postDetailIntent); }
From source file:app.com.oz_heng.android.sunshine.DetailFragment.java
private Intent createShareForecastIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, mForecast + FORECAST_SHARE_HASHTAG); return shareIntent; }
From source file:gov.wa.wsdot.android.wsdot.ui.ferries.bulletins.FerriesRouteAlertsBulletinDetailsFragment.java
private Intent createShareIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_SUBJECT, mAlertFullTitle); shareIntent.putExtra(Intent.EXTRA_TEXT, mAlertDescription + "\n\n" + mAlertFullText); return shareIntent; }
From source file:com.example.calero.counters.app.UI.Fragments.DetailFragment.java
private Intent createShareCountedIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, counters + COUNTERS_SHARE_HASHTAG); return shareIntent; }
From source file:com.upenn.chriswang1990.sunshine.DetailFragment.java
private Intent createShareForecastIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); } else {//from ww w . jav a 2 s . c o m shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); } shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_TEXT, forecastStr + FORECAST_SHARE_HASHTAG); return shareIntent; }
From source file:edu.berkeley.boinc.attach.BatchProcessingActivity.java
public void shareClicked(View v) { if (Logging.DEBUG) Log.d(Logging.TAG, "BatchProcessingActivity.shareClicked."); Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setType("text/plain"); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); // Add data to the intent, the receiving app will decide what to do with it. intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.social_invite_content_title)); if (android.os.Build.MANUFACTURER.toUpperCase().equals("AMAZON")) { intent.putExtra(Intent.EXTRA_TEXT, String.format(getString(R.string.social_invite_content_body), android.os.Build.MANUFACTURER, getString(R.string.social_invite_content_url_amazon))); } else {//from w w w. j ava 2s . c o m intent.putExtra(Intent.EXTRA_TEXT, String.format(getString(R.string.social_invite_content_body), android.os.Build.MANUFACTURER, getString(R.string.social_invite_content_url_google))); } startActivity(Intent.createChooser(intent, getString(R.string.social_invite_intent_title))); }