Closed mnjadidi closed 6 years ago
You are specifying window.plugins.intentShim.ACTION_SEND but if you want the Java Intent.ACTION_MAIN then you should specify the string 'android.intent.action.MAIN', if I understand correctly.
i used
action: 'android.intent.action.MAIN',
but how i use another element:
when is use:
url: 'another.app.com.Activity.PaymentRequestActivity'
debug app return
11-01 09:10:28.052: E/PluginManager(3202): java.lang.IllegalArgumentException: Relative URIs are not supported.
I suspect that is because 'another.app.com.Activity.PaymentRequestActivity' is not a URL. For a couple of examples of StartActivityForResult please see the test app, https://github.com/darryncampbell/plugin-intent-api-exerciser/blob/master/www/js/index.js
my code is
window.plugins.intentShim.startActivityForResult( { action: window.plugins.intentShim.ACTION_SEND, component: "another.app.com/.Activity.PaymentRequestActivity", extras: { 'authCode': '2817EB9BDD7tvnsisygchlxe25719E053340B10AC5316', } }, function(intent) { console.log('problem '); }, function() { console.log("StartActivityForResult failure"); });
and sample java code is:
Intent intent = new Intent(Intent.ACTION_MAIN); intent.setComponent(new ComponentName("another.app.com", "another.app.com.Activity.PaymentRequestActivity")); intent.putExtra("authCode", "2817EB9BDD7tvnsisygchlxe25719E053340B10AC5316"); startActivityForResult(intent, result);
but my code not work,,
and component not opened