3

I am planning to restrict my app to tablets but in the sense that I don't want to add compatibility screen etc. options in manifest. Currently, on app launch my manifest has a splashscreenactivity which launches for about 3 seconds then moves on to another fragment. I already have the code in my app that detects if the device is a tablet or not (say istablet()) , I was wondering if there is a way I can display black screen with a TextView on app launch for tablets letting the user know the app is not compatible on tablets rather than splash screen and follow up fragment.

Any ideas?

Can I call the layout in the application class somehow for the black screen and restrict it from routing further for tablets?

Any help would be greatly appreciated :)

Gourav
  • 2,746
  • 5
  • 28
  • 45
  • Did you try to use width qualifiers? https://developer.android.com/training/multiscreen/screensizes – Nicola Gallazzi Jan 03 '19 at 16:42
  • Well you can use a tablet layout defined in tablet res folder with same name as your splash layout, activity remains same and just check if its tablet do not move to next view. – Anuj Sharma Jan 03 '19 at 16:46
  • isnt there a better way to do this even before the launch activity kicks in, for instance in application class? –  Jan 03 '19 at 16:50
  • @NicolaGallazzi I already have width qualifiers in values, just want to see if I can use them in my application class even before launch activity gets called. is there an easy weay to do this –  Jan 03 '19 at 16:52

0 Answers0