Pages

Showing posts with label juice. Show all posts
Showing posts with label juice. Show all posts

Monday, May 2, 2016

Juice Defender Pro for Android


Extend your battery life!!

Description
*** Over 7,000,000 Downloads! ***
JuiceDefender - Battery Saver is a powerful yet easy to use power manager app specifically designed to extend the battery life of your Android device. Packed with smart functions, it automatically and transparently manages the most battery draining components, like 3G/4G connectivity and WiFi.The _preset modes_ are the perfect way to gain precious hours of battery life - literally as easy as one tap!
JuiceDefender also allows _complete customization_ through a clean and intuitive user interface; and once configured it runs by itself, improving battery life in a fully automated manner.
Finally, it _integrates seamlessly_ with power control widgets and shortcuts, without interfering with manual settings.
With JuiceDefender - Battery Saver you can easily manage Mobile Data, WiFi and CPU speed, you can keep power consumption under control (e.g. disabling connectivity when the battery runs low), schedule regular Synchronization events, enable or disable connectivity for specific apps, auto-toggle WiFi depending on your location, and much more.
When it comes to smartphones, battery life is never enough: run at full capacity when you need it, but save battery when you don’t, with JuiceDefender.
Over 7 million downloads show that it really works - try it for a few days and see for yourself, it’s free!

Features*:
- 5 Preset Profiles (from default mode to full customization)
- Easy and Intuitive User Interface
- Home screen Battery Widgets
- Mobile Data toggle automation
- 2G/3G toggle automation**
- WiFi toggle automation + Auto-Disabling option
- Location-aware WiFi Control (e.g. enable WiFi only at home/work, disable it otherwise)
- Battery Consumption Optimization (e.g. when screen off, battery under threshold, etc.)
- Comprehensive Connectivity Scheduling (regular schedule, night time/peak time, week days/weekends)
- Connectivity Control for Specific Apps with Interactive Training mode
- CPU scaling when phone is idle**
- Smart Brightness control
- Bluetooth control with Automatic Reconnect
- Full Activity Log
- It’s FREE!
* Some features require upgrading to JuiceDefender Plus or Ultimate.
** Available if supported by your ROM

More information, reviews, and support: JuiceDefender.com
Join the community: facebook.com/JuiceDefender




Read More..

Sunday, May 1, 2016

Android Date and Time Controls

The Date-Time Controls in Android enable the user to pick date and time values and store them anywhere.
The date and time controls include:
1. DatePicker
2. Time Picker.
3. DatePickerDialog.
4. TimePickerDialog.
5. AnalogClock.
6. DigitalClock.
7. chronometer

DatePicker:

The DatePicker control enables the user to select a value of date only.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>
<TextView
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/txt"
/>
<DatePicker
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/datePick"
/>
<Button
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_id="@+id/btn"
android_text="Select Date"
/>
</LinearLayout>


final DatePicker dp=(DatePicker)findViewById(R.id.datePick);
Button btn=(Button)findViewById(R.id.btn);
btn.setOnClickListener(new OnClickListener()
{

public void onClick(View arg0) {
// TODO Auto-generated method stub

TextView txt=(TextView)findViewById(R.id.txt);
txt.setText("You selected "+dp.getDayOfMonth()+"/"+(dp.getMonth()+1)+"/"+dp.getYear());
}

}

);

Notice that we add 1 to the value of DatePicker.getMonth() because the months range is from 0 to 11.

If you want to set an initial selected date for the DatePicker you can use:
DatePicker.init(year, monthOfYear, dayOfMonth, onDateChangedListener);

If you want to capture the date as the date changes in the control you can make the activity implements the OnDateChangedListener interface and implements the onDateChanged method
Calendar cal=Calendar.getInstance(Locale.ENGLISH);
dp.init(cal.getTime().getYear()+1900, cal.getTime().getMonth(), cal.getTime().getDay(), this);

then

public void onDateChanged(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// TODO Auto-generated method stub
TextView txt=(TextView)findViewById(R.id.txt);
txt.setText("You selected "+view.getDayOfMonth()+"/"+(view.getMonth()+1)+"/"+view.getYear());
}


TimePicker:
TimePicker is like DatePicker but it displays time instead of date, here’s how it looks like:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>
<TextView
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/txt"
/>
<TimePicker
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/TimePick"
/>
<Button
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_id="@+id/btn"
android_text="Select Date"
/>
</LinearLayout>


final TimePicker tp=(TimePicker)findViewById(R.id.TimePick);
Button btn=(Button)findViewById(R.id.btn);
btn.setOnClickListener(new OnClickListener()
{

public void onClick(View arg0) {
// TODO Auto-generated method stub

TextView txt=(TextView)findViewById(R.id.txt);
txt.setText("You selected "+tp.getCurrentHour()+":"+tp.getCurrentMinute());

Notice that by default the time picker displays the time in AM/PM format. If you want it to display time in 24-hours format you can use
TimePicker.setIs24HourView(boolen is24HourView);
If you want to initialize the timepicker with a certain time you can use the methods:

TimePicker.setCurrentHour(int Hour);
TimePicker.setCurrentMinute(int Minute);

You can implement the OnTimeChangedListener so that you capture any change in the time picker:
final TimePicker tp=(TimePicker)findViewById(R.id.TimePick);
tp.setCurrentHour(10);
tp.setCurrentMinute(45);

tp.setOnTimeChangedListener(new OnTimeChangedListener()
{

public void onTimeChanged(TimePicker arg0, int arg1, int arg2) {
// TODO Auto-generated method stub
TextView txt=(TextView)findViewById(R.id.txt);
txt.setText("You selected "+arg0.getCurrentHour()+":"+arg0.getCurrentMinute());
}

}
);

We checked so far the DatePicker and TimePicker widgets, but they take big space on the screen so Android provides similar controls but with different look: the DatePickerDialog and TimePickerDialog.

These widgets act the same as DatePicker and TimePicker but the appear as dialogs or popups instead of occupying a space on the screen

DatePickerDialog
DatePickerDialog is not a View, that you can’t define it in the xml layout file.
Instead you declare it from code with the following two constructors:
DatePickerDialog(Context context, DatePickerDialog.OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth);
DatePickerDialog(Context context, int theme, DatePickerDialog.OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth);

You can use it like this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn=(Button)findViewById(R.id.btn);

final OnDateSetListener odsl=new OnDateSetListener()
{

public void onDateSet(DatePicker arg0, int year, int month, int dayOfMonth) {
// TODO Auto-generated method stub
TextView txt=(TextView)findViewById(R.id.txt);
txt.setText("The date is "+dayOfMonth+"/"+month+"/"+year);
}

};

btn.setOnClickListener(new OnClickListener()
{

public void onClick(View arg0) {
// TODO Auto-generated method stub


Calendar cal=Calendar.getInstance();
DatePickerDialog datePickDiag=new DatePickerDialog(DateTimeControls.this,odsl,cal.get(Calendar.YEAR),cal.get(Calendar.MONTH),cal.get(Calendar.DAY_OF_MONTH));
datePickDiag.show();
}

}

);

}

To take an action when the date is set you define an OnDateSelectedListner and implement the onDateSet method

TimePickerDialog

DatePickerDialog is similar to DatePickerDialog but used for setting time.
The constructors for TimePickerDialog are:
TimePickerDialog(Context context, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView);

TimePickerDialog(Context context, int theme, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView);


You can use it like this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn=(Button)findViewById(R.id.btn);
}

final OnTimeSetListener otsl=new OnTimeSetListener()
{

public void onTimeSet(TimePicker arg0, int hourOfDay, int minute) {
// TODO Auto-generated method stub
TextView txt=(TextView)findViewById(R.id.txt);
txt.setText("The time is "+hourOfDay+":"+minute);
}
};

btn.setOnClickListener(new OnClickListener()
{

public void onClick(View arg0) {
// TODO Auto-generated method stub


Calendar cal=Calendar.getInstance();
TimePickerDialog timePickDiag=new TimePickerDialog(DateTimeControls.this,otsl,cal.get(Calendar.HOUR_OF_DAY),cal.get(Calendar.MINUTE),true);
timePickDiag.show();
}

}

);




AnalogClock

If you want to display time as in a clock you can use the AnalogClock widget. It just displays the time with no ability to edit the time.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>
<TextView
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/txt"
/>

<AnalogClock
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_id="@+id/clock"
/>


</LinearLayout>






DigitalClock
Same as AnalogClock but displays a digital clock
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>
<TextView
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/txt"
/>

<DigitalClock
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_id="@+id/digitalClock"
/>


</LinearLayout>




ChronoMeter:

The ChronoMeter acts like a timer. It has a starting point and an endpoint and you can calculate the time elapsed between these two points.
Read More..