• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

App Selection

chrzjim

Lurker
When you 'click' a type of file, Android has a setting which determines which app to call (for that particular file type). Better Open With, Default App Manager, and other apps attempt to control this, but where are the actual settings and can I see/modify myself?

I've looked in Settings>apps>default apps but this doesn't allow me to change (clear defaults doesn't really help).


TIA
 
Why does "clear defaults" not help? If the reason is that the app you want to use doesn't appear in the list then you won't be able to fix it that way.

The way it works is that when you click on a file your file browser broadcasts the "intent" to open a file of this type. The OS will then have a list of apps that have declared themselves able to handle that intent. If there is only one, that app will be invoked to open the file. If one app has been declared the default for that intent it will be used. If no default is set then you are presented with a list of all apps declaring that they can handle it. If an app isn't on that list, it means that it has not subscribed to receive that type of request. In that case telling the OS to direct the intent to that app wouldn't work: you'd just find that clicking on the file did nothing.

An analogy I've heard is that a group of people interested in doing a job sign up to a mailing list. Someone wants to give a job to one of them, so uses the subject line "FAO Peter". Then Peter knows the message is for him and everyone else ignores it. But if Paul is not a member of the list, putting "FAO Paul" as the subject won't get the message to him.

So if I've guessed right and that is your problem, you will need to contact the app developer and ask them to add this functionality. Or else launch the app first and then use it to select and open the file.

If I've guessed wrong and you actually want to for example write an app like Default App Manager yourself, apologies for wasting your time. But in that case to answer your last question, no you won't be able to see or alter any system settings database manually without root.
 
Why does 'clear defaults' not help? If the reason is that the app you want to use doesn't appear in the list then you won't be able to fix it that way.

The way it works is that when you click on a file your file browser broadcasts the 'intent' to open a file of this type. The OS will then have a list of apps that have declared themselves able to handle that intent. If there is only one, that app will be invoked to open the file. If one app has been declared the default for that intent it will be used. If no default is set then you are presented with a list of all apps declaring that they can handle it. If an app isn't on that list, it means that it has not subscribed to receive that type of request. In that case telling the OS to direct the intent to that app wouldn't work: you'd just find that clicking on the file did nothing.

An analogy I've heard is that a group of people interested in doing a job sign up to a mailing list. Someone wants to give a job to one of them, so uses the subject line 'FAO Peter'. Then Peter knows the message is for him and everyone else ignores it. But if Paul is not a member of the list, putting 'FAO Paul' as the subject won't get the message to him.

So if I've guessed right and that is your problem, you will need to contact the app developer and ask them to add this functionality. Or else launch the app first and then use it to select and open the file.

If I've guessed wrong and you actually want to for example write an app like Default App Manager yourself, apologies for wasting your time. But in that case to answer your last question, no you won't be able to see or alter any system settings database manually without root.

With regard to intent, if I try to open a file that could be an input to various apps (say I click an apk file), the selections might be Malwarebytes, Aptoide, or Google Play. Once I select Google Play, shouldn't it remember that next time and not offer the same choices?

This is a Pandora's box. Thanks for your help.
 
It should only remember if you tell it to always use the same app. It should give you the choice "just once" or "use always", and "just once" means it will ask again next time. For some actions it only asks this the second time, the first it just asks you to choose an app.

In my case apks behave this way, though Play Store isn't one of the options I'm offered for apks (these are a funny case though, as different file browsers respond differently for apks - I've one that just offers to install, one that produces the system dialogue, and one that is opening in an inappropriate app that does not have any default actions set...).
 
It should only remember if you tell it to always use the same app. It should give you the choice 'just once' or 'use always', and 'just once' means it will ask again next time. For some actions it only asks this the second time, the first it just asks you to choose an app.

In my case apks behave this way, though Play Store isn't one of the options I'm offered for apks (these are a funny case though, as different file browsers respond differently for apks - I've one that just offers to install, one that produces the system dialogue, and one that is opening in an inappropriate app that does not have any default actions set...).

It does offer Always and Just Once options, but if I select Always it never seems to remember. This is why I'd like to get 'under the hood' and poke around..
 
To be honest I don't know precisely where under the hood this is: I'd have to dig out one of my older (rooted) devices and poke around in /system and see whether I could spot anything. Knowing Android it will be in an sql database somewhere in there.

But I am quite sure that without rooting the phone you will not be able to see it. You'll need administrator access to do something like this.

What file explorer are you using? The one of mine that offers the standard system dialogue for apks is Solid Explorer, and I just checked by setting "use always" for the system package installer and it has definitely remembered that, even after restarting the device. Now if it's using the system dialogue, rather than handling the intent itself, it shouldn't matter what app you use, but given that my other 2(*) file explorers handle apks differently maybe it is worth trying with a different one just to see.

(*) I also have Google's "Files" app, which came with the phone, but this is such a mess that I don't count it as a file explorer. It's honestly like they want a file explorer that hides the filesystem from you! Maybe it makes sense to former iPhone users...
 
To be honest I don't know precisely where under the hood this is: I'd have to dig out one of my older (rooted) devices and poke around in /system and see whether I could spot anything. Knowing Android it will be in an sql database somewhere in there.

But I am quite sure that without rooting the phone you will not be able to see it. You'll need administrator access to do something like this.

What file explorer are you using? The one of mine that offers the standard system dialogue for apks is Solid Explorer, and I just checked by setting 'use always' for the system package installer and it has definitely remembered that, even after restarting the device. Now if it's using the system dialogue, rather than handling the intent itself, it shouldn't matter what app you use, but given that my other 2(*) file explorers handle apks differently maybe it is worth trying with a different one just to see.

(*) I also have Google's 'Files' app, which came with the phone, but this is such a mess that I don't count it as a file explorer. It's honestly like they want a file explorer that hides the filesystem from you! Maybe it makes sense to former iPhone users...

Thanks for your help and advice..
 
Back
Top Bottom