1010[ ![ Open Source Love] ( https://badges.frapsoft.com/os/v1/open-source.svg?v=102 )] ( https://opensource.org/licenses/Apache-2.0 )
1111[ ![ License] ( https://img.shields.io/badge/license-Apache%202.0-blue.svg )] ( https://github.com/amitshekhariitbhu/Android-Debug-Database/blob/master/LICENSE )
1212
13- ## Android Debug Database is a powerful library for debugging databases and shared preferences in Android applications.
13+ ## Android Debug Database is a powerful library for debugging databases and shared preferences in Android applications
1414
15- ### Android Debug Database allows you to view databases and shared preferences directly in your browser in a very simple way.
15+ ### Android Debug Database allows you to view databases and shared preferences directly in your browser in a very simple way
1616
1717### What can Android Debug Database do?
18+
1819* See all the databases.
1920* See all the data in the shared preferences used in your application.
2021* Run any sql query on the given database to update and delete your data.
3031
3132### All these features work without rooting your device -> No need of rooted device
3233
33- ### Check out another awesome library for fast and simple networking in Android.
34+ ### Check out another awesome library for fast and simple networking in Android
35+
3436* [ Fast Android Networking Library] ( https://github.com/amitshekhariitbhu/Fast-Android-Networking )
3537
3638### Using Android Debug Database Library in your application
39+
3740Add this to your app's build.gradle
41+
3842``` groovy
3943debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'
4044```
@@ -50,10 +54,11 @@ That’s all, just start the application, you will see in the logcat an entry li
5054Now open the provided link in your browser.
5155
5256Important:
53- - Your Android phone and laptop should be connected to the same Network (Wifi or LAN).
54- - If you are using it over usb, run ` adb forward tcp:8080 tcp:8080 `
5557
56- Note : If you want use different port other than 8080.
58+ * Your Android phone and laptop should be connected to the same Network (Wifi or LAN).
59+ * If you are using it over usb, run ` adb forward tcp:8080 tcp:8080 `
60+
61+ Note : If you want use different port other than 8080.
5762 In the app build.gradle file under buildTypes do the following change
5863
5964``` groovy
@@ -62,23 +67,25 @@ debug {
6267}
6368```
6469
65-
66-
67-
6870You will see something like this :
6971
7072### Seeing values
73+
7174<img src=https://raw.githubusercontent.com/amitshekhariitbhu/Android-Debug-Database/master/assets/debugdb.png >
7275
7376### Editing values
77+
7478<img src=https://raw.githubusercontent.com/amitshekhariitbhu/Android-Debug-Database/master/assets/debugdb_edit.png >
7579
7680### Working with emulator
77- - Android Default Emulator: Run the command in the terminal - ` adb forward tcp:8080 tcp:8080 ` and open http://localhost:8080
78- - Genymotion Emulator: Enable bridge from configure virtual device (option available in genymotion)
81+
82+ * Android Default Emulator: Run the command in the terminal - ` adb forward tcp:8080 tcp:8080 ` and open http://localhost:8080
83+ * Genymotion Emulator: Enable bridge from configure virtual device (option available in genymotion)
7984
8085### Getting address with toast, in case you missed the address log in logcat
86+
8187As this library is auto-initialize, if you want to get the address log, add the following method and call (we have to do like this to avoid build error in release build as this library will not be included in the release build) using reflection.
88+
8289``` java
8390public static void showDebugDBAddressLogToast(Context context) {
8491 if (BuildConfig . DEBUG ) {
@@ -95,7 +102,9 @@ public static void showDebugDBAddressLogToast(Context context) {
95102```
96103
97104### Adding custom database files
105+
98106As this library is auto-initialize, if you want to debug custom database files, add the following method and call
107+
99108``` java
100109public static void setCustomDatabaseFiles(Context context) {
101110 if (BuildConfig . DEBUG ) {
@@ -117,7 +126,9 @@ public static void setCustomDatabaseFiles(Context context) {
117126```
118127
119128### Adding InMemory Room databases
129+
120130As this library is auto-initialize, if you want to debug inMemory Room databases, add the following method and call
131+
121132``` java
122133public static void setInMemoryRoomDatabases(SupportSQLiteDatabase . .. database) {
123134 if (BuildConfig . DEBUG ) {
@@ -137,21 +148,25 @@ public static void setInMemoryRoomDatabases(SupportSQLiteDatabase... database) {
137148```
138149
139150### Find this project useful ? :heart :
151+
140152* Support it by clicking the :star : button on the upper right of this page. :v :
141153
142154### TODO
155+
143156* Simplify emulator issue [ Issue Link] ( https://github.com/amitshekhariitbhu/Android-Debug-Database/issues/6 )
144157* And of course many more features and bug fixes.
145158
146159### [ Check out Mindorks awesome open source projects here] ( https://mindorks.com/open-source-projects )
147160
148161### Contact - Let's become friends
149- - [ Twitter] ( https://twitter.com/amitiitbhu )
150- - [ Github] ( https://github.com/amitshekhariitbhu )
151- - [ Medium] ( https://medium.com/@amitshekhar )
152- - [ Facebook] ( https://www.facebook.com/amit.shekhar.iitbhu )
162+
163+ * [ Twitter] ( https://twitter.com/amitiitbhu )
164+ * [ GitHub] ( https://github.com/amitshekhariitbhu )
165+ * [ Medium] ( https://medium.com/@amitshekhar )
166+ * [ Facebook] ( https://www.facebook.com/amit.shekhar.iitbhu )
153167
154168### License
169+
155170```
156171 Copyright (C) 2019 Amit Shekhar
157172 Copyright (C) 2011 Android Open Source Project
@@ -170,5 +185,6 @@ public static void setInMemoryRoomDatabases(SupportSQLiteDatabase... database) {
170185```
171186
172187### Contributing to Android Debug Database
188+
173189All pull requests are welcome, make sure to follow the [ contribution guidelines] ( CONTRIBUTING.md )
174190when you submit pull request.
0 commit comments