Skip to content

Commit d14adf9

Browse files
Merge pull request #146 from amitshekhariitbhu/update
Reduce library size
2 parents e3c5471 + 6b4db14 commit d14adf9

File tree

136 files changed

+2214
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2214
-451
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

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Change Log
22
==========
33

4+
Version 1.0.5 *(2019-02-18)*
5+
----------------------------
6+
7+
* Reduce size by taking out encrypted database library as a separate module
8+
* New: Add support for database delete
9+
* Changed compile to implementation
10+
* Fix: Minor bug fixes
11+
12+
413
Version 1.0.4 *(2018-06-23)*
514
----------------------------
615

@@ -48,7 +57,7 @@ Version 0.5.0 *(2017-01-21)*
4857

4958
* New: Export DB
5059
* New: Method to get DB version
51-
* Fix: Fix prouard issue and other minor issues
60+
* Fix: Fix proguard issue and other minor issues
5261

5362

5463
Version 0.4.0 *(2016-11-29)*

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: 39 additions & 17 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,13 +31,22 @@
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
39-
debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'
43+
debugImplementation 'com.amitshekhar.android:debug-db:1.0.5'
44+
```
45+
46+
Using the Android Debug Database with encrypted database
47+
48+
```groovy
49+
debugImplementation 'com.amitshekhar.android:debug-db-encrypt:1.0.5'
4050
```
4151

4252
Use `debugImplementation` so that it will only compile in your debug build and not in your release build.
@@ -50,10 +60,11 @@ That’s all, just start the application, you will see in the logcat an entry li
5060
Now open the provided link in your browser.
5161

5262
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`
5563

56-
Note : If you want use different port other than 8080.
64+
* Your Android phone and laptop should be connected to the same Network (Wifi or LAN).
65+
* If you are using it over usb, run `adb forward tcp:8080 tcp:8080`
66+
67+
Note : If you want use different port other than 8080.
5768
In the app build.gradle file under buildTypes do the following change
5869

5970
```groovy
@@ -62,23 +73,25 @@ debug {
6273
}
6374
```
6475

65-
66-
67-
6876
You will see something like this :
6977

7078
### Seeing values
79+
7180
<img src=https://raw.githubusercontent.com/amitshekhariitbhu/Android-Debug-Database/master/assets/debugdb.png >
7281

7382
### Editing values
83+
7484
<img src=https://raw.githubusercontent.com/amitshekhariitbhu/Android-Debug-Database/master/assets/debugdb_edit.png >
7585

7686
### 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)
87+
88+
* Android Default Emulator: Run the command in the terminal - `adb forward tcp:8080 tcp:8080` and open http://localhost:8080
89+
* Genymotion Emulator: Enable bridge from configure virtual device (option available in genymotion)
7990

8091
### Getting address with toast, in case you missed the address log in logcat
92+
8193
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.
94+
8295
```java
8396
public static void showDebugDBAddressLogToast(Context context) {
8497
if (BuildConfig.DEBUG) {
@@ -95,7 +108,9 @@ public static void showDebugDBAddressLogToast(Context context) {
95108
```
96109

97110
### Adding custom database files
111+
98112
As this library is auto-initialize, if you want to debug custom database files, add the following method and call
113+
99114
```java
100115
public static void setCustomDatabaseFiles(Context context) {
101116
if (BuildConfig.DEBUG) {
@@ -117,7 +132,9 @@ public static void setCustomDatabaseFiles(Context context) {
117132
```
118133

119134
### Adding InMemory Room databases
135+
120136
As this library is auto-initialize, if you want to debug inMemory Room databases, add the following method and call
137+
121138
```java
122139
public static void setInMemoryRoomDatabases(SupportSQLiteDatabase... database) {
123140
if (BuildConfig.DEBUG) {
@@ -137,23 +154,27 @@ public static void setInMemoryRoomDatabases(SupportSQLiteDatabase... database) {
137154
```
138155

139156
### Find this project useful ? :heart:
157+
140158
* Support it by clicking the :star: button on the upper right of this page. :v:
141159

142160
### TODO
161+
143162
* Simplify emulator issue [Issue Link](https://github.com/amitshekhariitbhu/Android-Debug-Database/issues/6)
144163
* And of course many more features and bug fixes.
145164

146165
### [Check out Mindorks awesome open source projects here](https://mindorks.com/open-source-projects)
147166

148167
### 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)
168+
169+
* [Twitter](https://twitter.com/amitiitbhu)
170+
* [GitHub](https://github.com/amitshekhariitbhu)
171+
* [Medium](https://medium.com/@amitshekhar)
172+
* [Facebook](https://www.facebook.com/amit.shekhar.iitbhu)
153173

154174
### License
175+
155176
```
156-
Copyright (C) 2016 Amit Shekhar
177+
Copyright (C) 2019 Amit Shekhar
157178
Copyright (C) 2011 Android Open Source Project
158179
159180
Licensed under the Apache License, Version 2.0 (the "License");
@@ -170,5 +191,6 @@ public static void setInMemoryRoomDatabases(SupportSQLiteDatabase... database) {
170191
```
171192

172193
### Contributing to Android Debug Database
194+
173195
All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md)
174196
when you submit pull request.

app/proguard-rules.pro

Lines changed: 0 additions & 17 deletions
This file was deleted.

build.gradle

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* * Copyright (C) 2016 Amit Shekhar
3+
* * Copyright (C) 2019 Amit Shekhar
44
* * Copyright (C) 2011 Android Open Source Project
55
* *
66
* * Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,27 +17,22 @@
1717
*
1818
*/
1919

20-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
21-
2220
buildscript {
2321
repositories {
24-
jcenter()
2522
google()
23+
jcenter()
2624
}
2725
dependencies {
28-
classpath 'com.android.tools.build:gradle:2.3.3'
29-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
30-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
31-
32-
// NOTE: Do not place your application dependencies here; they belong
33-
// in the individual module build.gradle files
26+
classpath 'com.android.tools.build:gradle:3.3.1'
27+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
28+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
3429
}
3530
}
3631

3732
allprojects {
3833
repositories {
39-
jcenter()
4034
google()
35+
jcenter()
4136
}
4237
}
4338

debug-db-base/build.gradle

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
*
3+
* * Copyright (C) 2019 Amit Shekhar
4+
* * Copyright (C) 2011 Android Open Source Project
5+
* *
6+
* * Licensed under the Apache License, Version 2.0 (the "License");
7+
* * you may not use this file except in compliance with the License.
8+
* * You may obtain a copy of the License at
9+
* *
10+
* * http://www.apache.org/licenses/LICENSE-2.0
11+
* *
12+
* * Unless required by applicable law or agreed to in writing, software
13+
* * distributed under the License is distributed on an "AS IS" BASIS,
14+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* * See the License for the specific language governing permissions and
16+
* * limitations under the License.
17+
*
18+
*/
19+
20+
apply plugin: 'com.android.library'
21+
22+
android {
23+
compileSdkVersion 28
24+
defaultConfig {
25+
minSdkVersion 14
26+
targetSdkVersion 28
27+
versionCode 1
28+
versionName "1.0"
29+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30+
resValue("string", "PORT_NUMBER", "8080")
31+
}
32+
buildTypes {
33+
release {
34+
minifyEnabled false
35+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36+
}
37+
}
38+
}
39+
40+
dependencies {
41+
implementation 'com.google.code.gson:gson:2.8.5'
42+
implementation 'android.arch.persistence.room:runtime:1.1.1'
43+
testImplementation 'junit:junit:4.12'
44+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
45+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
46+
}
47+
48+
//apply from: 'debug-db-base-upload.gradle'

0 commit comments

Comments
 (0)