question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

My App crash when use intent: ''

See original GitHub issue

I’m having some trouble with SMS plugin from ngCordova. If I send a message with the intent option set to ‘INTENT’, everything works fine, prompting the SMS application installed. But, when I set intent to ’ ’ (to use android’s native SMS sender), my app crashes. Here’s the code:

  $scope.sms = {};
    var options = {
        replaceLineBreaks: false, // true to replace \n by a new line, false by default
        android: {
            intent: '' // send SMS with the default SMS app
        }
    };
    $scope.smsSend = function () {
        console.log($scope.sms.phno);
        console.log($scope.sms.msg);
        document.addEventListener("deviceready", function () {
            $cordovaSms
                .send($scope.sms.phno, $scope.sms.msg, options)
                .then(function () {
                    // Success! SMS was sent
                    console.log('Success');
                }, function (error) {
                    // An error occurred
                    console.log(error);
                }); //then
        });
    };

## Testing OS : Marshmallow Android

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaqcommented, Apr 19, 2016

Glad you found out 👍

1reaction
Neotrixsxcommented, Apr 19, 2016

I did some changes in my code. Now its working fine.😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android App crashing when opening a new intent
Post your stacktrace from the crash. ... Hey, if you're using an Activity , you can drop all that OnClickListener stuff and just...
Read more >
App crashing after using intent to open a new activity after login.
I have been trying to get my app to redirect to a new activity after login, I have tried almost everything to no...
Read more >
Crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >
Implicit Intents with Serializable Extras Crash ... - Issue Tracker
It seems you're passing in a custom serializable object declared in your app as an extra in the intent. If the resolver activity...
Read more >
App crashes Springboard when IntentHandler embedded
I've been working on adding shortcuts to my app. The Intent handler extension causes my app to crash when it is embedded in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found