Skip to content

Commit 1655b27

Browse files
Merge pull request amitshekhariitbhu#139 from friederbluemle/update-project
Update dependencies and minor project cleanups
2 parents 809369f + 7789f60 commit 1655b27

29 files changed

+236
-218
lines changed

.gitignore

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
# Gradle files
2+
.gradle/
3+
build/
4+
5+
# Local configuration file (sdk path, etc)
6+
local.properties
7+
8+
# Android Studio generated folders
9+
captures/
10+
.externalNativeBuild
11+
12+
# IntelliJ project files
113
*.iml
2-
.gradle
3-
/local.properties
4-
/.idea/workspace.xml
5-
/.idea/libraries
14+
.idea/
15+
16+
# Misc
617
.DS_Store
7-
/build
8-
/captures
9-
.externalNativeBuild
10-
/.idea

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199
distributed under the License is distributed on an "AS IS" BASIS,
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202-
limitations under the License.
202+
limitations under the License.

README.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
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.
@@ -30,11 +31,14 @@
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+
3740
Add this to your app's build.gradle
41+
3842
```groovy
3943
debugImplementation '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
5054
Now open the provided link in your browser.
5155

5256
Important:
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-
6870
You 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+
8187
As 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
8390
public 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+
98106
As this library is auto-initialize, if you want to debug custom database files, add the following method and call
107+
99108
```java
100109
public 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+
120130
As this library is auto-initialize, if you want to debug inMemory Room databases, add the following method and call
131+
121132
```java
122133
public 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+
173189
All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md)
174190
when you submit pull request.

app/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/build.gradle

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ apply plugin: 'com.android.application'
2121

2222
android {
2323
compileSdkVersion 28
24-
buildToolsVersion '28.0.3'
2524
defaultConfig {
2625
applicationId "com.sample"
2726
minSdkVersion 15
@@ -43,14 +42,12 @@ android {
4342
}
4443

4544
dependencies {
46-
implementation fileTree(dir: 'libs', include: ['*.jar'])
47-
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
48-
exclude group: 'com.android.support', module: 'support-annotations'
49-
})
45+
debugImplementation project(':debug-db')
5046
implementation 'com.android.support:appcompat-v7:28.0.0'
47+
implementation 'net.zetetic:android-database-sqlcipher:3.5.9'
48+
implementation 'android.arch.persistence.room:runtime:1.1.1'
49+
annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
5150
testImplementation 'junit:junit:4.12'
52-
implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar'
53-
implementation "android.arch.persistence.room:runtime:1.1.1"
54-
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
55-
debugImplementation project(':debug-db')
51+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
52+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
5653
}

app/proguard-rules.pro

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Add project specific ProGuard rules here.
2-
# By default, the flags in this file are appended to flags specified
3-
# in /Users/amitshekhar/Library/Android/sdk/tools/proguard/proguard-android.txt
4-
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
64
#
75
# For more details, see
86
# http://developer.android.com/guide/developing/tools/proguard.html
97

10-
# Add any project specific keep options here:
11-
128
# If your project uses WebView with JS, uncomment the following
139
# and specify the fully qualified class name to the JavaScript interface
1410
# class:
1511
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1612
# public *;
1713
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939

4040
</application>
4141

42-
</manifest>
42+
</manifest>

app/src/main/java/com/sample/database/CarDBHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ public int count() {
131131
return 0;
132132
}
133133
}
134-
}
134+
}

app/src/main/java/com/sample/database/ContactDBHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ public int count() {
133133
return 0;
134134
}
135135
}
136-
}
136+
}

app/src/main/java/com/sample/database/PersonDBHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ public int count() {
133133
db.close();
134134
}
135135
}
136-
}
136+
}

0 commit comments

Comments
 (0)