Test Android PackageManager.getInstaller() -


maybe missing very obvious here:

i wanted test packagemanager.getinstallerpackagename(). when test app through eclipse, or standalone apk, above method returns null expected. users install through google play or amazon appstore, returned value not null.

my question how test before putting app production?
(eg. possible: upload draft in android developer console, , without moving production, somehow access through google play, maybe using device setup same account developer console account; , install , test on test device?)

updated answer:

if want able test actual install google play use alpha , beta programs. see here description of program.

original answer:

if want test handling of case, can use buildconfig.debug flag give dummy value when in debug mode.

string installer; if (buildconfig.debug) {     installer = "com.android.vending"; } else {     installer = pm.getinstallerpackagenamge(mypackage); } 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -