charslab / Android-Hotpatch

Update an android app on the fly
MIT License
14 stars 6 forks source link

how to get context from loaded class #2

Open H1-N1 opened 5 years ago

H1-N1 commented 5 years ago

i have a class that use SharedPreferences but i get this error related to app context Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences

and also some other function taht use context do you have a work around for this issue thanks

carloalbertobarbano commented 5 years ago

No sorry, i haven't worked on this project for a while. Maybe you could pass the context as argument to the class you are trying to load from the main app, in order to workaround this issue. Let me know if you find a solution