Ionic production build dont detect my android tablet

Since i updated to 3.0.0, i get an problem with ionic Platform:

I’m running on crosswalk, all work fine in a normal build, but, when i do a production build, Platform dont recognize my tablet device, someone already got this?


1 Like

What do you mean by that?

i mean the Platform service ( import { Platform } from ‘ionic-angular’; )

In my app.component i have :

this.platform.ready().then(() => {
             if ('tablet')) {
                 //run in tablet mode
                 //run in mobile mode

if i do a dev build (ionic run android) it run my app like a tablet on my tablet , all work fine,
if i do a prod build (ionic run android --prod) it run my app like a mobile phone on my tablet.

I have the same problem, if I build the app with --prod parameter and use zipalign after build process the istablet check return false. If I build the app without --prod parameter and use zipalign after build process the istablet check return true. If I build with --prod parameter and doesn`t use zipalign after build process the istablet check return also true on different tablets.
In my case the problem be produced in compination of --prod parameter and zipalign.
Does someone know why this happen? Does I need zipalign to improve performance or is the --prod parameter enough?

Does this also happen in a new project that contains nothing but the istablet output? If so, publish it on Github and create an issue for Ionic on Github with the bug description and a link to that repo.

With a complete new project the problem exist also after "ionic build android --release --prod"
The problem is the cordova-plugin-crosswalk-webview Plugin as usiko wrote.

Please create an issue with Ionic on Github and link to it here. Thanks.

For this moment i’ve resolved this problem by creating a platform provider, look at this way :

1 Like

1 Like

I am using‘tablet’) too let the app decide if the user can screen rotate on Tablets. Too bad I can’t use this on crosswalk.

This is the same by me.
After 1 year, this issue (and the linked issue) is still open, how could that happen? There is no one interested in android tablet development?

Have you found a workaround?

did u run ur application in a tablette cuz i am blocked here ?