dynamic - DexFile Not working on Android Lollipop and above -
so trying list of classes in application package.the issue below method not working on android lollipop , above. bear in mind cannot use pathclassloader because don't know name of classes.
here code:
string packagecodepath = context.getpackagecodepath(); dexfile df = new dexfile(packagecodepath); (enumeration<string> iter = df.entries(); iter.hasmoreelements(); ) { string classname = iter.nextelement(); if (classname.contains(mypackagename)) { classes.add(classname.substring(classname.lastindexof(".") + 1, classname.length())); } }
am doing wrong here? have alternative solution?
Comments
Post a Comment