How to ensure Cordova App can only be installed on a mobile phone and not on tablets?

260
January 23, 2017, at 9:38 PM

I have a Cordova app I only want users on phones to be able to download. Is there a way to restrict the build so it won't show up in the store when the user is on an iPad or similar?

Answer 1

Yes, include this setting in your config.xml

<preference name="target-device" value="handset" />

See the cordova documentation at https://cordova.apache.org/docs/en/latest/guide/platforms/ios/config.html119

Full disclosure and attribution, I discovered this from an answer on the ionic forums here (suitable for all cordova builds not just ionic framework)

Rent Charter Buses Company
READ ALSO
Mosby MVP - how to recreate Fragment&#39;s state after onDestroyView()?

Mosby MVP - how to recreate Fragment's state after onDestroyView()?

I'm using Mosby Model-View-Presenter library in an Android appIn one particular view I'm using Bottom Navigation implemented with Design Support Library v25

403
JQuery drop function is not being called

JQuery drop function is not being called

I have simple drag and drop functionality from one table to another which works well in how it looks but it appears my drop method is not being called

552
Android Notification fcm vs simple pull

Android Notification fcm vs simple pull

for my android app i need to recive some notifications from a serverThe notifications are by no mean time critical and it would be enouph to check for new notifications when the user opens the app, so no background activity at all

363
Why i am getting error while accessing a url in android but not in postman

Why i am getting error while accessing a url in android but not in postman

Trying to get property of non-object","status_code":500 while accessing json data from a url in android studio ,i am using HttpUrlConnection with in Asynctask class and I checked it through Postman there it is working properly an getting data but from android...

340