Android Debug Database

Source: Internet
Author: User

Https://github.com/amitshekhariitbhu/Android-Debug-Database

For the sake of reading convenience, translate a bit ...

Android Debug Database is a powerful library for debugging databases and GKFX preferences in Android applications.

ADD is a powerful library for debugging databases and sharing parameters when developing Android apps.

Android Debug Database allows you to view databases and GKFX preferences directly in your browser in a very simple w Ay.

Add uses a simple way to view the database and shared parameters directly in your browser.

What can Android Debug Database do?

What can add do when debugging a database?

  • See all the databases. See all databases.
  • See all the data in the GKFX preferences used in your application. The data for all shared parameters in the app.
  • Run any SQL query on the given database to update and delete your data. Use SQL queries on a given database to update and delete data.
  • Directly edit the database values. Edit the value of the database directly.
  • Directly Edit shared preferences. Edit the value of the shared parameter directly.
  • Delete database rows and shared preferences. Delete database rows and shared parameters.
  • Search in your data. Find in the data.
  • Sort data. Data sorting.
  • Download database. Download the database.
all these features work without rooting your device--no need of rooted device all of these features do not require root device → no root device requiredCheck out the another awesome library for fast and simple networking in Android. Look at another great library for quick and simple network operations in Android.
    • Fast Android Networking Library
using Android Debug Database Library in your application how to use Add in your app

Add this to your app ' s build.gradle add the following code to your app's Build.gradle file

' com.amitshekhar.android:debug-db:1.0.0'

With so, it'll only debugCompile compile in your debug build and not in your release apk.

Use debugCompile (debug compilation) so that it will only compile when you debug, release apk will not be executed.

That's all, just start the application, you'll see in the Logcat a entry like follows: OK, launch the app and you'll find the following entry in the Logcat:

    • D/debugdb:open http://XXX.XXX.X.XXX:8080 in your browser open this URL in the browser.

    • You can also always get the debug address URL from your code by calling the methodDebugDB.getAddressLog();你也可以在代码中调用DebugDB.getAddressLog()方法,获取debug地址。

Now open the provided link in your browser. Now open the provided connection in the browser.

Important: Important notes:

    • Your Android Phone and laptop should is connected to the same Network (Wifi or LAN). Your Android phone and laptop must be on the same network (WiFi or LAN)
    • If you is using it over USB, runadb forward tcp:8080 tcp:8080 如果你是通过USB连接,运行adb forward tcp:8080 tcp:8080

Note:if want use different port other than 8080. In the app Build.gradle file under Buildtypes does the following change

Note: If you want to use a port other than 8080. Under the buildtypes of the program's Build.gradle file, make the following changes

Debug {    resvalue ("string" port_number"8081")}

You'll see something as this:

You will see a similar diagram:

working with emulator mate simulator
    • Android defaults Emulator:run adb forward tcp:8080 tcp:8080 and open http://localhost:8080 android default emulator: Run adb forward tcp:8080 tcp:8080 , open http://localhost:8080
    • Genymotion emulator:enable Bridge from Configure virtual device (option available in genymotion) genymotion Simulator: Configure the Virtual appliance's bridge, Make it effective (Genymotion's effective option)
Getting address with toast, ln case you missed the address log in Logcat use a toast to get the addresses, in the unlikely event you miss the addresses in Logcat

As this library was auto-initialize, if you want to get the address log, add the following method and call because this vault is automatically initialized if you want to Get the address log, add the following method and call

PublicStaticvoid Showdebugdbaddresslogtoast (Context context) {if (Buildconfig. DEBUG) {try {class<?> debugdb = class "Com.amitshekhar.debugdb"); method getaddresslog = debugdb.getMethod (  "Getaddresslog"); object value = getaddresslog.invoke ( null); toast.maketext (Context, (string) value, toast.show ();} catch (exception Ignore) {}}}         
Find this project useful? Do you think this project is useful?
    • Support it by clicking the Star button on the upper right of this page. To support this, click the Pentagram button in the upper right corner of this page.
TODO Memo
    • Simplify emulator issue issue Link simplifies simulator issues
    • And of course many more features and bug fixes. There are, of course, some bugs that need to be fixed and more to expand.
Check out mindorks awesome open source projects here to view Mindorks's outstanding open source projectsContact-let ' s become friends contact-make us friends
    • Twitter
    • Github
    • Medium
    • Facebook
License License
   Copyright (C) 2016 Amit Shekhar   Copyright (C) 2011 Android Open Source Project   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License.
contributing to Android Debug Database contribute to add

Just make pull request. You ' re in! Pull the demand. including you.

Android Debug Database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.