Read battery status and level

Android example to read battery status and level via IntentFilter(Intent.ACTION_BATTERY_CHANGED).


package com.example.androidbattery;

import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.BatteryManager;
import android.os.Bundle;

public class MainActivity extends ActionBarActivity {

Button btnReadBattery;
TextView textBatteryStatus;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

btnReadBattery = (Button)findViewById(R.id.readbattery);
textBatteryStatus = (TextView)findViewById(R.id.batterystatus);

btnReadBattery.setOnClickListener(new OnClickListener(){

@Override
public void onClick(View v) {
textBatteryStatus.setText(readBattery());
}});

}

private String readBattery(){
StringBuilder sb = new StringBuilder();
IntentFilter batteryIntentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryIntent = registerReceiver(null, batteryIntentFilter);

int status = batteryIntent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
if(status == BatteryManager.BATTERY_STATUS_CHARGING){
sb.append("BATTERY_STATUS_CHARGING\n");
}
if(status == BatteryManager.BATTERY_STATUS_FULL){
sb.append("BATTERY_STATUS_FULL\n");
}

int plugged = batteryIntent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
if(plugged == BatteryManager.BATTERY_PLUGGED_USB){
sb.append("BATTERY_PLUGGED_USB\n");
}
if(plugged == BatteryManager.BATTERY_PLUGGED_AC){
sb.append("BATTERY_PLUGGED_AC\n");
}

int level = batteryIntent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
sb.append("level: " + level + "\n");

int scale = batteryIntent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
sb.append("scale: " + scale + "\n");

return sb.toString();
}
}

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.androidbattery.MainActivity" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:text="http://android-er.blogspot.com/"
android:textStyle="bold" />

<Button
android:id="@+id/readbattery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Read Battery" />

<TextView
android:id="@+id/batterystatus"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>


Next:
- Get battery information using BatteryManager

YouTube Data API v2 will end on April 20, 2015

Remind from Goolge The YouTube API Team about Final Turndown Notice for YouTube Data API v2:

You are receiving this email because your address is associated with a project that has recently accessed the YouTube Data API (v2), which will soon be shut down. Please disregard this message if you're not associated with such a project. There won't be any further emails. In March 2014, we announced that the v2 API would be retired on April 20, 2015, and
would be shut down soon thereafter. To help you with your migration, we published the migration guide in September. Now, we'd like to provide you with more details on the v2 retirement timeline. As of April 20, 2015, v2 API endpoints will be shut off with the following exception: We will keep the v2 versions of the comments, captions, and flagging features accessible for a grace period past the shutdown date. These features are still listed as "To be supported" in the migration guide. The grace period is designed to give you time to implement the new v3 versions of these features as they become available. In addition, the v2 API endpoint for uploading videos will also remain open during this time. If you would like to test your application's reaction to the v2 API shutdown, point it to eol.gdata.youtube.com instead of gdata.youtube.com. Please migrate your app to the YouTube Data API v3 at your earliest convenience to avoid any outage. For more information please visit: YouTube Data API v2 Turndown FAQ. If you have any questions about the YouTube Data API v2 turndown, you can reach us via the this support form.


C&C Generals Zero Hour (289mb)

C&C Generals Zero Hour pc users
finally i found this version after a long search and lost so much time 
highly compress version exe file auto run English version most of all with patch launcher keygen and much more option in one pack u can install with recommended  minimum maximum and custom installation 
i have been searching this game for weeks and also waiting for its second part which has to be launched in this year but goes on and on still we are waiting this game is officially in 2.6GB here you can download it only in 289 MB on direct link and in one link most of all its the best ever game experience for me hope you ill enjoy it its for windows users only windows xp, 7 , 8, and 8.1 might be works on 9 with some add ons 
Download HIT ME 

Learning Android Application Testing

Improve your Android applications through intensive testing and debugging

Learning Android Application Testing

About This Book
  • Focus on Android instrumentation testing to ensure full application coverage
  • Apply testing techniques and utilize tools to improve Android application development
  • Build intensively tested and bug free Android applications
Who This Book Is For
If you are an Android developer looking to test your applications or optimize your application development process, then this book is for you. No previous experience in application testing is required.

In Detail
This book is a practical introduction to readily available techniques, frameworks, and tools to thoroughly test your Android applications and improve project development.

You will learn the Java testing framework, how to create a test case and debug it. Next, you'll be walked through using the Android SDK to test using the ActivityTestCase and ActivityUnitTest classes as well as discussing popular testing libraries. Through examples you will test files, databases, ContentProviders, exceptions, services, and test your app using Espresso. You will discover how to manage your Android testing environment using Android emulators, deep dive into how adb and the emulator can super charge your testing automation, and also test user interactions with monkeyrunner. You will be guided through different testing methodologies including Test-driven Development and Behavior-driven Development and will learn how to perform Unit and Functional testing applying them to your Android projects. You will also use continuous integration techniques for ultimate application quality control using Gradle and Jenkins.

By the end of the book, you'll be looking through alternative testing tactics including Fest and Spoon to build upon and expand your Android testing range and finesse.

Android App Development For Dummies

Android App Development For Dummies

This is the updated edition of the bestselling guide to Android app development. If you have ambitions to build an Android app, this hands-on guide gives you everything you need to dig into the development process and turn your great idea into a reality! In this new edition of Android App Development For Dummies, you'll find it easy-to-follow access to the latest programming techniques that take advantage of the new features of the Android operating system. And, two programs are provided: a simple program to get you started and an intermediate program that uses more advanced aspects of the Android platform. Android mobile devices currently account for nearly 80 per cent of mobile phone market share worldwide, making it the best platform to reach the widest possible audience. With the help of this friendly guide, developers of all stripes will quickly find out how to install the tools they need, design a good user interface, grasp the design differences between phone and tablet applications, handle user input, avoid common pitfalls, and turn a "meh" app into one that garners applause. It helps to create seriously cool apps for the latest Android smart phones and tablets. It helps you to adapt your existing apps for use on an Android device. It helps you to start working with programs and tools to create Android apps. It helps to publish your apps to the Google Play Store. Whether you're a new or veteran programmer, Android App Development For Dummies will have you up and running with the ins and outs of the Android platform in no time.

Taskbar Premium v.4.4


Taskbar - Window 8 Style es una herramienta que imita el Window 8 Taskbar. Es muy útil cuando se quiere lanzar aplicaciones, configuraciones comunes, contactos favoritos rápidamente.


Características

  • botón "Inicio"
Pulse sobre el botón "Inicio" para abrir la barra de tareas. Desplácese hacia arriba / abajo para iniciar la aplicación. Si agrega carpetas, contactos, configuración, haga clic en el tema de ejecutar.

  • Cambiar localidad botón de inicio
Haga clic en un suspenso por un tiempo, y luego moverse para cambiar su ubicación.

  • botón inteligente "Start"
Botón Inicio se iban desvaneciendo, si la barra de tareas no se abre en dos segundos. También aprenden el modo de usar el área de "start menu" y barra de tareas y elegantemente ajustarlos para usted.

  • Reordenar aplicaciones
Configuración> Editar menú Abrir inicio, a continuación, arrastre el icono de la derecha y se mueve para cambiar el orden material.

  • Ocultar aplicaciones
Configuración> Editar menú Abrir inicio, a continuación, haga clic en la barra de acción> ocultar excluir aplicaciones.

  • Crear carpeta
Entorno abierto> edit menú Inicio, haga clic en la barra de acción> añadir nueva para añadir nueva carpeta. Nombre de la carpeta de tipo, seleccione el icono y el tipo de carpeta.

Tipo de carpeta incluye:

- Aplicaciones
- Configuración
- Contactos

Más Modo próximamente: señal, acceso directo, marcación rápida, etc,









Descargala desde el Play Store >  Taskbar





Descargala aquí como .apk > Taskbar Premium v.4.4



#ChromeSelfie: share your reaction while browsing:)

Now you can share your reaction while browsing with Chrome Browser on mobile phone: Just tap on menu icon > Share a reaction