/SharedPrefManager

SharedPref Manager is a Dev Debug tool that helps to manage your android Shared Preferences very effectively with ease

Primary LanguageJavaApache License 2.0Apache-2.0

⚠️ This library is fork from Ashok-Varma/SharedPrefManager. Includes AndroidX and Kotlin artifacts.

SharedPref Manager

get sample apk from [Google Play Store][googlePlayStoreLink]

What is this library about?

SharedPref Manager helps to manage your android Shared Preferences very effectively with ease

Features

  • Edit a SharedPreferences Item
  • Add a SharedPreference Item
  • Clear All SharedPreferences
  • Delete a SharedPreference Item

Download

You can implement library to your module level build.gradle file as shown below.

Gradle:

Groovy(build.gradle):

debugImplementation 'com.github.bilgehankalkan.SharedPrefManager:sharedpref-manager:1.3.0'
releaseImplementation 'com.github.bilgehankalkan.SharedPrefManager:sharedpref-manager-no-op:1.3.0'

Kotlin(build.gradle.kts)

debugImplementation("com.github.bilgehankalkan:SharedPrefManager:sharedpref-manager:1.3.0")
releaseImplementation("com.github.bilgehankalkan.SharedPrefManager:sharedpref-manager-no-op:1.3.0")

Usage

All the Shared-Pref Names to be should be sent to SharedPrefManager. It does remaining heavy lifting.

Sample Code

Java:

SharedPrefManager
        .launchSharedPrefManager(
                context
                , new ArrayList<>(Arrays.asList(new String[]{"SHARED_PREF_1_PRIVATE", "SHARED_PREF_2_PRIVATE"}))// All your MODE_PRIVATE shared Shared Preference names, Null if None
                , new ArrayList<>(Arrays.asList(new String[]{"SP_WORLD_READ"}))//All your MODE_WORLD_READABLE Shared Preference Names, Null if None
                , new ArrayList<>(Arrays.asList(new String[]{"SP_WORLD_WRITE"}))//All your MODE_WORLD_READABLE Shared Preference Names, Null if None
         );

Kotlin:

  
SharedPrefManager.launchSharedPrefManager(
    context = this,
    privateSharedPrefNames = arrayListOf("PREFERENCE_NAME")
)

MODE_WORLD_READABLE, MODE_WORLD_READABLE are not supported by android system in Android N(Nougat) and above devices, If sent those will be ignored in Android N and above devices.

License

SharedPref 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.