I download a ics file (Outlook Calendar File) from a mail attachment in my application. Another application also downloads the ics file. I need to set my application as the default application to open the ics files (from my program). Is there any possibility to know our application is the default application or not from our program?
If my application is not a default application, is the user select my application at that time i have to get some details from the user.Can anyone help me to solve this???
When the user tries to open an ICS file, the user will be prompted to open it with your app or with another app. The user will then be given the option to make the current selection the default one, so as not to be faced with the question again.
This decision should always be in the hands of the user.
Android has already solved this natively, and you don't have to bother with it.
Related
For a customer of mine, we have developed an app which is provided with a tablet as a default launcher. Now every so often we want to update the app - preferably without access to the tablet - so pretty much remotely. The app is not listed on play store, it's being installed as a .apk file by us in-house on the tablet and then sent to the customer.
How do I go about being able to force updates to it? App has internet connectivity, it's written in Cordova or Android native (we have 2 apps).
You can use the cordova File plugin to gain access and permission to write files to disk, then include a function that checks a value on your server to determine if the app is up to date or not. If the app is not running the current version... then your app can call a function that downloads the updated app pages/scripts and saves them locally.
To be safe, i would recommend implementing a dynamic splash screen (of your own) that checks to see if there are any downloaded update-files to be transferred to the active app directory.
So the next time the app starts, the splash screen will just stay up a little longer and let the user know that an update is in progress... whilst your update function copy, edit and replace the files in the background.
This is something you should test thoroughly before shipping as it can sometimes break your application if the app is suspended during a file write.
You can read more about the cordova file plugin here: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/
Does phonegap allow us to update the app we created if I want to add or change something later on?
For example, I created an app and installed on my Android cellphone. Now I want to change some content of this app. Is that possible to achieve that without installing the full .apk file again?
A similar question here: How to update app with phonegap
However,the answer "update them in your project then submit a new apk to Google Play" still makes me confused -- submitting a new apk to google then my installed app would know there is a new version? and would update??
It's impossible. You cannot update the app in user cellphone unless your app force user to update the app. IBM Worklight can do force update.
One way would be to put you html files on live server and change it from there. Suppose your files are in www.example.com site. Like www.example.com/main.html You can refer to this link from your phonegap app. And you can control it as you wish without forcing any installation.
But it comes with a price. Your app user have to be connected to internet for full time.
Is it possible to remove or disable Done button which comes when any application is installed. I want that the user must open my application.
Thanks in advance.
No. That's the play store, its a separate application you have no control over. Besides, the user may not want to immediately open your app (I tend to download several in the background and open them later). Why should he be forced to?
I know that an Android application can install more than 1 icon to the user's launcher simply by having a tag in the manifest, as explained here: Android App actvities installed as multiple icons
However, the above solution happens automatically. Instead, I would like to give the option to the user to install a 2nd, 3rd, or more icons for my app by letting them press a button. So, for example, if I were a Restaurants app, I could encourage the user to install a quick access icon to a particular cuisine (let's say sushi) in addition to the icon they already have for the app.
I've noticed that WhatsApp for Android does this. You can choose to install a shortcut that launches a particular conversation directly. So I have a strong feeling it's possible but haven't found any material that explains how.
Thanks in advance!
Just found the solution to this here:
How to enable automatic shortcut creation after app downloads and installs from Android Market?
Thanks for everyone who looked!
I wanted to have a web page with a link pointing to the apk app in a market (this is possible), but if the app already exists on the device did not want him to redirect the market but that the app is open soon as the app on the device.
Is that possible?
thank you
There's no way to do that on a website. You can create a link to the application on Market, and if the user is on an Android device, he or she will be redirected to the Market application - from here it's possible to see if it's installed or not.
Should you want to do it in Java code, you can use #Pedro's advice with a simple check.
You can use PackageManager.getInstalledApplications and check if the app you're looking for is listed.