Comments (13)
Hi, @minamu1!
I updated plugin in thees lines: https://github.com/lampaa/com.lampa.startapp/blob/master/src/android/startApp.java#L77
Please, reinstall plugin and add this code:
navigator.startApp.check([["action", "com.evernote.action.VIEW_NOTE"],[{"NOTE_GUID":"SOME_NOTE_UID"}]], function(message) {
console.log(message); // => OK
},
function(error) {
console.log(error);
});
from com.lampa.startapp.
Hello, I would like to know if it would be possible to return to the app that has been started. For example, if I start a call on X app, once the calls end, my app would open.
from com.lampa.startapp.
@andy-ta hi!
Try to run your application after launch another application, example:
navigator.startApp.start("com.evernote", function(message) {
navigator.startApp.start("com.you.app", function(message) { }, function(error) { );
}, function(error) { );
from com.lampa.startapp.
Hello lampaa,
Thanks for tending to the issue I mentioned earlier. I uninstalled and then reinstalled the plugin and tried again.
However, it does not seem to work still. I tried the following code: for navigator.startApp.check:
navigator.startApp.check([["com.evernote", "com.evernote.action.VIEW_NOTE"],[{"NOTE_GUID":"SOME_NOTE_UID"}]], function(message) {
alert(message); // => OK
},
function(error) {
alert(error);
}
);
I got the following error:
android.content.pm.PackageManager$NameNotFoundException: [["com.evernote","com.evernote.action.VIEW_NOTE"],[{}]]
I get this error even tough the Evernote app is install and has package "com.evernote".
Also, instead of using startApp.check, if I use startApp.start, I get the same old error I was getting. The following code:
navigator.startApp.start([["com.evernote", "com.evernote.action.VIEW_NOTE"],[{"NOTE_GUID":"SOME_NOTE_GUID"}]], function(message) {
alert(message); // => OK
},
function(error) {
alert(error);
}
);
I get the same error:
"intent:
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.evernote/com.evernote.action.VIEW_NOTE}; have you declared this activity in your AndroidManifest.xml?"
I am not sure if the issue is with the plugin or how to setup the AndroidManifest.xml file. Do I need to add something to the AndroidManifest.xml file?
As always, thanks for your time and effort!
from com.lampa.startapp.
@minamu1 hi! Replace com.evernote to action, see my comment
#14 (comment)
I write about check method, please replace to start method.
from com.lampa.startapp.
Hello lampaa,
Ah, I should have mentioned that I did try your suggestion from #14 and got an error with that too.
After uninstalling and re-installing the plugin, I used the following code:
navigator.startApp.check([["action", "com.evernote.action.VIEW_NOTE"],[{"NOTE_GUID":"SOME_NOTE_GUID"]], function(message) {
alert(message); // => OK
},
function(error) {
alert(error);
}
);
When I ran my app and tried to execute the above code, I got the following error:
android.content.pm.PackageManager$NameNotFoundException:[["action","com.evernote.action.VIEW_NOTE"],[{}]]
Any ideas how I can resolve this? I double-checked and confirmed in Evernote documentation that "com.evernote.action.VIEW_NOTE" is a valid action.
Thanks!
from com.lampa.startapp.
@minamu1 try this:
navigator.startApp.start([["action", "com.evernote.action.VIEW_NOTE"],[{"NOTE_GUID":"SOME_NOTE_UID"}]], function(message) {
console.log(message); // => OK
},
function(error) {
console.log(error);
});
from com.lampa.startapp.
Hello lampaa,
Thanks for your continued help and support!
I tried using the start() function as you mentioned, but I got no response from the app - no success or error.
I added an alert('Done!') after the code, but the alert was never called:
navigator.startApp.start([["action", "com.evernote.action.VIEW_NOTE"],[{"NOTE_GUID":"SOME_NOTE_UID"}]], function(message) {
alert(message); // => OK <-- This is never called
},
function(error) {
alert(error); // <-- This is never called
});
alert('Done!'); // <--- This is never called.
Any ideas on what may be going on?
Thanks!
from com.lampa.startapp.
@minamu1 hi! Hmm, probably you not declared code or before the code has a bug. See this tool for debug code on app: http://jsconsole.com/remote-debugging.html. I often use it if have something does not work.
from com.lampa.startapp.
Hello lampaa,
I reinstalled the plugin and followed your instructions - it works!!! The activity launches and Evernote pulls up the right note. Thanks for helping.
Also, thanks for introducing my to the jsconsole remote debugging tool. It's amazingly useful for Cordova/Phonegap development. I have been suffering from poor debugging for the last two years.
Thanks!
Mohammad
from com.lampa.startapp.
@minamu1, i was happy to help you!
from com.lampa.startapp.
Hello lampaa,
Firstly, I am continuing to use your plugin and find it really useful. Thank you!
I wanted to reach out to you about trying to launch the Salesforce android app from my Cordova app using the startapp plugin.
According to Salesforce documentation (https://na7.my.salesforce.com/help/pdfs/en/salesforce1_url_schemes_ios.pdf), for both iOS and Android, the URL scheme is as follows:
<scheme_name>sObject//view
For example, if I have an object ID "001D000000Jwj9v", then I can launch the native app to view the object with the following:
salesforce1://sObject/001D000000Jwj9v/view
At this stage, I am only interested in "view"ing the object; I don't plan on any other functions like editing or downloading. I am having trouble launching this from my app using the startapp plugin. Could you please advise on what would be the correct syntax and usage for this situation? I have read your documentation and tried several permutations but am getting various errors. Could you please advise on this?
Thanks!
Mohammad
from com.lampa.startapp.
Hi, @hadroapp!
try this:
navigator.startApp.start([["action", "VIEW"], ["salesforce1://sObject/001D000000Jwj9v/view"]], ...);
from com.lampa.startapp.
Related Issues (20)
- It don't working to open WhatsApp
- Trouble using it without ionic native wrapper
- crashes on onActivityResult HOT 1
- Android file browser
- ReferenceError: startApp is not defined" HOT 1
- How to open camera? HOT 2
- startApp in not defined in Framework7
- Error: Incorrect params, array is not array object! HOT 1
- startApp not finding other app even though its installed HOT 5
- Using startApp.getExtras() to retrieve vars if external app is already open in background? HOT 1
- openURL:' is deprecated: first deprecated in iOS 10.0
- Different results when using package param to start app HOT 7
- Showing this error "ActivityNotFoundException: No Activity found to handle Intent" HOT 4
- IOS open baidumap scheme failed HOT 1
- problem with "intentstart":"startActivityForResult" HOT 1
- cordova, when use https, then error
- can't find the /my-app/platforms/android/res/xml/config.xml file
- Plugin stopped working when just setting "intent" to start an activity from another app
- what the version of this pluing? HOT 2
- Problems with API level 30 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from com.lampa.startapp.