DhruvPathak
DhruvPathak

Reputation: 43265

How to parse android application basic information from its market link?

It is possible to parse some information from the apk file using a tool as mentioned here:

How to parse the AndroidManifest.xml file inside an .apk package

My requirement is to parse information like Application name,description, image urls from a link like :

market://details?id=com.replica.replicaisland

Upvotes: 1

Views: 588

Answers (3)

ciscogambo
ciscogambo

Reputation: 1161

You may want to check out PackageManager and ApplicationInfo to see if it has everything you need.

final PackageManager pm = getPackageManager();

List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);

for (ApplicationInfo packageInfo : packages) {
    Log.d(TAG, "Installed package :" + packageInfo.packageName);
    Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName)); 

    try {
        ApplicationInfo appInfo = pm.getApplicationInfo(packageInfo.packageName, 0);
        String appFile = appInfo.sourceDir;

        long installed = new File(appFile).lastModified();              
        Log.d(TAG, "lastModified = " + installed);

        //Drawable icon = appInfo.loadIcon(pm);
        //Bitmap bitmap = ((BitmapDrawable)icon).getBitmap();               
    }           
    catch (PackageManager.NameNotFoundException e) {
        e.printStackTrace();
    }
} 

Upvotes: 0

yorkw
yorkw

Reputation: 41126

There is an open source library android-market-api created by some developers which allow you retrieve some basic app info directly from google's official android market, worth to check it out.

Upvotes: 3

user1132959
user1132959

Reputation: 988

For the first thing you could just download the webpage from the web browser version of the link which would be https://market.android.com/details?id=com.replica.replicaisland From there you could parse through the source of the page in your own creative way.

As with RSS feed, no clue.

Upvotes: 1

Related Questions