Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app for phone and tablet: 1 or 2 apps?

Tags:

android

I have to develop an application for both Android phones as tablets. The application logic is the same, while the UI is completely different. I'm wondering how I should deal with this: make 1 big app for both, or an app for phone and an app for tablet (and then upload the 2 apk's as 1 app in the market).

When I make 1 application, I should check if it's phone or tablet in code to redirect to the appropriate activity. Also I should include compatibility code to make it compile for phones. If I would make 2 apps, I don't need that check and I also don't need to include the compatibility code, so the app would be a lot smaller. But in that case I'll have to copy/paste the application logic constantly from one project to the other one while development.

So that's why I'm wondering, what's the best practice in this case? I've been searching for information about this, but I only find articles about how to manage the different xml layouts, or articles with not so much information in it.

like image 937
Arne517 Avatar asked Sep 19 '11 08:09

Arne517


People also ask

Can I have same app on phone and tablet?

You can use apps you bought on Google Play on any Android device without paying again. However, each device must have the same Google Account on it.

Can you share apps between Android phone and tablet?

Scroll down and tap the Google entry. In that screen, tap Device Connections, then tap Nearby Share, and then make sure the On/Off slider is set to On (Figure A). Enabling Nearby Share on Android 11. Once both sender and receiver devices have Nearby Share enabled, you're ready to share an app.

Can I have 2 apps the same on Android?

Using the Native Android Cloning FeatureIt lets you run multiple copies of the same app without having to install any third-party tool. This feature is available on Samsung, Xiaomi, Oppo, and OnePlus phones, among others. More brands may well adopt this functionality in the future.

Why do I have 2 phone apps on my Android?

It is possible to have hundreds of apps with the same name on one phone because the name you see as a user has nothing to do with the name which sees Android (for example the system name for Shazam is com. shazam.


2 Answers

My Answer, one app. The iosched - Google I/O App for Android demo example from Google I/O explains everthing about how and what. Source Code available! Worth trying it!

Apk Download Link : http://www.mediafire.com/?wck52jweyz1

like image 183
Vinayak Bevinakatti Avatar answered Oct 21 '22 21:10

Vinayak Bevinakatti


Certainly make one application.

You can create different layout files for phones and tablets. For tablets you should create extra layout file in res folder which is called layout-large (for tablets), for phone which provides default layout file, and at the same time for landscape mode you can create one more folder named as layout-large-landscape (tablets) for phones layout-landscape

create extra resourse folders like this

and add some tags to support multiple screens:

  1. <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="9"/>
  2. <supports-screens android:anyDensity="true" />
like image 40
sravan Avatar answered Oct 21 '22 19:10

sravan