Use Android-Debug-Database to view the App Database in the browser.

Source: Internet
Author: User

Use Android-Debug-Database to view the App Database in the browser.

Usage reference:Http://www.jianshu.com/p/89ccae3e590b
Source Code address:Https://github.com/amitshekhariitbhu/Android-Debug-Database

Features:

Add dependency:
Add the following code in your build. gradle:
1 debugCompile 'com. amitshekhar. android: debug-db: 1.0.0'
OK. Now you do not need any other code.

Usage:
1>Run the program directly under the Debug 'app' without filling in any code. Check the logcat with this line:
1 D/DebugDB: Open http://xxx.xxx.xxx.xxx: 8080

Click to open the address link on the webpage.

2>Add the following code to the project file:
1 DebugDB. getAddressLog ();
Then Run the program in the Run 'app '. Check the logcat line as follows:
1 D/DebugDB: Open http://xxx.xxx.xxx.xxx: 8080

Click to open the address link on the webpage.

Note:
1>Use a port other than 8080. In the build. gradle file in buildTypes, make the following changes:

1 debug {2             resValue( “ string ” , “ PORT_NUMBER ” , “ 8081 ” )3       }

2>When the Android device is used to test the App:
Android phones and computers should be connected to the same network (Wifi or LAN ).

3>When using a simulator to test the App:
Android default simulator: Run adb forward tcp: 8080 tcp: 8080 and enable http: // localhost: 8080.
Genymotion Emulator: Enable bridging from the configured Virtual Device (options available in genymotion ).

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.