alvinalexander.com: Android 5 Preferences tutorial (PreferenceScreen, PreferenceActivity, and PreferenceFragment)

alvinalexander.com: Android 5 Preferences tutorial (PreferenceScreen, PreferenceActivity, and PreferenceFragment)

The code here has been updated from iRomani’s tutorial, and contains the necessary corrections to work with Android 5, specifically using a PreferenceFragment along with the PreferenceActivity:

package com.alvinalexander.preferencestestapp;

import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;

public class MyPreferencesActivity extends PreferenceActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getFragmentManager().beginTransaction().replace(android.R.id.content, new MyPreferenceFragment()).commit();
    }

    public static class MyPreferenceFragment extends PreferenceFragment
    {
        @Override
        public void onCreate(final Bundle savedInstanceState)
        {
            super.onCreate(savedInstanceState);
            addPreferencesFromResource(R.xml.preferences);
        }
    }

}

jide.com: The world’s first true Android PC

jide.com: The world’s first true Android PC

Powered by Remix OS, Remix Mini allows you to work and play with the entire Android app ecosystem while taking full advantage of intuitive PC features such as a taskbar, multiple window multi-tasking, mouse and keyboard support,
and so much more.

Remix Mini is powered by the latest 64-bit chipset and delivers up to 20-30% better performance than its 32-bit counterparts. At the core of what makes this so special is actually what Remix Mini doesn’t need you to do. You will never have to worry about whether you’re installing the right bit version ever again. With Android, it all just works.

The typical desktop computer clocks in at anywhere between 65 to 250 watts. Remix Mini gives you the same power of desktop computing at a mere 10 watts. By simply leveraging already existing power efficiencies found in mobile CPU architectures, Remix Mini is able to save you so much more in power without sacrificing anything in performance.

The Remix Mini features a capacitive touch power button unlike any PC of its kind. Rather than awkwardly feeling around the back panel for that elusive power button, just gently tap the top of your Mini. Within seconds you’ll be able to start doing what you need to do.

Even at its small size, Remix Mini comes equipped with everything you need in order to stay connected: WiFi, Ethernet, Bluetooth, and USB. All of these options gives Remix Mini an unprecedented level of versatility in a variety of scenarios.

As a home media center, the 1G RAM + 8 GB storage gives you more than what you need to stream and download that blockbuster movie you’ve been dying to see. Now, if you’re looking for something with a bit more kick and productivity in mind, we highly recommend the 2G RAM + 16GB storage version. No matter what you decide, the choice will quite literally be in your hands.

stackoverflow.com: How do I get the SharedPreferences from a PreferenceActivity in Android?

stackoverflow.com: How do I get the SharedPreferences from a PreferenceActivity in Android?

import android.preference.PreferenceManager;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
// then you use
prefs.getBoolean("keystring", true);

Shared Preferences:

The shared preferences are managed with the help of getSharedPreferences method of the Context class. The preferences are stored in a default file (1) or you can specify a file name (2) to be used to refer to the preferences.

(1) The recommended way is to use by the default mode, without specifying the file name

SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);

(2) Here is how you get the instance when you specify the file name

public static final String PREF_FILE_NAME = "PrefFile";
SharedPreferences preferences = getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE);

MODE_PRIVATE is the operating mode for the preferences. It is the default mode and means the created file will be accessed by only the calling application. Other two modes supported are MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE. In MODE_WORLD_READABLE other application can read the created file but can not modify it. In case of MODE_WORLD_WRITEABLE other applications also have write permissions for the created file.

indooratlas.com: Global, cloud-powered indoor positioning service to app developers

indooratlas.com: Global, cloud-powered indoor positioning service to app developers

IndoorAtlas is the only company in the world that offers a global, cloud-powered indoor positioning service to app developers. IndoorAtlas is a patented, software-only solution based on magnetic positioning that provides industry-leading positioning accuracy without the need for external hardware infrastructure.

IndoorAtlas was founded in 2012 as a spin-off from the University of Oulu, Finland. We incorporated in the US with an office in Mountain View in 2013 and our R&D centers are located in Oulu and Helsinki, Finland. Our team is made up of 25 of the brightest and most dedicated researchers, computer scientists, and software engineers, and product strategists in the world. The founding team has extensive experience in robotics, computer science and mathematics. Once you meet us, you will see and experience our dedication.

The IndoorAtlas core technology is based on magnetic positioning, which means that the solution is independent from external infrastructures such as radio access points. The magnetic-positioning core offers developers unprecedented scale and freedom when building location-based apps. IndoorAtlas can also integrate Wi-Fi and Bluetooth location information for optimized positioning performance.

arxiv.org: PowerSpy: Location Tracking using Mobile Device Power Analysis

arxiv.org: PowerSpy: Location Tracking using Mobile Device Power Analysis

By Yan Michalevsky, Dan Boneh and Aaron Schulman, Gabi Nakibly

Modern mobile platforms like Android enable applications to read aggregate power usage on the phone. This information is considered harmless and reading it requires no user permission or notification. We show that by simply reading the phone’s aggregate power consumption over a period of a few minutes an application can learn information about the user’s location. Aggregate phone power consumption data is extremely noisy due to the multitude of components and applications simultaneously consuming power. Nevertheless, we show that by using machine learning techniques, the phone’s location can be inferred. We discuss several ways in which this privacy leak can be remedied.

Our smartphones are always within reach and their location is mostly the same as our location. In effect, tracking the location of a smartphone is practically the same as tracking the location of its owner. Since users generally prefer that their location not be tracked by arbitrary 3rd parties, all mobile platforms consider the device’s location as sensitive information and go to considerable lengths to protect it: applications need explicit user permission to access the phone’s GPS and even reading coarse location data based on cellular and WiFi connectivity requires explicit user permission.

In this work we show that applications that want access to location data can bypass all these restrictions and covertly learn the phone’s location. They can do so by analyzing the phone’s power consumption over a period of time. Our work is based on the observation that the phone’s location significantly affects the power consumed by the phone’s cellular radio. The power consumption is affected both by the distance to the cellular base station to which the phone is currently attached (free-space path loss) and by obstacles, such as buildings and trees, between them (shadowing). The closer the phone is to the base station and the fewer obstacles between them, the less power the phone will consume. The strength of the cellular signal is a major factor affecting the power used by the cellular radio. Moreover, the cellular radio is one of the most dominant power consumers on the phone.