Change launch Operation name in the new version of the application

I developed a new version of the application, and I changed the name of the activity being launched.

Before updating, the manifest had:

<activity android:name=".Splash" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> 

and then I just changed the name and action package, and now this:

  <activity android:name=".view.SplashActivity" ... > ... </activity> 

what happens is that after users download the application from the market, the launcher does not refresh and still causes the old path to activity.

Do you know how to solve this?

+4
source share
2 answers

Refer Things That Can't Change

It says:

A subtle but important aspect of what constitutes a compatibility gap is the android: name attribute of your activity, service, and receiver components. This may be surprising because we think of android: name as pointing to a private code that implements our application, but also (in combination with the manifest package name) the official unique public name for this component, represented by the ComponentName class.

Changing the name of a component within an application can have negative consequences for your users. Here are some examples:

  • If the name of the main action of your application is changed, any shortcuts made by the user will no longer work. A shortcut is an intent that directly indicates the name of the component that should be executed.
  • If the name of the service that implements Live Wallpaper changes, then the user who turned on your Live Wallpaper will have his own wallpaper, returning to the system standard when receiving a new version of your application. The same can be said about input methods, accessibility services, new advanced Honeycombs widgets, etc.
  • If the name of the recipient using the Device Administrator changes, then, as in the example with live images, the device administrator will be disconnected when the application is updated. This also applies to other types of receivers, such as application widgets.

Therefore, if possible, do not change the name of the components declared in the manifest, or remove any icon pointing to this component using the code below.

 ComponentName componentToDisable = new ComponentName("application.package.name", "packagename.ActivityClassName"); getPackageManager().setComponentEnabledSetting(componentToDisable, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); 

Also specify a new launch activity in the manifest using <intent-filter>...</intent-filter> so that your new activity is launched when the user clicks the launch icon.

+6
source

Whether the action is called correctly if you start the operation in debug mode on your phone.

If so, if you have done any of the following:

  • you changed the name of the whole package
  • you signed it at all or not correctly

You can also check out http://developer.android.com/guide/publishing/publishing_overview.html

Anyway. If the application works correctly on your debugging phone, something is wrong with your publishing settings, and you should go through the page step by step.

If you cannot check the path values, such as the package and the name of the activity and filters.

0
source

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


All Articles