I have added a JAR library file to my Android application for payment system. I would like to change the code of the one of the java file in JAR library file to make it work as needed. How would i do that in Android studio?
Asked
Active
Viewed 1,247 times
0
-
Do you have the source code of .jar file ? – Arjun Nov 06 '15 at 11:44
-
Add the code of the class you want to change and show us what you've tried – the-ginger-geek Nov 06 '15 at 11:46
-
You should override the class method you want to change with your own code – Nanoc Nov 06 '15 at 11:47
-
1You want to.... modify a (possibly closed source) payment system library? Isn't that kind of insecure and unethical? – MeetTitan Nov 06 '15 at 11:47
1 Answers
0
In order to overwrite a library's "SampleActivity" class it a the project which depends on that library, create a new class with the name SampleActivityExtended in the project in the same package and add the new activity to your AndroidManifest.xml.
IMPORTANT: all intents referencing overwritten activities should be created through the util class in the following manner:
more detail you can find here

Community
- 1
- 1

Hemant Ukey
- 328
- 4
- 15