Sms Gratis Indosat

Phone Numbers
0 -
Example : 83832867987 Without 0

Type your Messages

Question: + =

Lancia Aurelia B56 "Florida" by Pininfarina

No technical specification is available

(click images for a larger view)










Determine light level, Sensor.TYPE_LIGHT.

Example to determine light level using Android light sensor:

Determine light level, Sensor.TYPE_LIGHT.


package com.example.androidsensor;

import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.app.Activity;
import android.widget.TextView;

public class MainActivity extends Activity {

TextView textLIGHT_available, textLIGHT_reading;

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

textLIGHT_available
= (TextView)findViewById(R.id.LIGHT_available);
textLIGHT_reading
= (TextView)findViewById(R.id.LIGHT_reading);

SensorManager mySensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);

Sensor LightSensor = mySensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);
if(LightSensor != null){
textLIGHT_available.setText("Sensor.TYPE_LIGHT Available");
mySensorManager.registerListener(
LightSensorListener,
LightSensor,
SensorManager.SENSOR_DELAY_NORMAL);

}else{
textLIGHT_available.setText("Sensor.TYPE_LIGHT NOT Available");
}
}

private final SensorEventListener LightSensorListener
= new SensorEventListener(){

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub

}

@Override
public void onSensorChanged(SensorEvent event) {
if(event.sensor.getType() == Sensor.TYPE_LIGHT){
textLIGHT_reading.setText("LIGHT: " + event.values[0]);
}
}

};

}


<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">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
tools:context=".MainActivity" />

<TextView
android:id="@+id/LIGHT_available"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/LIGHT_reading"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />

</LinearLayout>


Related:
- Access temperature sensor, TYPE_TEMPERATURE and TYPE_AMBIENT_TEMPERATURE.

Access temperature sensor, TYPE_TEMPERATURE and TYPE_AMBIENT_TEMPERATURE.

The temperature sensors (Sensor.TYPE_TEMPERATURE/Sensor.TYPE_AMBIENT_TEMPERATURE) are used to determine temperature of the phone, for internal hardware. They are not available on all device. (It's not available on my HTC One X and HTC Flyer!)

Sensor.TYPE_TEMPERATURE is deprecated, use Sensor.TYPE_AMBIENT_TEMPERATURE instead.

Example:
package com.example.androidsensor;

import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.app.Activity;
import android.widget.TextView;

public class MainActivity extends Activity {

TextView textTEMPERATURE_available, textTEMPERATURE_reading;
TextView textAMBIENT_TEMPERATURE_available, textAMBIENT_TEMPERATURE_reading;

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

textTEMPERATURE_available
= (TextView)findViewById(R.id.TEMPERATURE_available);
textTEMPERATURE_reading
= (TextView)findViewById(R.id.TEMPERATURE_reading);
textAMBIENT_TEMPERATURE_available
= (TextView)findViewById(R.id.AMBIENT_TEMPERATURE_available);
textAMBIENT_TEMPERATURE_reading
= (TextView)findViewById(R.id.AMBIENT_TEMPERATURE_reading);

SensorManager mySensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);

Sensor TemperatureSensor = mySensorManager.getDefaultSensor(Sensor.TYPE_TEMPERATURE);
if(TemperatureSensor != null){
textTEMPERATURE_available.setText("Sensor.TYPE_TEMPERATURE Available");
mySensorManager.registerListener(
TemperatureSensorListener,
TemperatureSensor,
SensorManager.SENSOR_DELAY_NORMAL);

}else{
textTEMPERATURE_available.setText("Sensor.TYPE_TEMPERATURE NOT Available");
}

Sensor AmbientTemperatureSensor
= mySensorManager.getDefaultSensor(Sensor.TYPE_AMBIENT_TEMPERATURE);
if(AmbientTemperatureSensor != null){
textAMBIENT_TEMPERATURE_available.setText("Sensor.TYPE_AMBIENT_TEMPERATURE Available");
mySensorManager.registerListener(
AmbientTemperatureSensorListener,
AmbientTemperatureSensor,
SensorManager.SENSOR_DELAY_NORMAL);
}else{
textAMBIENT_TEMPERATURE_available.setText("Sensor.TYPE_AMBIENT_TEMPERATURE NOT Available");
}
}

private final SensorEventListener TemperatureSensorListener
= new SensorEventListener(){

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub

}

@Override
public void onSensorChanged(SensorEvent event) {
if(event.sensor.getType() == Sensor.TYPE_TEMPERATURE){
textTEMPERATURE_reading.setText("TEMPERATURE: " + event.values[0]);
}
}

};

private final SensorEventListener AmbientTemperatureSensorListener
= new SensorEventListener(){

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub

}

@Override
public void onSensorChanged(SensorEvent event) {
if(event.sensor.getType() == Sensor.TYPE_AMBIENT_TEMPERATURE){
textAMBIENT_TEMPERATURE_reading.setText("AMBIENT TEMPERATURE: " + event.values[0]);
}
}

};

}


<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">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
tools:context=".MainActivity" />

<TextView
android:id="@+id/TEMPERATURE_available"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/TEMPERATURE_reading"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/AMBIENT_TEMPERATURE_available"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/AMBIENT_TEMPERATURE_reading"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />

</LinearLayout>


Related:
- Determine light level, Sensor.TYPE_LIGHT.

Read Aperture, Exposure Time, and ISO from Exif

The post "Read EXIF of JPG file" demonstrate how to read Exif from JPG file using ExifInterface. Start from API Level 11, Exif tag of TAG_APERTURE, TAG_EXPOSURE_TIME and TAG_ISO was added in the android.media.ExifInterface class. You can simple modify the code in "Read EXIF of JPG file" to read Aperture, Exposure Time, and ISO from Exif.

Lada VAZ 2106 Low Rider

S4 / 1.569 cc / 75 PS / 89 lb/ft (120 Nm) @ 3.000 / 0 - 62 mph (100 km/h): 16,0 s / Vmax: 96 mph (155 km/h)

(click images for a larger view)







Samsung Pays $1B to Apple with 30 Truck Loads of 5 Cent Coins? It's NOT TRUE.

A funny story is sweeping the internet. Samsung paid $1.05 billion to Apple by sending 30 trucks containing five-cent coins.

According to PaperBlog, the trucks were sent to Apple's main office in California this morning. Initially, the security of the company prevented the intrusion. However, Apple CEO Tim Cook received a call from the chief executive of Samsung that they have sent the payment for the fine ruled by the jury in the recently concluded patent battle of the two tech giants.

The funny thing is, the story originated from a meme of the popular website 9Gag.com. Thus, the news report is a hoax.

Details: http://au.ibtimes.com/articles/378402/20120829/samsung-pay-apple-1-billion-coins-five.htm

BMW 3200 Michelotti Vignale

V8 / 3.168 cc / 150 PS / Vmax: 127 mph (205 km/h) / one-off collector piece

(click images for a larger view)








How Apple Jury Reached a Verdict

Apple Jury Foreman: Here's How We Reached a Verdict

Aug. 27 (Bloomberg) -- The Apple Vs. Samsung Jury Foreman Vel Hogan discusses his experience throughout the billion dollar patent case. He speaks with Emily Chang on Bloomberg Television's "Bloomberg West." (Source: Bloomberg)


Rolls-Royce Silver Shadow 2-door Saloon by H. J. Mulliner, Park Ward Ltd

V8 / 6.750 cc / 200 PS / 406 ft/lb (550 Nm) @ 1.750 / 0  - 62 mph (100 km/h): 11,0 s / Vmax: 118 mph (190 km/h) / this car is for sale, the price: CHF 69.000

(click images for a larger view)




















Implement ListView NOT extends ListActivity

Example to implement ListView NOT extends ListActivity:

Create /res/layout/row.xml to define the layout of rows in ListView.
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="25sp" />


Modify the layout to add a ListView.
<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">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
tools:context=".MainActivity" />
<ListView
android:id="@+id/mylist"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

</LinearLayout>


package com.example.androidlistview;

import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.Toast;

public class MainActivity extends Activity {

String[] month ={
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"};

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

ListView myListView = (ListView)findViewById(R.id.mylist);
ListAdapter myListAdapter = new ArrayAdapter<String>(
getApplicationContext(),
R.layout.row,
month);
myListView.setAdapter(myListAdapter);
myListView.setOnItemClickListener(new OnItemClickListener(){

@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
Toast.makeText(getApplicationContext(),
parent.getItemAtPosition(position).toString(),
Toast.LENGTH_LONG).show();
}
});
}

}


Implement ListView NOT extends ListActivity

New permission for Android 4.1, API Level: 16.

Android 4.1 add the following new permissions:
  • READ_EXTERNAL_STORAGE
    Provides protected read access to external storage. In Android 4.1 by default all applications still have read access. This will be changed in a future release to require that applications explicitly request read access using this permission. If your application already requests write access, it will automatically get read access as well. There is a new developer option to turn on read access restriction, for developers to test their applications against how Android will behave in the future.
  • READ_USER_DICTIONARY
    Allows an application to read the user dictionary. This should only be required by an IME, or a dictionary editor like the Settings app.
  • READ_CALL_LOG
    Allows an application to read the system's call log that contains information about incoming and outgoing calls.
  • WRITE_CALL_LOG
    Allows an application to modify the system's call log stored on your phone
  • WRITE_USER_DICTIONARY
    Allows an application to write to the user's word dictionary.

Details: Android 4.1 APIs | Android Developers : Permissions

Chevrolet Camaro (1969) by Roadster Shop

V8 / 6.162 cc / 585 PS / 485 ft/lb (658 Nm)

(click images for a larger view)












 
Copyright © 2015. About - Web Version - Mobile Version Sitemap - Contact - Privacy