Sunteți pe pagina 1din 7

SqliteManager (/details/1/7021)

 16 (https://github.com/Ashok-Varma/SqliteManager/stargazers?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=7021)  4 (https://github.com/Ashok-

Varma/SqliteManager/watchers?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7021)

 6 (https://github.com/Ashok-Varma/SqliteManager/network?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=7021)  0 (https://github.com/Ashok-

Varma/SqliteManager/issues?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7021)

 (https://facebook.com/sharer.php?
General u=https://android-
Category
arsenal.com/details/1/7021)
Free (/free)

Tag
 (https://twitter.com/intent/twe
arsenal.com/details/1/7021&text=The%20An
Database Browsers (/tag/26)

License %20Datab
%20SqliteManager
Apache License, Version 2.0 (http://opensource.org/licenses/Apache-2.0?utm_source=android-arsenal.co
m&utm_medium=referral&utm_campaign=7021)

 (http://news.ycombinator.com/submitlink
Min SDK
16 (Android 4.1 Jelly Bean) (/api?level=16)
arsenal.com/details/1/7021&t=The%20Andro
Registered
Jul 6, 2018 %20Database%20Browsers%20-%
Favorites
1  (https://plus.google.com/share?
Link url=https://android-
arsenal.com/details/1/7021)
https://github.com/Ashok-Varma/SqliteManager (https://github.com/Ashok-Varma/SqliteManager?utm_sou
rce=android-arsenal.com&utm_medium=referral&utm_campaign=7021)

See also
 (https://reddit.com/subm
SQLite Manager (/details/1/114)
arsenal.com/details/1/7021&title=The%20An
Android DbInspector (/details/1/117)

%20Database%20Browsers%2
DBFlowManager (/details/1/4956)
SQLite Viewer (/details/1/2497)
realm-browser (/details/1/1801)
Additional

Language
Java

Version
1.2.2 (Jul 23, 2018) (https://github.com/Ashok-Varma/SqliteManager/releases/tag/1.2.2?utm_source=andr
oid-arsenal.com&utm_medium=referral&utm_campaign=7021)

Created
Jun 19, 2017

Updated
Jul 23, 2018

Owner
Ashok Varma (Ashok-Varma) (/user/Ashok-Varma)

Contributor
1 (https://github.com/Ashok-Varma/SqliteManager/graphs/contributors?utm_source=android-arsenal.com
&utm_medium=referral&utm_campaign=7021)

Activity

Badge
 Generate

Download
 Source code
 APK file

Blurb

     
Test Automation Tool
Automate testing of any desktop, web or mobile software with Ranorex.
ranorex.com/GUI-Testing

Android Arsenal SqliteManager (https://android-arsenal.com/details/1/7021)

SqliteManager

get sample apk from Google Play Store (https://play.google.com/store/apps/details?


id=com.ashokvarma.sqlitemanager.sample&utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)

(https://raw.githubusercontent.com/Ashok-

Varma/SqliteManager/master/sqlite_320_compressed.gif?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)

What is this library about?

Sqlite Manager helps to manage your android Sqlite Database very effectively with ease

(currently under active development, expect to see new releases almost daily)
Features

Add, Update and Delete entries from tables in UI (no sql).


Check all the table entries in your database with preferred sort order
Do custom queries on your database and results are displayed in UI

Download

Based on your IDE you can import library in one of the following ways

Gradle:

debugCompile 'com.ashokvarma.android:sqlite-manager:1.2.1'
releaseCompile 'com.ashokvarma.android:sqlite-manager-no-op:1.2.1'

If you want this in library in production also then try this :

compile 'com.ashokvarma.android:sqlite-manager:1.2.1'

or grab via Maven:

<dependency>
<groupId>com.ashokvarma.android</groupId>
<artifactId>sqlite-manager</artifactId>
<version>1.2.1</version>
<type>pom</type>
</dependency>

or Ivy:

<dependency org='com.ashokvarma.android' name='sqlite-manager' rev='1.2.1'>


<artifact name='$AID' ext='pom'></artifact>
</dependency>

or Download the latest JAR (https://repo1.maven.org/maven2/com/ashokvarma/android/sqlite-


manager/1.2.1/sqlite-manager-1.2.1.aar?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)

Usage

Implement SqliteDataRetriever interface either directly in SqliteOpenHelper (OR) if you are using
thrid party ORM's ..etc just provide the inteface to library

Here is an example interface if SqliteOpenHelper is used (for other library implementations - check
sample project)
public class HelperSqliteDataRetriever implements SqliteDataRetriever {
SqliteHelper mSqliteHelper;
SQLiteDatabase mSQLiteDatabase;

HelperSqliteDataRetriever(SqliteHelper sqliteHelper) {
mSqliteHelper = sqliteHelper;
mSQLiteDatabase = mSqliteHelper.getWritableDatabase();
}

@Override
public Cursor rawQuery(@NonNull String query, String[] selectionArgs) {
if (mSQLiteDatabase == null || !mSQLiteDatabase.isOpen()) {
mSQLiteDatabase = mSqliteHelper.getWritableDatabase();
}
return mSQLiteDatabase.rawQuery(query, selectionArgs);
}

@Override
public String getDatabaseName() {
return mSqliteHelper.getDatabaseName();
}

@Override
public void freeResources() {
// not good practice to open multiple database connections and close every time
}
}

Then just pass the interface instance with the context to launchSqliteManager method

SqliteManager.launchSqliteManager(this, new HelperSqliteDataRetriever(sqliteHelper), nu

CSV/Json Export feature


To Use export as CSV/Json feature. need to define FileProvider in your app manifest.

1. If you don't have file-provider in your manifest

1. Add this section under application tag in your manifest

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}"
android:exported="false"
android:grantUriPermissions="true">

<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider_paths" />
</provider>
2. create a new xml file with name file_provider_paths and paste the below content in the file

<?xml version="1.0" encoding="utf-8"?>


<paths>
<files-path
name="sqlite_dump"
path="sqliteManager/" />
</paths>

3. while launching sqlite manager pass application_id

SqliteManager.launchSqliteManager(this, new HelperSqliteDataRetriever(sqliteHelper), Bu

2. If you already have a file-provider in your manifest

1. add files-path mentioned below to existing paths in your xml file.

<?xml version="1.0" encoding="utf-8"?>


<paths>
<!-- -.-.-.-.-.-.-.-.-.-.- your current paths, caches ..etc -.-.-.-.-.-.-.-.-.-.- -->
<files-path
name="sqlite_dump"
path="sqliteManager/" />
</paths>

2. while launching sqlite manager pass the authorities declared in your manifest

SqliteManager.launchSqliteManager(this, new HelperSqliteDataRetriever(sqliteHelper), "a

License

Sqlite Manager library for Android


Copyright (c) 2016 Ashok Varma (http://ashokvarma.me/).

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.
Other Open Source Libraries

1. Gander (https://github.com/Ashok-Varma/Gander?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021) : Gander is a simple in-app HTTP
inspector for Android OkHttp clients. Gander intercepts and persists all HTTP requests and
responses inside your application, and provides a UI for inspecting their content.
2. SharedPrefManager (https://github.com/Ashok-Varma/SharedPrefManager?
utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7021) : SharedPref
Manager is a Dev Debug tool that helps to manage(Edit, Add, Clear) your android Shared
Preferences.
3. BottomNavigation (https://github.com/Ashok-Varma/BottomNavigation?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021) : This Library helps users to use
Bottom Navigation Bar (A new pattern from google) with ease and allows ton of
customizations.

SQL Server Courses OPEN


Learn SQL Server in 3 simple steps. Register to watch free videos! veeam.com

Follow us on Twitter (https://twitter.com/Android_Arsenal?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=7021)

Read us in Telegram (https://telegram.me/AndroidArsenal?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=7021)

Get Android app on Google Play (https://play.google.com/store/apps/details?


id=com.android_arsenal.androidarsenal&utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)

Stay informed with Pushbullet (https://www.pushbullet.com/channel?tag=android_arsenal&utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=7021)

Created by Vladislav Bauer (https://github.com/vbauer?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=7021)
 (https://twitter.com/BauerVlad?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)
 (https://www.linkedin.com/in/vladislavbauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)
 (https://www.paypal.me/VladislavBauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=7021)
© 2014-2018 - Android Arsenal (/) | Privacy (/privacy)

S-ar putea să vă placă și