Is it possible to install the application via adb, but still get updates on the Google Market?

My company distributes both hardware (samsung galaxy tab 10.1) and software (my application) for our customers.

My intention is to β€œskip” the google account link and use adb to install my application signed with the product directly on the tablet (identical to downloading apk I google market). This will allow me to pre-configure the tablets for our customers, change the screen background to our logo, etc.

However, as soon as the tablet is delivered to the client, I want them to attach a google account to the tablet and still be able to receive updates from my application through the market. In my testing, the application that I installed manually never appears in the list of applications on the google market.

Is it possible?

Tim

UPDATE: in the end, I wrote the Launcher application, which I will manually install on the device. He has one activity with the theme:

android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" 

activity has this code:

 public class LauncherActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); startApplication("applicationnamehere"); finish(); // this kills the activity immediately. } public void startApplication(String application_name){ boolean successfulLaunch = false; try{ Intent intent = new Intent("android.intent.action.MAIN"); intent.addCategory("android.intent.category.LAUNCHER"); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); List<ResolveInfo> resolveinfo_list = getPackageManager().queryIntentActivities(intent, 0); for(ResolveInfo info:resolveinfo_list){ if(info.activityInfo.packageName.equalsIgnoreCase(application_name)){ Intent launch_intent = new Intent("android.intent.action.MAIN"); launch_intent.addCategory("android.intent.category.LAUNCHER"); launch_intent.setComponent(new ComponentName(info.activityInfo.packageName, info.activityInfo.name)); launch_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(launch_intent); successfulLaunch = true; break; } } } catch (ActivityNotFoundException e) { launchMarket(); } if (!successfulLaunch) launchMarket(); } private void launchMarket() { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=packagenamegoeshere")); startActivity(intent); } 

}

You can stuff constants in strings.xml.

This works well with the only problem being that it freezes on the main screen even after my main application has been installed by the user. Since it (by default) is trying to launch LAUNCHER for my application, this is not the end of the world.

+4
source share
4 answers

It should be possible - see what Titanium Backup does. It has a Market Doctor feature that can restore links to the Android Market after restoring apks and data files using Titanium Backup.

You can also try downloading the factory image to any phone or tablet, skip the process of creating an account and see what the database looks like on the market for applications such as Youtube, Facebook, Gmail, Maps, etc.

+3
source

In my testing, the application that I installed manually never appears in the list of applications on the google market

This is because you did not publish your application on the Android market.

Is it possible?

As long as you use the same package name, maintain it in AndroidManifest.xml and sign with the same keystore. where and how to get the latest apk version does not matter, this will lead to an update.

Checkout Signature Strategies - Updating the application from the official developer guide.

+1
source

I found that after installation through adb I will receive application updates if the following criteria are met: 1. the same package name 2. version code specified in the AndroidManifest.xml version adb <version of the game version store version 3. same key, which is used to sign as

+1
source

It is possible. Evidence. Most phones come with YouTube, Twitter, Facebook and other applications, and these applications can be updated through the Market.

0
source

Source: https://habr.com/ru/post/1390729/


All Articles