So my dilemma is that I have two versions (we'll call version A and B) of my Android application, each on different phones. The difference between them is their launching activity name.
Now, there is a third version of my app which is an upgrade to either of the two versions I described above.
Now, I understand that you should have the same launching activity name on the new version of an app if you want things to upgrade correctly (i.e. keeping the same launcher icon).
So here's the problem: I have this third version that has the same launching activity name as version A, so after the upgrade happens, the same launcher icon is used which is what I want. However, when I try to upgrade version B which uses a different launching activity name from the upgrade, it deletes the old launcher icon and puts in a new launcher icon with the updated name.
This causes at least one notable problem: take the Galaxy Note for instance. You can add folders in your app drawer. If Version B was in a folder to begin with, the upgrade would cause that launcher icon to be removed and then the new launcher icon would be added to the drawer rather with the rest of the applications than the folder.
Now is there a way to provide two names to an activity-alias so that I can solve this issue? Any other suggestions? Please and thanks! I apologize in advance if any of this was not clear. Thanks for reading!
Related
I have two Android projects: project A with a Service, and project B containing the main Activity which depends on the Service in project A. Project A also contains an standalone Activity, but it is not currently being used.
Both projects contain drawables called ic_launcher.png. A uses the default Android icon, and B uses a custom icon for our app.
The problem is that the installed app from project B is using the version of the icon from A (i.e., it's inheriting the icon from A rather than using its own icon). How can I get A to use its own icon and not the icon from B?
I'm using Eclipse, if it matters. I have been using this project structure for a long time and haven't seen this issue pop up until recently. I suspect I could solve the problem by removing the activity and all the icons from A, but I'd rather not do that if I don't have to.
EDIT: this is fundamentally a namespace conflict, since I can apparently to refer to drawables from both the main application and the library project in the manifest. I'd prefer a solution where I can explicitly specify the "namespace" (either project A or B) in the manifest.
The easiest way is to change either the name of your own ic_launcher file or the name of the project A's ic_launcher file.
Like ic_launcher_old or something like that.
I'm using Eclipse and android SDK (with ADT Plugin), I don't know if it's some kind of configuration issue or it's some code problem. Whenever I load an app that I made from scratch (this means not using another existing code or one sample from the library) to my device or run it on the emulator, the entire app will load as "separate" apps, which are the activities. For example, if the app is named "Hello world" and it has two activities, "MainActivity" and "SecondaryActivity", both of them will show up on the device with their names as app names and sharing the app icon on the menu. Now, if I go to settings, "Hello World" appears as an application, now behaving again like it should. This doesn't affect the operation of the app, however, it's annoying to have more than 1 icon launching the same app. The problem is that, when i first used eclipse, this was not happening.
Just in case it helps, I've already re-installed the entire android SDK and the ADT plugin, as well, I tried using 3 different Eclipse versions (classic, EE, and Java developers), none of them seem to work, even though, in the Graphical Layout for any activity, the name of the app is showed in the bar with the app's icon, but running on the emulator or a real device it shows the activity's name there instead. I've looked everywhere and I haven't solved the problem.
Thanks!
Check your manifest to see if more than one activity has this:
<category android:name="android.intent.category.LAUNCHER" />
The answer I found for the above problem is, replace category.LAUNCHER to category.EMBED in all the activities apart from the MainActivity in your manifest file.
I changed the name of my app by editing the #string/app_name string resource. Now when I download it from the Marketplace, I get two icons on my homescreen - one with the old name and one with the new! I'm stumped. I don't know where the old name is coming from. I did a search on the entire project folder and still can't find it!
And yes, I have just one activity with the action.MAIN and category.LAUNCHER intent filters. So any idea what gives?
Did you change the package name too when you changed the app_name? If you did then you have two different apks installed on your device and you need to uninstall the old version of the package from the Settings screen.
Just tested this on another device and only one icon was installed. Must have been something wonky with my development device!
I have rather stupidly published a game on the android market with a package name of mick.game.tangletwister, whereas I should have called it com.rai.tangletwister (where rai is the name of my company)... it all seems to work fine - but could it cause some trouble in the future - should I change it? And if I do change it, will it cause problems for existing users that grab the updated version?
It will be fine if you keep the existing package name. Nothing wrong with that. The TLD.company.appname format is just a convention. As long as you don't enter some special characters in your packagename (which you did not), it will work anyway.
But if you try to change it you will run into trouble. See Things That Cannot Change.
If you change the package, update notification will not work any more. Moreover, when a user with the old package name installs the updated game, he/she will have both installed, because the update will replace the old version only if package/class are the same.
Depending on how many installs you have, you can, of course, remove the existing app from the Market - this should force-remove it from devices where it's installed. Then you create another app (same metadata, naturally) and use a correct package name.
1) Change the package name
2) Create a new app in the android market with that new package name
3) Update the old app, and add a pop-up saying that users should install a new version. Possible with a link to the new app
4) After some months, you should remove the old app.
Like user287351 said, it is possible to keep using the current package name, but i would prefer to have it listed under the correct package name
My goal is to modify the Launcher application and dynamically modify and change the theme.
I saw several 'home' apps at http://www.cyrket.com/p/android/com.stain46.taghome/. It looks like they took the default Home(Launcher) and modified it. How did they do that? What do I need to modify to achieve the same thing?
I have done this with the ICS launcher. You also need to do quite a number of code changes to get it to compile as a normal app because it uses a lot of private internal APIs (despite what Google may have implied). You also need to change the package name. There are two limitations I've found:
There's a filter called TableMaskFilter that isn't available to normal apps. I think this allows the app drawer to be semi-transparent, but I removed uses of it and it looks fine I think.
More critically, it appears there is no way to replicate the widget-adding experience because it requires a permission that only system apps can have. See this question.
Anyway, I put my source here. It compiles and works on the official Galaxy S2 4.0.3, but if you try to add widgets it will crash.
Note, when you're changing the package name, there are places that Eclipse's refactor doesn't notice (e.g. XML layouts). I recommend you do a global text search/replace instead.
The standard Launcher is open source so you can definitely grab it and modify it the way you want. For your app to be used as the Home Screen you will need to specify the correct Intent filter in your AndroidManifest.xml and the user will have to choose your app when they press the Home button. Why don't you grab that code, play with it and come back when you have more questions and more of an idea of what you want to change.
Here i found one stable version Launcher2
I have sharing that GitHub repo. HERE
WIKI of this project :
This project contains the code for the Launcher app that ships with Android Jelly Bean (API 16).
Some minor changes were required from this source code to remove the use of private APIs. These changes have been marked by "// AOSP Change"