1

Is there way to get package name of app, which is defined in Manifest file. I am having apks on my server. I want to install them. And then I want to check for already installed. which i can do by getting package name.

But how to get package name from an apk by writing code - programatically.

No body is getting me... I was trying to get application's package name from apk, i do have apks. I want there package name But programatically.

karan
  • 3,319
  • 1
  • 35
  • 44
  • see this question [link](http://stackoverflow.com/questions/16683455/how-to-get-the-package-name-of-an-application-in-android-and-then-launch-that-ap) – Android Jan 13 '14 at 12:24
  • 1
    I don't want to do it by any tool... but with a Java Code. – karan Jan 13 '14 at 13:04
  • 1
    I don't know on what basis this question is marked as duplicate to the question posted above. Upon clear inspection, the OP here is asking to get the package name of the "NOT YET INSTALLED" apk,"PROGRAMATICALY IN ANDROID". – Sandeep R Jan 19 '17 at 09:25
  • 1
    and the question this guys have posted saying its the duplicate, (which have 14 answer), Not even a single answer gives the (Not even close) answer to the OP here. – Sandeep R Jan 19 '17 at 09:27
  • 1
    Even though I am having the answer, I couldn't post this here just because some dumb guys marked this question as duplicate. – Sandeep R Jan 19 '17 at 09:30
  • @Sandeep : Even I voted to reopen. You can also cast vote – karan Jan 30 '17 at 07:31
  • @karan where can I vote..? – Sandeep R Jan 30 '17 at 07:59
  • @sandeep : under question below tags, u can see share, edit, reopen options... on clicking reopen option u can do. – karan Jan 30 '17 at 08:59
  • @karan As you are OP to this question..you are getting reopen option, for me it just shows share,edit,flag. However I asked for moderator attention on this question. :-) – Sandeep R Jan 30 '17 at 09:08

1 Answers1

0

use this code to get the list of all apps installed in the dvice

packs = getPackageManager().getInstalledPackages(0);

check the functions in packs.get(index).__ .You can get not only the package names also many details of every application installed.

Athul
  • 231
  • 1
  • 7