Add Custom Toggles to Android 4.2 QuickSettings

December 4, 2012

Android 4.2 JellyBean brought lots of goodies to the plate. One of them was the most awaited QuickToggles / QuickSettings that let you quickly change power toggles, settings right from the Notifications bar.

If you’re a programmer/developerROM maker/developer,  you can learn how you can add your custom Toggles to QuickSettings on Android 4.2 Jellybean.

The guide explains step-by-step how to mod your favorite ROMs and add your own Toggles to QuickSettings.

How to Add your Own Custom Toggles to Android 4.2 QuickSettings

All you need is access to Android 4.2 Jellybean Open source codebase, and start some hacking. You can also start by decompiling the SystemUI as follows:

time make -j8 SystemUI

SystemUI source code for AOKP, CM 10.1

Step 1.

Navigate to src/com/android/systemui/statusbar/phone/QuickSettings.java, and you will see two options to create a Toggle:

1. addSystemTiles:380 – Static tiles with useful information.
2. addTemporaryTiles:571 – This type of tile will get removed without activity, for example, the alarm quick setting is a temp tile.

Lets talk about the first option in a bit of detail.

Method definition for addSystemTiles:
        // CpuInfo tile
        QuickSettingsTileView cpuInfoTile = (QuickSettingsTileView)
                inflater.inflate(R.layout.quick_settings_tile, parent, false);
        cpuInfoTile.setContent(R.layout.quick_settings_tile_cpuinfo, inflater);
        cpuInfoTile.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startSettingsActivity(Intent.ACTION_POWER_USAGE_SUMMARY);
            }
        });
        mModel.addCpuInfoTile(cpuInfoTile, new QuickSettingsModel.RefreshCallback() {
            @Override
            public void refreshView(QuickSettingsTileView view, State state) {
                ImageView iv = (ImageView) view.findViewById(R.id.cpuinfo_image);
                TextView tva = (TextView) view.findViewById(R.id.cpuinfoa_textview);
                TextView tvb = (TextView) view.findViewById(R.id.cpuinfob_textview);
                Drawable d = mContext.getResources().getDrawable(R.drawable.ic_settings_performance);
		String GOV = fileReadOneLine(GOV_FILE);
		String FREQ = fileReadOneLine(SCALE_CUR_FILE);
                iv.setImageDrawable(d);
                tva.setText(GOV);
                tvb.setText(FREQ);
                view.setContentDescription(
                        mContext.getString(R.string.accessibility_quick_settings_cpuinfo, GOV));
            }
        });
        parent.addView(cpuInfoTile);

Step 2.

The second part is updating the Toggle with a Widget view. You can view other definitions in here to update various states.

src/com/android/systemui/statusbar/phone/QuickSettingsModel.java:174

    private QuickSettingsTileView mCpuInfoTile;
    private RefreshCallback mCpuInfoCallback;
    private State mCpuInfoState = new State();

The layout definition resides in res/layout/quick_settings_tile_cpuinfo.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright ... -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:orientation="vertical">
    <ImageView
        android:id="@+id/cpuinfo_image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:paddingBottom="10dp"/>
    <TextView
        style="@style/TextAppearance.QuickSettings.TileView"
        android:id="@+id/cpuinfoa_textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:textColor="#287AA9"
        android:gravity="center"/>
    <TextView
        style="@style/TextAppearance.QuickSettings.TileView"
        android:id="@+id/cpuinfob_textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:textColor="#287AA9"
        android:gravity="center"/>
</LinearLayout>

Set contentDescription in res/values/strings.xml

    <string name="accessibility_quick_settings_cpuinfo">CpuInfo <xliff:g id="meminfo" example="CpuInfo">%s</xliff:g>.</string>

That would create a basic Widget in your Toggles. You can always shape it to your needs, but this guide should give you a basic idea for getting started.

Related: How to Compile ROMs

Follow us on Google+TwitterFacebook for latest in Android.

Steve Kondik on CyanogenMod Development & Future Releases

July 8, 2012

CyanogenMod is the most popular ROM on the Android Platform.
Steve Kondik, the founder of the CyanogenMod Community speaks publicly about what Android means to him and how Android being open helps build communities and the problems around it.

“So, the last issue: this is really frustrating if you contribute to CM and you find issues in Android itself, or even if you’re just working on Android as a non-CM person, is that there’s no visibility into what’s coming next. None. No idea what’s coming. Everything is kept closed until Google decides to release it. So, they just open everything all at once, and here you go.

So, sometimes maybe we’ll find a bug in stagefright, or we’ll find some rendering bug, or whatever. We upload the fix to the AOSP code review system, and then, they’ll say “Oh well, we already did this.

Video:

Follow us on Google+, Twitter, Facebook for latest in Android mods, news.

How to Boost, Speedup Android Emulator

March 22, 2012

One of the biggest pains with android had been its slow and sluggish Emulator.

The ADT 17 comes with lots of new features and bug fixes. Among our favorite features is the speed boost for the Android Emulator. Thanks to the AOSP & Intel, the android emulator now translates x86 instructions to ARM way more efficiently. To summarize two new improvements have been achieved to boost the performance of the Emulator:

  1. GPU Accelerated UI for Emulator
  2. x86 optimizations and speed Boost (plus OpenGL)

1. GPU Accelerated UI for Emulator

This is in an experimental stage, but it should enable basic Open ES 2.0 graphics possible on Emulator, along with GPU UI rendering, to speedup the OS.

In order to make the Android emulator run faster and be more responsive, you can configure it to take advantage of hardware acceleration, using a combination of configuration options, specific. You need:

  • Android SDK Tools, Revision 17 or higher
  • Android SDK Platform API 15, Revision 3 or higher

Use the Android SDK Manager to install these components:

Note: Not all applications are compatible with graphics hardware acceleration. In particular, the Browser application and applications using the WebView component are not compatible with graphics acceleration.

To configure a new AVD to use graphics acceleration:

  1. From AVD Manager create a new AVD with the Target value of Android 4.0.3 (API Level 15), revision 3 or higher.
  2. If you want to have graphics acceleration enabled by default for this AVD, in the Hardware section, click New, select GPU emulation and set the value to Yes.
  3. Name the AVD instance and select any other configuration options.Caution: Do not select the Snapshot: Enabled option. Snapshots are not supported for emulators with graphics acceleration enabled.
  4. Click Create AVD to save the emulator configuration.

Alternatively, you can enable it at Runtime:

Command line:

emulator -avd <avd_name> -gpu on

Using Eclipse:

In Eclipse, click your Android project folder and then select Run > Run Configurations > dialog, select your Android project run configuration or create a new configuration. Click Target tab. Select the AVD you created in the previous procedure. In the Additional Emulator Command Line Options field, enter: “-gpu on”. That’s it, Run your Android project using this run configuration.

2. x86 optimizations and speed Boost

Many modern CPUs provide extensions for running virtual machines (VMs) more efficiently. Taking advantage of these extensions with the Android emulator requires some additional configuration of your development system, but can significantly improve the execution speed.

Once you have determined that your CPU supports virtualization extensions, make sure you can work within these additional requirements of running an emulator inside an accelerated virtual machine, more details at the official development page.

Follow us on Google+, Twitter, Facebook for latest in Android mods, news.

 

Android 6.0 Key Lime Pie Features [KLP]

March 5, 2012

Google’s sixth generation Android software is rumored to be called Key Lime Pie.

Its popular that Google names for Android based on alphabetically ordered deserts. The naming of Android OS so far:

Google provided a hint at this year’s MWC that would confirm Android 5.0. The company teased Android fans by bringing a bowl of Jellybeans in a surrounding it with Android dolls.

For the android 6.0. Key Lime Pie seems to make sense, according to various sources. Android 6.0 could arrive by end of 2012 or Q1- 2013. Key Lime Pie would redefine android’s vision with ‘Beyond smart’ features. Android 6.0 would run on 6-8core processors would virtually replace desktops and portable computing.

Key Lime Pie would be a Linux hybrid. It would be the time when open distributions like Ubuntu and other Linux Flavors would seamlessly integrate with Android OS and provide an experience you cant get on phone or desktop, today.

Key features of  Key Lime Pro:

  • Simple and Beautiful
  • Super fast & ultra low power.
  • Android everywhere from low-end watches to self-driving cars.
  • Full control over OS: Key Lime Pie would give the full power to the user. Take control over
  • Designed to suit any type of use: Pro desktop, or portable mobile.

More to come.

Follow us on Google+, Twitter for latest in Android mods, news.

 

Android 5.0 Jelly Bean Features

March 5, 2012

The Rise of droids was inevitable, from nowhere to everywhere in matter of years.

Android started it’s journey with Donut followed by Eclair 2.1, Froyo 2.2, Gingerbread 2.3, Honeycomb 3.0, Ice Cream Sandwich 4.0 and Jelly bean 5.0, Key Lime Pie 6.0.

Jelly Bean aka Android 5.0 is scheduled for mid 2012 and would pump up the user experience.

So what’s new is coming with Android 5.0 – Jelly Bean?

Browser: Integrated Google Chrome

Android 4.0 has come with a lot of cool features like the fancy tabbed browsing and syncing features. The Chrome app adds lots of other desktop-like features to it. It would finally become faster than the stock browser by a big margin. Right now the experience is not all that great.

Stock File Manager on Android 5.0

Power of the Android is with it Openness. Android natively lets you access tje filesystem. However, you;ve to download one of the filew explorers from the MArket, this could change with Android 5.0 Jelly Bean. Though some good manufacturers are now providing File Managers in stock Rom but it will be better if Google itself adds this app in the OS Android 5.0 itself.

Themes

Ice cream sandwich bring s the much needed UI polish and overhaul. But there is no scope for customizing the color schemes, themes, at least in the stock android. Jelly bean would be the first step towards theme-ing in android. You would be able to download and customize color schemes as per your needs.

Lock screen widgets
You can get Lock screen widgets with a number of apps in the market, same is the case for several UI mods that shop with HTC. Some widgets like custom clocks or weather, toggles, shortcuts etc. Launching the camera from locakscreen was surely the first one, more to come.

Keyboard

On Android, you always got choice for  Keyboards, but the stock keyboard always delivers the best experience. With Android Jelly Bean, we would finally see split keyboard and other touch improvements in Stock Keyboard. Google could also release a gestures based input like Swype and Swiftkey.

Timely upgrades

Right now, It takes 3-6months for the OEMs to provide updates for the ir android phones. This would change and Google continues to kill fragmentation. Google would de-couple UI customizations from the Core OS so as to enable manufacturers to apply customizations to Stock AOSP Android in the minimum time, hence pushing faster updates to everyone.

Notification Toggle switches
Like HTC Sense, Samsung Touchwiz and Cyanogenmod, Stock Android would get toggle keys int he noticiation area to turn on/off Bluetooth, Wi-Fi, GPS etc.

Battery Efficient
ICS 4.0 already save lot of battery by improving the Hardware acceleration and Dalvik VM optimizations. Jellybean would go a step further and let user take more control over how services behavior. There’s a lot to be done here in order to prevent third party apps from misbehaving. A stock OS without any 3rd party apps gives impressive battery life. Google needs to tackle misbehaving 3rd party albums, right away.

Performance Improvements
Jellybean would support quadcore and multicore processors out fo the box. Dalvik VM might be tuned for Multi-core performance. ICS & Honeycomb were the first one to get full hardware acceleration. This would improve further with Jellybean and Android 6.0

Follow us on Google+, Twitter for latest in Android mods, news.

 

HowTo Create Android Bootscreen / Boot Animations

January 31, 2012

Creating a Android Bootscreen / Boot Animations like a Pro can be a tricky thing.

To start with, you would need:

  • A photo Editing program (GIMP and Photoshop are the best.)
  • A text editor besides notepad or wordpad. (Notepad++)
  • An archive manager (7-Zip or WinRAR)

Here’s a summary of what you need to do, full description can be found at XDA forum:

Step 1: Folders
So in this step, we need to make folders. The number of folders depends on what type of animation you want. You can name the folders anything you want as long as they are reflected in your desc.txt

Step 2: Images
So this section will be a generalization of the images. Each image in the video is called a frame. They usually vary slightly from image to image which sped through makes the illusion of a video.

-Each frame must be 480*800 px (thats 480 pixels wide by 800 pixels tall) in png format.

Step 3: Placing images in folders
This step will vary from user to user. based on what type of animation you are making.

Intro to loop (2 folders):
With this one, you are going to place all of the images that is to be the intro to folder 1.
All looping images will go into folder 2.

Step 4: desc.txt
This is the ‘script’ that tells android how to animate the screen.

Step 5: Packaging

1. Highlight all of your folders and desc.txt and right click > “Add to archive…”
2. On the left side, change the radio buttons from rar to zip
3. Change compression method to “store”
4. Name the file. For now, you can name it anything. Eventually, it will need to be named “bootanimation.zip”

The final zip would have to be placed on your android in the right directory: copy bootanimation.zip to /system/customize/resource.

Follow us on Google+Twitter for latest in Android mods, news.

StealthGenie – The Best Way to Track Android Phones

January 9, 2012

Science has, overtime, brought about rapid improvement in the quality of life of a common man with technological developments. People have started living their lives better, overcoming most of their problems. Over the past decade, smartphones have taken the world by storm with their amazing operating systems. This is due to both hardware and specialized software that these devices run and their operating systems. There has been rapid increase in the development of different mobile operating systems alongside other technological advancements.

Android has become the leading smartphone OS in the world with its distinct features. It is an operating system for smartphones and tablet computers, using a system which is open source, based on Linux, owned by Google, backed by all major mobile device manufacturers including HTC, Samsung, Motorola, Dell, Sony Ericsson, LG and many more. It allows endless customization. Initially, it was developed by Android Inc. and purchased by Google in 2005. Android runs on hundreds of devices including smartphones and tablets. Android has left behind iOS and is the most widely used smartphone in the world.

Features:

  • The platform is adaptable to larger smartphones
  • Supports connectivity technologies
  • SMS and MMS are available forms of messaging
  • Supports multiple languages
  • The web browser available in Android is based on the open-source
  • Android supports a variety of audio/video/still media formats
  • Android can use video/still cameras, touchscreens, GPS, thermometers, etc.
  • Supports Bluetooth
  • Multi-tasking of applications is available
  • The open and customizable nature of the Android operating system allows it to be used on most electronics including smartphones, laptops, netbooks, tablet computers, Google TV, wristwatches, headphones, Car CD and DVD players.

OS use and spy Software development

A mobile operating system is the operating system that controls the mobile device or information appliance. An operating system is responsible for determining the functions and features available on your device and determines what third party applications will be used on your mobile. Operating systems allow easy installation for applications in mobile phones, just like they do for computers. The development of android spy software is another addition in the field of mobile applications. They prove to be very efficient in fulfilling your monitoring needs where you want to keep a check on your target’s cell phone activities. In today’s fast-paced world, one is unable to give the required time and attention to relations which in turn creates insecurities and doubts in your life. The use of spy software is one way of leading a doubt and tension-free life as it caters to most of your monitoring needs with its features.

STEALTHGENIE AND ITS FEATURES

StealthGenie is a popular spy software application that helps you keep a check on your target’s cell phone activities. It helps you monitor:

  • Phone contacts
  • Sent and received SMS and emails
  • Audio/Video messages
  • Call logs and records
  • Geo location monitoring in real time
  • Bookmarks and Internet Browsing History
  • Messengers and chat logs
  • Enables you to access ongoing calls

Whether you are a doubtful spouse, worried parent, or a concerned employer having doubts on your employees, a StealthGenie installation in your target’s phone would do wonders for you in situations where you doubt their sincerity and honesty. Making this product a part of life would make you live a peaceful, doubt-free life!