Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Intent #107

Open
Smohanapriya opened this issue May 16, 2018 · 3 comments
Open

Invalid Intent #107

Smohanapriya opened this issue May 16, 2018 · 3 comments

Comments

@Smohanapriya
Copy link

Hi
I have tried the following code to call the app,

 var sApp = startApp.set({
      "action"      :  "ACTION_SEND",
      "category"    :  "CATEGORY_DEFAULT",
      "package"     :  "PACKAGE NAME",//The packageName of the app I want to open
      "intent"      :  "INTENT ID",//Name of the intent
      "intentstart" :  "startActivityForResult",
      "type"        :  "text/xml"
   }, { /* extras */
        "PID_OPTIONS":"PASS DATA"//Here i want to pass some xml data
   })

   sApp.start(function(result) { /* success */
        console.log("Success"+result);
   }, function(error) { /* fail */
        alert("error :"+error);
   });

I am getting "success callback result as OK", but I am getting toast message in my app as "Invalid intent code 999".

Can anyone help to resolve this issue?

Anyone can explain how to get the intent callback result?????

@lampaa
Copy link
Owner

lampaa commented May 16, 2018

Hi!

Please, update plugin to 6.1.0 and check this code:

var sApp = startApp.set({
    "action"      :  "ACTION_SEND",
    "category"    :  "CATEGORY_DEFAULT",
    "package"     :  "PACKAGE NAME",//The packageName of the app I want to open
    "intent"      :  "INTENT ID",//Name of the intent
     "intentstart" :  "startActivityForResult",
   "type"        :  "text/xml"
}, { /* extras */
    "PID_OPTIONS":"PASS DATA"//Here i want to pass some xml data
}).start(function(result) { /* success */
    console.log("Success"+result);
}, function(error) { /* fail */
    alert("error :"+error);
}, function(result, requestCode, resultCode) {
    console.log(result, requestCode, resultCode);
});

@nawirulfadli
Copy link

nawirulfadli commented May 25, 2018

Hi @lampaa
I have tried the following code to call the app,

var sApp = startApp.set({
    "category": "CATEGORY_APP_MUSIC",
    "intentstart": "startActivity"
}).start(function(result) { /* success */
    console.log("Success" + result);
}, function(error) { /* fail */
    console.log("error :" + error);
}, function(result, requestCode, resultCode) {
    console.log(result, requestCode, resultCode);
});

I'm getting error :
error :class android.content.ActivityNotFoundException: No Activity found to handle Intent { cat=[android.intent.category.APP_MUSIC] }

Can anyone help to resolve this issue?

System Information
Ionic 1
Node 4.5.0
NPM 2.15.9
Cordova 6.5.0

@lampaa
Copy link
Owner

lampaa commented May 25, 2018

Hi!
for start application to play music test this code:

var sApp = startApp.set({
    "action": "android.intent.action.MUSIC_PLAYER",
    "noParse": true
}).

@lampaa lampaa added the Ionic label Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants