cordova-misc / cordova-webintent Goto Github PK
View Code? Open in Web Editor NEWWebIntent Android Plugin for Cordova 3.X
WebIntent Android Plugin for Cordova 3.X
Hi
Is there a possibility to do silent installation through this plugin?
thanks
rex
If you download and install an api file, and try to do this:
window.plugins.webintent.startActivity(
{
action:window.plugins.webintent.ACTION_VIEW,
url:fileEntry.toURL(),
type:'application/vnd.android.package-archive'
},
function() {
...
You get these errors in the console:
/FileTransfer( 4326): download http://192.168.1.11/android/RestaurantSuite.apk to file:///data/data/com.restaurantsuite.restaurantsuite/files/files/RestaurantSuite.apk
D/FileTransfer( 4326): Download file:http://192.168.1.11/android/RestaurantSuite.apk
D/FileTransfer( 4326): Saved file: file:///data/data/com.restaurantsuite.restaurantsuite/files/files/RestaurantSuite.apk
I/ActivityManager( 1482): START u0 {act=android.intent.action.VIEW dat=file:///RestaurantSuite.apk typ=application/vnd.android.package-archive cmp=com.android.packageinstaller/.PackageInstallerActivity} from uid 10056 on display 0
D/CordovaActivity( 4326): Paused the activity.
W/asset ( 2402): Asset path /RestaurantSuite.apk is neither a directory nor file (type=1).
W/PackageInstaller( 2402): Parse error when parsing manifest. Discontinuing installation
The apk file is downloading fine. I've even put debug messages in to ensure that the size of the downloaded file is the same as the size of the original file on the server.
This is the very last thing which is preventing my app from being able to update itself when a new release is applied to a specific subscriber, which is a VERY IMPORTANT feature for this app, as the API between the app and the backend is subject to change, and EVERY TIME the app runs, it MUST be the same version as what the backend API is expecting, otherwiwse certain features may or may not work reliably.
Cordova version 8.0.0
Android API version 27
Please fix.
Thanks!
The startActivity fail handler actually does not give any data about failing.
It would be very useful if some data is returned when startActivity fails:
window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_VIEW,
url: 'geo:0,0?q=' + address},
function () {},
function (SOMETHING_TO_UNDERSTAND_SITUATION) {
console.error('Failed to open URL via Android Intent',SOMETHING_TO_UNDERSTAND_SITUATION);
}
);
is it possible to add this?
I am able to make this work in android 6
but when i tried updating my app in android 9 it says
Failed to open URL via Android Intent.
does this have any limitation as of the moment?
I've been trying to make this plugin work for one of my projects but I keep getting a null value for uri (or sometimes empty string) when I share an image etc from another app.
Now, I'm confused if I even understand the purpose of this project.
I wanted to let users share content from other apps/websites with my app. First of all, the plugin by itself did not do anything, then I had to follow some configuration suggestions at Initsogar/cordova-webintent project then the app started showing up in share control on other apps.
I must also admit that I did not try running startActivity function yet as I thought it was not needed for receiving content from other apps. Is it necessary? If yes, what needs to go in url?
Now that the install referrer intent handling is merged to master, would it be a good time to bump the version in plugin.xml, create and push a corresponding git tag, and then add the release notes to the corresponding entry that GitHub will add to https://github.com/chrisekelley/cordova-webintent/releases?
That should allow users of this plugin who want to use the new functionality to update their dependency to the new release version.
I am successfully using the plugin to pull up another app. However, I need to get the result from the app. I don't see an option to startActivityForResult. Is this possible and something I am just missing in the plugin?
can this project support ionic ?
@chrisekelley If you are actively maintaining this repo, would you be interested in publishing it to NPM? That would be mighty helpful for build procedures requiring this code. Currently, Boris' old code is the only version available on NPM: https://www.npmjs.com/package/phonegap-webintent
Running cordova prepare
on a fresh clone of a cordova project that uses your plugin results in the following error:
Failed to restore plugin "com.borismus.webintent" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.borismus.webintent@https://github.com/cordova-misc/cordova-webintent.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module
Any chance you could fix the plugin definition so we don't have to go hunting through the one hundred and eighty three forks or add yet another one to get this to work? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.