install multiple apks on one device tries to replace previous app - android

I install my apps by sending the apk file to my gmail account as an attachment and then install the app from there. But by doing this, I find that I can install only one app at any point. the device tries to replace any previously installed app if i try to download and install another one. I found the same thing when sideloading the apps through command prompt. am i missing something here?
any help is appreciated.
thanks.

You need to have different package names for the apps , also if you do this, put separate names too to avoid confusion on your home screen.

There are two kinds of packages in Android-land. One is the Java package that your classes are in and the other is the Android package that is in the manifest. I assume that you are talking about the Android package, not the Java class package, right? I was confused by the need to give a package name in the manifest and assumed that it wanted the Java package name. And since I used the same Java package for both of my first two apps, when I installed the second one, it replaced the first one.
On a related question, what is a typical naming convention for Android packages?

First of all, go to File and find Export to zip file and click it.
Like here:
.
Now extract the generated zip file and reopen this Android project. It works for me.

Try renaming the .apk files, that might help.

Related

Install multiple apps in one step (Android)

I'm trying to find a way to "package" my apps in one super app that downloads and installs all my apps.
So far my options seem to be:
Make an interface app that links to each of my apps in the app store (too many steps).
Create a big apk file containing all my apps that would drop my apps in a folder on the device and run a script to install them all (not sure if possible).
?
Any help very much appreciated.
create a big apk file containing all my apps that would drop my apps in a folder on the device and run a script to install them all (not sure if possible)
You cannot install them. You can help the user install them, by calling startActivity() to bring up each one in sequence, but this will be a similar number of steps to the approach that you rejected. It also means that you will take up double the disk space (copy in your "super" APK plus the installed copy of each app).
???
Have only one app in the first place.
For systems that have ROOT permission,copy apks to /data/app directory.For the other,achieve every function in one package and show these functions' activities in launcher.Just like several apks have been inatalled in one time.

My Developed Android App Was Replaced When I Install Another App

While developing android apps, I found out that why previous apps was replaced when I installed another app using apk file.
The apps have different names, labels, but the same package name. Is that ok?
take a look at your package name. The package name must be unique. May thats your problem
The apps have different names, labels, but the same package name. Is
that ok?
No, it's not Ok. The package name is how the system uniquely identifies one app.
for example you should/could your packages name as:
com.jrgalia.app_1_name
com.jrgalia.app_2_name
com.jrgalia.app_3_name
etc...
To be very specific as why your app got replaced. All applications will be stored in /data/data/package_name
If you do adb install then the folder and its content will be replaced by your new operation, that is why while uploading to google play it makes sure package names are unique.

How do I open a .apk google example?

Ok so I want to learn android push notifications. I found at android to use the C2DM service.
http://code.google.com/android/c2dm/
Great they even give me an example. http://code.google.com/p/jumpnote/downloads/list
My problem is I don't know what to do with the file after I download it. :P
It is an .apk file. So how do I open it in eclipse to learn from it?
An apk is an android install app thingy you run it on your phone. To edit search android code examples and select the first one select what you want to edit dowbload the manifest and the other files and edit them in eclipse. Have you ever tried opening a .exe in notepad it does not work so well because it is already compiled same (i think) with the. Apk also make sure you have the android plugib for exlipse. Sorry for the strange language I am a delvoper who forgets the name of everything. And the grammer i am only 13.
Rename it to .zip and you can open it with your favorite zip unarchiving program.

How to access data directory when updating an Android app where I have changed the package in the Manifest

I have an Android app in the Market and I want to push an update. The problem is that after refactoring my base package name in the Manifest file is completely different. I feel I'm in trouble because (in order to migrate old data) I need to access a file stored in:
/data/data/old_app_pkg_name/app_data
but with my refactoring I'll probably be able to access the data directory in:
/data/data/new_app_pkg_name/app_data
Am I stuck with using the same old package name if I want to access the data directory of the original app? Or I do have access to that directory when pushing an update even if I change the package in the Manifest?
Best!
German
You probably can't. Unfortunately Android generates a new user the combination of package name and signing certificate. If you had created your old files as WORLD_READABLE on the SD card then maybe you would have been able to do it, but as far as I am aware once you change the package name you can't get to the old directory any more.
Answering my own question and just for the benefit of anyone struggling with this here's a great new blog post from the Android team about what to keep when updating your app:
http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html
(I wish it was available when I asked this question but it wasn't, it's new)
Best!
German

Auto install Android app

When I download a apk file I need to first save it before I can install. Is there anyway to dirctly install it without saving? Do I need to make any changes in the AndroidManifest.xml?
It think what manifest file hasn't any power here. It is up to OS to do this. And it think (as a user) what download must not lead to auto installation of downloaded program.
AFAIK, an app is not extracted when it is installed, but the whole APK reacts as the self contained application. Thus, you must keep the APK in order to use the application. And if you're keeping it, then downloading it is the only option.

Categories

Resources