Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's my application package name in android?

I'm writing an android application.

It has some packages under src.

how can I figure out which of them is my application package?

I want to add C@DM permissions:

<permission android:name="YOUR_PACKAGE_NAME.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="YOUR_PACKAGE_NAME.permission.C2D_MESSAGE" />

how will my YOUR_PACKAGE_NAME change if I create a custom MyApplication extends Application class?

like image 380
Elad Benda Avatar asked Feb 21 '14 20:02

Elad Benda


People also ask

How do I find my Android package name?

One method to look up an app's package name is to find the app in the Google Play app store using a web browser. The package name will be listed at the end of the URL after the '? id='.

How do I find the package name of an APK?

A simple solution would be Open Android Studio -> Build -> Analyze Apk... browse and select the APK now you can find the package name and pretty much you can read. Show activity on this post. You can use Analyze APK... from the Build menu in Android Studio, it will display the package name at the top of new window.

How do I find my Android package name in Android Studio?

The package for each android application resides within the src/main/java directory of the application module.

Is application ID and package name same?

The applicationId exactly matches the Java-style package name you chose during project setup in android studio. However, the application ID and package name are independent of each other beyond this point.


1 Answers

Your application name is actually defined in the AndroidManifest.xml, in its first lines. Ex:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.yourcompany.appname"
    android:versionCode="66"
    android:versionName="0.57" >

note the package="com.yourcompany.appname" - this is your package definition.

Other places which contain your package name can be resources, class paths, packages and much more. But all of them should be aligned according to the manifest because that what the package manager reads.

like image 147
skoperst Avatar answered Nov 15 '22 20:11

skoperst