Awesome
Android SimpleSharedPreferences
Use SimpleSharedPreferences to avoid unnecessary code while writing and fetching from SharedPreferences
Usage
Import any one *.jar into /libs
##Error
Throws ClassCastException
when wrong key is passed
##Demo SimpleSharedPreferencesDemo.Java <br> Sample.apk
Other APIs
<pre> public int getAppOpenedCount() // Get the number of times app opened public boolean isLogEnabled() // default is false public void enableLog(boolean enableLog) // Update Log Status </pre>###Note
- Can be used beside SharedPreferences without any conflict.
- All Methods in
SharedPreferences
&SharedPreferences.Editor
are available inSimpleSharedPreferences
.
Why?
- Was bored of using SharedPreferences.edit() and Editor.commit() every time to push data into SharedPreferences.
- putStringSet / getStringSet can be used <kbd>pre API level 11</kbd>.
- Throws Exact Exception when Wrong Key is passed.
- Includes API to get the number of times App was opened.
- To set "STRING_VALUE" & 50(INT_VALUE) Seperately in SharedPreferences.
imports
import com.venomvendor.library.SimpleSharedPreferences;
ProGuard
-keepclassmembers class * implements android.content.SharedPreferences.** { *; }
Author : VenomVendor
#License Copyright (C) 2016 VenomVendor info@VenomVendor.com
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.