android - What if I want to release an update with higher minSDK than the one on the market? -


i have released an app on market minsdk set 4 (android 1.6) want release update features unavailable in 1.6 need higher minsdk.

so, question is: users running 1.6 notified of update?...and if yes able download/install it?

no shouldn't notified of update. market filter application out , no longer able see or receive updates.

if want add features use higher api level not exclude user's of lower api level can use reflection enable this:

           public static method getexternalfilesdir;                      try {                     class<?> partypes[] = new class[1];         partypes[0] = string.class;                     getexternalfilesdir = context.class.getmethod("getexternalfilesdir", partypes);             } catch (nosuchmethodexception e) {                     log.e(tag, "getexternalfilesdir isn't available in devices api");             } 

this piece of code saying:

within context.class have got method getexternalfilesdir (api level 9)

if instantiate variable getexternalfilesdir reflective call method else leave null.

then later on can do

     // if user's device api9 or above      if(getexternalfilesdir != null){        // invoke same doing context.getexternalfilesdir(var1, var2);        getexternalfilesdir.invoke(variable1, variable2);      } else {         // user cannot use method else      } 

hope helps


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -