fortunecity.com
home   |   about us   |   contact us   
 
   
 
 
Occasionally a developer from google android development can make a change for an application which has surprising outcomes when installed being an update to some previous edition — cutting corners break, widgets vanish, or this can’t actually be installed whatsoever. There tend to be certain areas of an application which are immutable when you publish this, and you are able to avoid surprises through understanding all of them.
Your bundle name as well as certificate

The obvious and visible of those is the actual “manifest bundle name, ” the initial name you share with your software in it's AndroidManifest. xml. The name runs on the Java-language-style identifying convention, with Web domain ownership helping avoid title collisions. For instance, since Search engines owns the actual domain “google. com”, the show itself package titles of our applications should begin with “com. search engines. ” It’s essential for developers to follow along with this convention to prevent conflicts along with other designers.

Once a person publish the application under it's manifest bundle name, this is actually the unique identity from the application permanently more. Switching to another name leads to an completely new software, one which can’t end up being installed being an update towards the existing software.

Just because important since the manifest bundle name may be the certificate which application is actually signed along with. The putting your signature on certificate represents the writer of the applying. If a person change the actual certificate a credit card applicatoin is authorized with, it's now another application since it comes from the different writer. This various application can’t end up being uploaded to promote as a good update towards the original software, nor could it be installed onto a tool as a good update.

The precise behavior the consumer sees whenever installing a credit card applicatoin that offers changed in one of these simple two ways differs:

*

When the manifest bundle name offers changed, the brand new application is going to be installed together with the aged application, so these people both co-exist about the user’s device simultaneously.
*

When the signing certification changes, trying to set up the brand new application to the device may fail before old edition is un-installed.

If a person change the actual signing certificate of the application, it is best to change it's manifest bundle name too to prevent failures whenever it’s set up. In additional words, the application from the different author causes it to be a various application, and it is package name ought to be changed properly to reveal that. (Obviously it’s fine to make use of the exact same package name for that development builds of the app signed together with your test secrets, because they are not released. )#)
Your own AndroidManifest. xml is really a public API

A lot more than just your own package name that's immutable. A significant function from the AndroidManifest. xml is basically to announce a open public API out of your application with regard to use through other applications and also the Android program. Every element you declare within the manifest that isn't private (that's whose google android: exported state holds true) ought to be treated like a public API and not changed in a manner that breaks compatibility.

A delicate but essential requirement of what is really a break within compatibility may be the android: name attribute of the activity, support, and recipient components. This is often surprising simply because we think about android: name because pointing towards the private signal implementing the application, but it's also (in conjunction with the show itself package title) the state unique open public name for your component, as represented through the ComponentName course.

Changing the actual component name inside an application might have negative consequences for the users. A few examples are:

*

When the name of the main activity of the application is actually changed, any shortcuts the consumer made into it won't work. A shortcut is definitely an Intent which directly specifies the actual ComponentName it will run.
*

When the name of the service applying a Reside Wallpaper modifications, then the user that has enabled your own Live Wallpaper may have their picture revert towards the system default when obtaining the new version of the app. Exactly the same is accurate for Enter Methods, Ease of access Services, Honeycomb’s brand new advanced Widgets, and so forth.
*

When the name of the receiver implementing a tool Admin modifications, then just like the reside wallpaper instance, the gadget admin is going to be disabled once the application is actually updated. This applies in order to other types of receivers, for example App Widgets.

These actions are an results of how the actual Intent system can be used on Google android. There tend to be two main types of Intents:

*

Implicit Intents just specify “what” they ought to match, utilizing actions, groups, data, MIME kinds, and the like. The precise components that they'll find are just determined from run-time, through the Package Supervisor matching it from the current programs.
*

Explicit Intents specify just one explicit “who” they ought to match, via a ComponentName. No matter whatever else is within the Intention, it is just linked to the exact show itself package title and course name because given within its ComponentName.

These two types associated with Intents are essential to exactly how Android interacts together with your application. A standard example of this is the way users browse and choose live wall papers.

To allow user choose a live picture, the very first thing Android need to do is demonstrate to them a summary of the obtainable live picture services. It will this because they build an implied Intent using the appropriate action for any live picture and requesting the Bundle Manager for those services which support this particular Intent. The end result is then your list associated with live wallpapers proven to the person.

When the consumer actually selects a particular live wallpaper they would like to use, nevertheless, Android right now must construct an specific Intent which identifies that one live picture. This is what's handed towards the WallpaperManager to inform it that wallpaper to exhibit.

This is the reason why changing the actual name from the component inside your manifest may cause the picture to vanish: the specific Intent which was previously saved has become invalid since the ComponentName this references no more exists. There isn't any information open to indicate what the brand new name from the component is actually. (For instance consider in case your application experienced two various live picture services the consumer could choose. )#) Rather, Android should treat which live picture as un-installed and go back to it's default picture.

This is actually how enter methods, gadget administrators, accounts managers, application widgets, as well as application cutting corners work. The ComponentName may be the public distinctive name from the components a person declare inside your manifest, and mustn't change when they are noticeable to additional applications.

To conclude: There tend to be some areas of your application that may not alter. Please be cautious.