Skip to content

Commit 47bfc00

Browse files
Getting address With toast
1 parent d054464 commit 47bfc00

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,23 @@ You will see something like this :
5959
- Android Default Emulator: run `adb forward tcp:8080 tcp:8080` and open http://localhost:8080
6060
- Genymotion Emulator: Enable bridge from configure virtual device (option available in genymotion)
6161

62+
### Getting address With toast, in case you missed the address log in logcat
63+
As this library is auto-initialize, if you want to get the address log only in debug build, add the following method and call
64+
`java
65+
public static void showDebugDBAddressLogToast(Context context) {
66+
if (BuildConfig.DEBUG) {
67+
try {
68+
Class<?> debugDB = Class.forName("com.amitshekhar.DebugDB");
69+
Method getAddressLog = debugDB.getMethod("getAddressLog");
70+
Object value = getAddressLog.invoke(null);
71+
Toast.makeText(context, (String) value, Toast.LENGTH_LONG).show();
72+
} catch (Exception ignore) {
73+
74+
}
75+
}
76+
}
77+
`
78+
6279
### Find this project useful ? :heart:
6380
* Support it by clicking the :star: button on the upper right of this page. :v:
6481

0 commit comments

Comments
 (0)