Hello Edunt,
Hello,
Hi David,
It would be nice to have sample project on file transfer plugin in AB. Because this will make it more powerful and additional feature.
I have not time right now, but maybe I can prepare some sample when have some opportunity. But please, ask me this question: are you thinked in some specific kind of files edunt?
Yes, I have specific file. For example: I want client to download *.apk file and install the file their devices, whenever update is available. But I don't want them to use playstore.
The only two ways they can download the file are through playstore and using web browser. Which I don't want them to use it.
How can this be achieveable?
I think there is not easy to download an APK file and then run it: first of all, not all the devices are ready to install applications' APK files, since they must use the different stores. If we avoid this maybe we enters in other problems, because, probably installing an application from another is not the expected behaviour, so may the sytem can say something about.
Anyway, if you want to distribute your applications out of the stores (which is possible and to me acceptable after all) in my opinion you no need to download any APK file, but just look if any new application's release is available. You know that, if we install the application from an store, the store itself is responsible to maintain the application update, based in the app's ID.
Since we can't use the store's updater we may wanted to prepare one for our application (your own case) but to do this maybe its sufficient to check if a new application release exists, and, if exists, just let the user to download and install the new application release. At this point we may use the "OpenWindow" action using the new APK release URL.
Or maybe we can use the "OpenWindow" action to redirect the user to the appropiate website from the new application release can be downloaded. In few words (and this is what I do in your case) we must to check if a new release of the application exists (this is quite easy using an HttpClient control) and then inform the user in order to download and install the new release by itself.
P.S. Certainly, with the help of the Cordova's Files and FileTransfer plugins, maybe it's possible to download an APK (we can download any kind of file in principle) and maybe it's possible to execute it. If you continue wanted something like that, Edunt, I only can refer you to the plugin's documentation, then you can try to implement it. If you have any question or need help during the implementation, please, don't hesitate to post it here or better in a new forum's thread.