Skip to content

Commit 6138b5d

Browse files
Updated README.md
1 parent b024f36 commit 6138b5d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
11
# Android-Hotpatch
2+
Autopdate an android app on the fly
3+
4+
## Usage:
5+
6+
## Example:
7+
8+
9+
```JAVA
10+
final String className = "com.chars.testlib.TestLib";
11+
final String methods[] = {"getVersionString"};
12+
13+
final Hotpatch hotpatch = new Hotpatch();
14+
15+
try {
16+
hotpatch.loadLibrary("/sdcard/TestLib.jar", getApplicationContext());
17+
hotpatch.loadClass(className);
18+
hotpatch.loadMethods(className, methods);
19+
20+
String result = (String)hotpatch.call(className, methods[0]);
21+
Log.d("AndroidHotpatch", result);
22+
23+
} catch (Exception e) {
24+
Log.e("AndroidHotpatch", Log.getStackTraceString(e));
25+
}
26+
```

0 commit comments

Comments
 (0)