android: response from market activity

纵然是瞬间 提交于 2019-12-05 10:00:00

The Android Market is not set up to support startActivityForResult(). Also, bear in mind that the download and installation happen asynchronously (i.e., user clicks Install, and the download occurs in the background, and they finish the install via the Notification).

100rabh

@CommonsWare Superb!

Your solution proved helpful & it also landed me to another very useful page http://devdaily.com/java/jwarehouse/android/core/java/com/android/internal/content/PackageMonitor.java.shtml

Below is a code snippet from above link source to get package name of currently installed app from broadcast intent:

 String getPackageName(Intent intent) {
        Uri uri = intent.getData();
        String pkg = uri != null ? uri.getSchemeSpecificPart() : null;
        return pkg;
    }

Thanks Commonsware.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!