I create different android project in eclipse, but every project include the same name AndroidManifest.xml, can I rename AndroidManifest.xml? Thanks!
No..manifest file work as bridge between your Application and the Android os.so It must be with same name.if you rename Android os doesnt know about your Application..
A big NO and why you want to change name ?
UPDATE
Every application must have an AndroidManifest.xml file in its root directory.
The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app's code.
No you can't rename this. For more information you can read this topic:
https://developer.android.com/guide/topics/manifest/manifest-intro.html
No you cannot rename it, the reason behind this is that it has been used by the android OS, to know the Permissions, as well as to know which activity should be opened at what time. All such controls are written in this AndroidManifest file. So changing its name is not allowed.
Related
I have created an android app with the default root project folder named MyApplication1.
Now I wish to change the name of my app (which I can do without renaming my project folder, by just changing the app name in manifest file).
Will it effect me in any way if I do not change the project's root folder name?
I did not face any problems when changing the projects folder name so I think you won't have any problems either. Although I would suggest you to also refactor the last part of your package name that should be your app name just to keep the 'standards'
I'll suggest you to rename the folder name as well. Because it can cause problems for you when you are trying to access your classes with full static package name in your activities or layout files. Sometimes we do that to pass intents o to create custom views in Layout files. In those kind of situations you will seriously have issues. So it's better to change it now.
I am creating an Android app for blocking contact numbers on android . I am stuck in AndroidManifest.xml. Android studio is giving this error while I have an icon.png file in my res/drawable!
image is here.
I have no idea how to turn simple app into system app!image of error is [here].2
Please remove the .png from your manifest file.
You don't need to add the file extension in manifest file
or layout file. Just the name, without the file extension, will do.
So, your entry should look like this:
android:icon="#drawable/icon"
Remove the ".png" from you manifest, you do not define that here. Also: You should provide proper drawables for different display densities. You could e.g. use this online generator to get them Android Assets Studio : Launcher icons
When you want to use the MODIFY_PHONE_STATE permissions your users will most likely need an open bootloader and root to use your app. You can find some instructions here. You can't move apps to /system without mounting system rewritable, which you need root for. Alternative: Users have to use a custom recovery to push the app to /system, which requires an open bootloader at least.
I am working on an Android project where I want to change the permissions of an application at runtime.
To achieve that, I thought of changing the android:permission tag in the Android Manifest file.
But to change this at run time, I guess it might be possible to change the database where Android manifest file's data are stored.
Please let me know where this database is stored and is it feasible to change it at runtime.
The Manifest.xml file is stored in the signed apk which is in the systems area that you don't have access to without root. So it would only work on rooted devices, you would need to obtain root, possible decrypt the apk, unzip it, make the modification and then, somehow, resign it with the original keystore that was initially used. If you are trying to modify one of your own apps I guess it's possible but it seems like a lot of trouble to go to.
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.
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