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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -