How to view inserted data in Sqlite database on Android Studio

Bivin Vinod :

Will you please help me with this problem.

I'm inserting values to my Sqlite database.

How can I check or view the inserted data.

Is there is any tool or other techniques to show the data ?

Bivin Vinod :

The best Sqlite debugging tool for android application is

Stetho By Facebook

http://facebook.github.io/stetho/

Stetho is a sophisticated debug bridge for Android applications. When enabled, developers have access to the Chrome Developer Tools feature natively part of the Chrome desktop browser. Developers can also choose to enable the optional dumpapp tool which offers a powerful command-line interface to application internals.

Download or Alternatively you can include Stetho from Maven Central via Gradle or Maven.

 // Gradle dependency on Stetho 
  dependencies { 
    compile 'com.facebook.stetho:stetho:1.5.1' 
  } 
  <dependency>
    <groupid>com.facebook.stetho</groupid> 
    <artifactid>stetho</artifactid> 
    <version>1.5.1</version> 
  </dependency> 

Only the main stetho dependency is strictly required, however you may also wish to use one of the network helpers:

    dependencies { 
        compile 'com.facebook.stetho:stetho-okhttp3:1.5.1' 
      } 

Or

 dependencies { 
    compile 'com.facebook.stetho:stetho-okhttp:1.5.1' 
  } 

Or

 dependencies { 
    compile 'com.facebook.stetho:stetho-urlconnection:1.5.1' 
  }

Integrations

Setup

Integrating with Stetho is intended to be seamless and straightforward for most existing Android applications. There is a simple initialization step which occurs in your Application class:

public class MyApplication extends Application {
  public void onCreate() {
    super.onCreate();
    Stetho.initializeWithDefaults(this);
  }
}

This brings up most of the default configuration but does not enable some additional hooks (most notably, network inspection). See below for specific details on individual subsystems.

Enable Network Inspection

If you are using the popular OkHttp library at the 2.2.x+ or 3.x release, you can use the Interceptors system to automatically hook into your existing stack. This is currently the simplest and most straightforward way to enable network inspection.

For OkHttp 2.x

OkHttpClient client = new OkHttpClient();
client.networkInterceptors().add(new StethoInterceptor());

For OkHttp 3.x

 new OkHttpClient.Builder()
        .addNetworkInterceptor(new StethoInterceptor())
        .build();

As interceptors can modify the request and response, add the Stetho interceptor after all others to get an accurate view of the network traffic.

If you are using HttpURLConnection, you can use StethoURLConnectionManager to assist with integration though you should be aware that there are some caveats with this approach. In particular, you must explicitly add Accept-Encoding: gzip to the request headers and manually handle compressed responses in order for Stetho to report compressed payload sizes.

enter image description here

Sqlite Databases enter image description here

for more info please visit stetho

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=458498&siteId=1