Click here to Skip to main content
15,886,110 members
Articles / Mobile Apps / Android

Encryption Wrapper for Android SharedPreferences

Rate me:
Please Sign up or sign in to vote.
5.00/5 (14 votes)
27 Mar 2013Apache5 min read 64K   3.4K   34  
This article explains why and how you should protect your app's settings from prying eyes
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2013, Daniel Abraham

    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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.securepreferences"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">

        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name=".OldPreferenceActivity" />

        <activity android:name=".NewPreferenceActivity" />

    </application>
</manifest>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
United States United States
I'm a veteran software engineer. My professional focus is currently test automation for next-generation server network controllers. I also work a lot with Linux and Android, and dabble with wireless technologies in my spare time.

Comments and Discussions