All Questions
859
questions
438
votes
16
answers
484k
views
How to get package name from anywhere?
I am aware of the availability of Context.getApplicationContext() and View.getContext(), through which I can actually call Context.getPackageName() to retrieve the package name of an application.
...
215
votes
20
answers
518k
views
Does Android keep the .apk files? if so where?
After android installs an application from the Marketplace, does it keep the .apk file?
Is there a standard location where Android would keep such files?
170
votes
7
answers
193k
views
Is it possible to change the package name of an Android app on Google Play?
I would like to know whether it is technically possible, not whether it is easy or not, to change the actual package name of an Android app that is on Google Play. What I mean by package name is the ...
132
votes
16
answers
123k
views
How to change package name of Android Project in Eclipse?
I have an Android project created in Eclipse. I want to modify the package name and application of the project. How do I do that in Eclipse?
128
votes
9
answers
186k
views
The import android.support cannot be resolved
I am trying to run the code provided HERE
I downloaded the code from their Github and imported into Android SDK, but it shows error at the lines
import android.support.v4.app.FragmentActivity;
...
68
votes
9
answers
64k
views
How to check if Facebook is installed Android
I am modifying my app to be able to catch if a user tries to publish without having the facebook app installed (required for SSO). Here is the code I am using:
try{
ApplicationInfo info = ...
54
votes
5
answers
26k
views
What's the convention for java package names without a domain association?
I can't find a Q/A on SO that answers my exact question, so I figure I'd post it and see what comes back.
As far as the naming convention goes for Java packages, I understand that it's supposed to be ...
47
votes
9
answers
17k
views
Error about Android Studio on Macbook M1: An error occurred while trying to compute required packages
I've downloaded Android Studio from the official website, the one for M1 chip (arm).
Basically running it for the first time, the error is the following:
An error occurred while trying to compute ...
45
votes
5
answers
39k
views
Cordova + Ionic framework - How to safely change package name?
i would like to change default name of the installation package from default com.ionicframework.starterto com.something.something, how can i do it safely please? What i should to edit?
Thanks for any ...
45
votes
7
answers
124k
views
What should be the package name of android app?
I want to know that what should be the package name of android app? Means normally we used com.appname OR com.organizationName.appName, But when we are submitting our application in to market then ...
41
votes
19
answers
47k
views
Error while running zipalign
I got this error when trying to export a signed apk in Eclipse
Error while running zipalign:
Unable to open
as zip archive
I have run the Help->Check for Updates to make sure the latest update is ...
40
votes
1
answer
13k
views
Android Package Structure Best Practice [closed]
I have a question regarding best practices for application package structure.
I watched Reto Meier's Google I/O 2011 presentation "Android Protips: Advanced Topics for Expert Android Developers" ...
37
votes
2
answers
9k
views
How do I prevent Android Studio from automatically collapsing my packages in project navigation?
I have run into this annoyance over and over again and have been unable to find a solution or an answer here for it:
When I create a package in my application and then add a package within it, if I ...
33
votes
5
answers
50k
views
Android: Including multiple Java Packages to Manifest
The app I am developing has many activities organized into seven java packages. Originally I wrote all the coding and stuff for each group of activities in a java package as different projects.
Now I'...
33
votes
2
answers
9k
views
What does 'ICU' stand for in Android SDK?
Have seen new packages in Android SDK docs. All of them are available in API level 24 which corresponds to Android Nougat and seem to replace the 'java.xxx' packages by 'android.icu.xxx'. For example:
...
30
votes
3
answers
111k
views
What is the package name of the Google Play app and the AndroidPIT app?
What is the package name of the Google Play app and the AndroidPIT app?
29
votes
3
answers
35k
views
How to include the Spongy Castle JAR in Android?
Apparently Spongy Castle is the Android alternative to using a full version of Bouncy Castle.
However, on importing the jar I'm getting all kinds of "cannot be resolved" errors because it relies on ...
28
votes
1
answer
28k
views
What is the use of LOCAL_MODULE_TAGS?
I want to update my Android.mk file in a package in order to build that new package, but I don't understand what the purpose of the LOCAL_MODULE_TAGS is.
What does the LOCAL_MODULE_TAGS do?
23
votes
5
answers
35k
views
Change package name to existing Phonegap projects
I have an android phonegap project, and an ios phonegap project.
They were created using a given package name, but I now have to change this package name.
In Android, I think I have to change ...
22
votes
1
answer
21k
views
Flutter App is not working after changing package name
I am trying to release my apk and just changed the com.example package name to my own com.[companynamehere].[appname] in the AndroidManifest.xml file and app/build.gradle file, however now my app ...
21
votes
7
answers
7k
views
Change Package Name after implementation of data binding
I'm using Databinding with one of my project with project name com.abc.def. I've related all my views with binding like
ActivityLoginBinding binding = DataBindingUtil.setContentView(this, R.layout....
21
votes
6
answers
15k
views
Listing of manufacturer's clock / alarm package and class name, Please add [closed]
THis is not really a question, Sorry. I just wanted help on getting the package and class names of alarm and clocks of different android makers' clock and alarm.
I have a listing here of HTC, Samsung,...
20
votes
4
answers
22k
views
Eclipse Java - invalid package name - Reserved words in package name
I am in the middle of an android project and was trying to create a new package in it.
com.mycompany.myprojectname.new
Well, Eclipse is not letting me to create it and is showing this error:
...
19
votes
2
answers
8k
views
Android Studio Copy Module
I am trying to make a copy of a module in Android Studio, to make small changes. How can I do that? I found several solution but i did not get any to work. Instead of posting my questions in several ...
18
votes
1
answer
399
views
Package names for domains which end in .do
Convention when building an app holds that the package name should begin with one's reverse domain string, e.g., com.google.MySampleApp.
However, our company is registered at a .do domain, which ...
17
votes
1
answer
1k
views
Monkey made my app meow
I ran the exerciser monkey on my app, and for some odd reason, my app meowed! I have no sound files in my project at all, so I'm a bit confused why a 'meow' sound played.
Any explanations here?
...
16
votes
7
answers
26k
views
need help changing my package name in eclipse
so my package name is com.soundboard right now.
obviously this name is taken...I am having trouble changing it throughout the package name.
I checked a few posts here and did the refactor > rename ...
16
votes
8
answers
39k
views
android, how to get package name?
In my application I need to know the name of package name. I have no problem when I want to grab it in activities but i can't take it in other classes. Following code is working in activity but i don'...
15
votes
2
answers
4k
views
ActivityNotFoundException when different package's targetClass in PreferenceScreen
The application's default package is "example.app".
and the target activity's package is "example.app.abc".
Calling startActivity() for "example.app.abc.TheActivity" in java code just works,
but ...
15
votes
5
answers
12k
views
Android call method from another app
I have 2 android apps. Both are installed on the phone. Lets say the package name for the two are com.android.test1 and com.android.test2. How can i call the method Main2method() from the test1.Main ...
14
votes
7
answers
12k
views
Change default package from com.example for Eclipse Android projects
I am using Eclipse 4.2 with Android SDK.
I am wondering if it is possible to change the default package ID com.example that shows in the "New Android Application" wizard as you type the application ...
13
votes
3
answers
4k
views
android studio folders inside packages
how can I have a directory structure like
src/main/java/com.L33Tcode.example/Adapters
src/main/java/com.L33Tcode.example/Fragments
android studio doesn't seem to want to let me have source folders ...
12
votes
5
answers
10k
views
Android application manager shows wrong app name
Does anyone know why the application manager, found by going to settings->application manager, is showing the wrong name for my application? I installed my app twice under different names and with ...
12
votes
3
answers
8k
views
Get Icon from another android Application
How do I get to the Icon Launcher from another Android application on the device if I know its Package Name?
Example
String googlePackageName = "com.google.maps";
Drawable googleIcon = ...
12
votes
3
answers
6k
views
Android MVP pattern package structure
I saw various great tutorials on MVP pattern in android, but the authors all seem to have different practice on packaging.
The first tutorial I saw did the packaging by functionalities. Such as, "...
12
votes
11
answers
19k
views
Please install package: 'Android Support Library'
I am coding a Xamarin application and these are the errors that I am getting when building my application:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error ...
12
votes
3
answers
18k
views
android not receiving Intent ACTION_PACKAGE_REMOVED in the removed package
When my android app is removed, I would like to also remove files the app has created on the SD card, as these can consume many megabytes and are only of use to my app.
It seems that receiving the ...
11
votes
1
answer
2k
views
How to un-merge Android Studio Packages
Anytime I create a package within a package, and create classes within that sub-package prior to adding classes to the top level package, the packages always merge together.
For example I created ...
11
votes
3
answers
10k
views
Best practice for package structure in an MVP project
I have an Android Studio project that is using an MVP architecture.
What is the advised packages structure for a project this style
we can do:
app:
screen_name
activityA
presenterA
...
11
votes
5
answers
24k
views
Gradle exclude java class from lib replaced by own class to avoid duplicate
In Android Studio, there is a specific file (src/org/luaj/vm2/lib/jse/JavaMethod.java) that I need to overwrite from a package that is pulled in via Gradle (dependencies {compile 'org.luaj:luaj-jse:3....
11
votes
2
answers
5k
views
Can I use a resource string for a package name?
Is something like this possible?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="@string/package_name"
android:versionCode="1"
android:versionName="@...
11
votes
3
answers
7k
views
Can you delete android play store app and use the package name?
I have an app that's currently on the Google Play store with the package name x.x.x. I want to delete this app but I want to reuse the package name for a new app that I will be uploading in its place. ...
11
votes
3
answers
3k
views
What is the difference between android.opengl and javax.microedition.khronos.opengles packages?
Just couldn't find anything regarding the purpose of android.opengl classes anywhere on the web: they seem to be copies of javax.microedition.khronos.opengles - just with static vs member methods.
So ...
10
votes
6
answers
7k
views
What is the best practice for putting classes under package names in Android
Android Studio 0.8.11
Hello,
I have just completed a test on Android which was to build an app that takes a live news feed, and display them. However, the instructor was very critical as I put all ...
10
votes
2
answers
19k
views
Error:Execution failed for task ':app:packageDebug' - Java heap space
I am getting this error in Android Studio logs when I am trying to build an APK.
Error:Execution failed for task ':app:packageDebug'.
Java heap space
This issue is coming when I am trying to build ...
10
votes
5
answers
14k
views
Can two different apps have the same packageName?
I have this code to get a list of all apps on system:
PackageManager pm = getPackageManager();
Intent mainIntent = new Intent(Intent.ACTION_MAIN);
List<ResolveInfo> ...
10
votes
9
answers
26k
views
package name clashes with class of same name error in android studio [closed]
I was trying out Udacity course on developing android app.
above was the error i ran into when i tried creating an android test case while going through the lesson-4.
the problem is the test classes ...
10
votes
2
answers
2k
views
Repackaging .jar-s in Android .aar library
Source Code
Library
Project which uses Library
Problem Description
I'm writing Android Library (.aar) in that Library I'm using .jar libraries.
In order to avoid dependency duplication I'm ...
10
votes
2
answers
4k
views
how to name my android package if I do not have a site
I've read much about android package naming conventions, but still have no idea what I should name my packages if I don't have any personal webpage whatsoever and am not a member of any organization. ...
10
votes
0
answers
817
views
Getting foreground app's packageName in Marshmallow delayed by 3 seconds
In Android 6.0 Marshmallow I query for the foreground app with the following code but there was a problem with incoming notifications because it shows foreground app to the app which sends ...