Java Code Examples for android.support.v4.app.ShareCompat.IntentBuilder

The following are top voted examples for showing how to use android.support.v4.app.ShareCompat.IntentBuilder. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: goldcoin-android   File: RequestCoinsFragment.java   View source code 6 votes vote down vote up
private void updateShareIntent()
{
	// update share intent
	final IntentBuilder builder = IntentBuilder.from(activity);
	builder.setText(determineRequestStr());
	builder.setType("text/plain");
	builder.setChooserTitle(R.string.request_coins_share_dialog_title);
       try {
	    shareActionProvider.setShareIntent(builder.getIntent());
       } catch (NullPointerException e) {
           // Not really sure why this is happening.
           // Bug #5
           Log.e("Litecoin", "NullPointerException when trying to start request coins intent.");
           Toast.makeText(activity.getApplicationContext(), "Failed to start Request Coins activity",
                   Toast.LENGTH_SHORT).show();
       }
}
 
Example 2
Project: templecoin-android-wallet   File: RequestCoinsFragment.java   View source code 5 votes vote down vote up
private void updateShareIntent()
{
	// update share intent
	final IntentBuilder builder = IntentBuilder.from(activity);
	builder.setText(determineRequestStr(false));
	builder.setType("text/plain");
	builder.setChooserTitle(R.string.request_coins_share_dialog_title);
	shareActionProvider.setShareIntent(builder.getIntent());
}