use of android.content.Intent in project coinbase-bitmonet-sdk by coinbase.
the class CoinbasePaymentProcessor method checkWalletAndSendMoney.
public void checkWalletAndSendMoney(Context context, String item, double amount) {
// Check if there is a valid receiving address
if (UserProfileSettings.getInstance().retrieveMerchantReceivingAddress() == null) {
((BitmonetPaymentStatusListener) context).paymentFailure(getErrorsAarrayFromString(Constants.ERROR_INVALID_RECEIVING_ADDRESS));
return;
}
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(URLUtils.constructBitcoinIntentURL(amount)));
// Check if there a wallet to handle the intent
PackageManager manager = context.getPackageManager();
List<ResolveInfo> activities = manager.queryIntentActivities(intent, 0);
if (activities.size() > 0) {
context.startActivity(intent);
} else {
showModalAndTransferMoney(context, item, amount);
}
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class RotationFragment method pickContact.
public void pickContact(View v) {
Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(i, PICK_REQUEST);
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class RotationFragment method pickContact.
public void pickContact(View v) {
Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(i, PICK_REQUEST);
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class RotationRetainDemo method pickContact.
public void pickContact(View v) {
Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(i, PICK_REQUEST);
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class FilesCPDemo method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(FileProvider.CONTENT_URI + "test.pdf"));
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(i);
finish();
}
Aggregations