Technoledge

Android Learning, Programing, Game and Aplication. with Programing Language

  • Home
  • Privacy Policy
  • Disclaimer
  • Contact Us
skip to main | skip to sidebar
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Home » Posts filed under Android

Take a photo in android camera

Take a photo in android camera. Here is a simple tutorial using the cameras available in android device for use in applications that want to create and display a preview of the image.

Take a photo in android camera

Given that the camera is part of the existing hardware in the device, then we need to make permissions to access the camera. To add permissions in android we can add to the AndroidManifest.xml file.
<uses -permission android:name="android.permission.CAMERA"></uses>
In simple access to the camera via an intent. If you already have a button with the event being called quite like this:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivity(intent);
With intent as above, then you will directly use the camera, but just open the camera, no additional functions such as preview the result.

Well, the following will also preview the results.

Initially we will determine the layout. Because only simple, then this layout will only use the function keys to access the camera and ImageView to display the camera images.
< ?xml version="1.0" encoding="utf-8"?>
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<button android:id="@+id/capture"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Take a Picture"></button>
<imageview android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="centerInside"></imageview>
</linearlayout>
Next we determine the content of play ativity like this:
public class MyActivity extends Activity {
   private static final int REQUEST_IMAGE = 100;
   Button captureButton;
   ImageView imageView;
 
   @Override
   public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          captureButton = (Button)findViewById(R.id.capture);
          captureButton.setOnClickListener(listener);
          imageView = (ImageView)findViewById(R.id.image);
   }
   @Override
   protected void onActivityResult(int requestCode, int resultCode, Intent data) {
     if(requestCode == REQUEST_IMAGE && resultCode == Activity.RESULT_OK) {
       //Process and display the image
       Bitmap userImage = (Bitmap)data.getExtras().get("data");
       imageView.setImageBitmap(userImage);
   }
}
   private View.OnClickListener listener = new View.OnClickListener() {
 
   @Override
   public void onClick(View v) {
       Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
       startActivityForResult(intent, REQUEST_IMAGE);
   }
 };
}
By coding as above the photo obtained directly displayed on imageView. This can be seen in the code:
      Bitmap userImage = (Bitmap)data.getExtras().get("data");
       imageView.setImageBitmap(userImage);
If you need to determine where the images are stored into the storage, then we need to add Uri destination file, so its code be like:
public class MyActivity extends Activity {
   private static final int REQUEST_IMAGE = 100;
   Button captureButton;
   ImageView imageView;
 
   @Override
   public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          captureButton = (Button)findViewById(R.id.capture);
          captureButton.setOnClickListener(listener);
          imageView = (ImageView)findViewById(R.id.image);
   }
   @Override
   protected void onActivityResult(int requestCode, int resultCode, Intent data) {
     if(requestCode == REQUEST_IMAGE && resultCode == Activity.RESULT_OK) {
       try {
            FileInputStream in = new FileInputStream(destination);
            BitmapFactory.Options options = new BitmapFactory.Options();
            options.inSampleSize = 10; //Downsample by 10x
            Bitmap userImage = BitmapFactory.decodeStream(in, null, options);
            imageView.setImageBitmap(userImage);
       } catch (Exception e) {
            e.printStackTrace();
       }
    }
  }
   private View.OnClickListener listener = new View.OnClickListener() {
 
   @Override
   public void onClick(View v) {
       Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
       //Add extra to save full-image somewhere
       intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(destination));
       startActivityForResult(intent, REQUEST_IMAGE);
   }
 };
}
Completed.
Labels: Android
Home » Posts filed under Android

Change Style Of EditText Android ICS Style to Old Style


Changes to the version of the android version 4.0 or ICS (Icescream Sandwich) brings many changes. One is the default theme (default) on the application. When in android in older versions, EditText used are conventional white box, whereas in version 4.0 using a EditText which only has the bottom line (not a box). It looks more modern, but there are also assuming that EditText on version ICS EditText less user friendly than the conventional ones.

So, for example, we are comfortable with themed version of ICS, but would like to replace just the EditText EditText to older versions.

Actually on any android sdk, it includes a collection of XML files that can be seen for reference. Likewise for EditText. Inspect the android sdk directory older versions you on the path here:
<android_sdk>\platforms\android-x.x\data\res\drawable</android_sdk>
Open the file edit_text.xml, contents:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_default"></item>
  <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_disabled"></item>
  <item android:state_pressed="true" android:drawable="@drawable/textfield_pressed"></item>
  <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_selected"></item>
  <item android:state_enabled="true" android:drawable="@drawable/textfield_default"></item>
  <item android:state_focused="true" android:drawable="@drawable/textfield_disabled_selected"></item>
  <item android:drawable="@drawable/textfield_disabled"></item>
</selector>

These files will be used. Keep drawable into your project directory.

Next we need the image file as a background EditText. The image file also can we take on the directory:
drawable-mdpi
file name is:

textfield_default.9.png
textfield_disabled.9.png
textfield_disabled_selected.9.png
textfield_pressed.9.png
textfield_search_default.9.png
textfield_search_selected.9.png
textfield_search_pressed.9.png
textfield_selected.9.png
textfield_disabled_selected.9.png

copy also to the drawable-mdpi directory you.

Then you simply call last edit_text.xml file into your EditText layout, eg:

<edittext android:id="@+id/edit2"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:inputType="text"
        android:background="@drawable/edit_text"></edittext>

Finish.
Labels: Android
Home » Posts filed under Android

Calculating Total Data (row) in SQLite Android


Simple tutorial to calculate the amount of data / rows contained in sqlite database in android. The amount of data / row one known to be useful if the data you want inserted already exists, if it exists, it is not necessary to add, if not, then it can be added. But I was not that far, just to check course :)
Android

As we know that to get the results of the query in sqlite in android using Cursor. And as to the general query, that to count the number of rows by using the count (*). So its shape code something like this :

public void count(){
    SQLiteDatabase db = table.getWritableDatabase();
    String count = "SELECT count(*) FROM table";
    Cursor mcursor = db.rawQuery(count, null);
    mcursor.moveToFirst();
    int count = mcursor.getInt(0);
    System.out.println("NUMBER IN DB: " + icount);
}

Labels: Android
Home » Posts filed under Android

Dictionary terms in Android


Dictionary terms in Android

Dictionary terms in Android

A
Android Market: The place where an application for Android is, most are free.
AOSP: Android Open Source Project. When we say that Android is open source then we refer to this case, where the source code for Android and can be downloaded and used by anyone.
Apex: Call for mid-range segment made by LG for U.S. Cellular.
. Apk: The file extension to Android app
Apps: Abbreviation for "applications" or applications. The program that we downloaded and run on our handheld. Free can be paid.
App Inventor: a web-based system which Android apps can be made without the need to know how to get code. Discontinued by google but was released as open-source projects.
Android Operating System that uses linux kernel 2.6 and Dalvik VM created by Android, Inc.., Google.
Android SDK: A starter pack containing tools, sample code, and documentation that allows you to use Android application development.
ADB (Android Debug Bridge) Tools: Tool used to command terminal in android system. Basic commands such as: ADB Push (upload files to the android system), ADB Pull (download files from Android system), ADB Install (install apk (installation package) file to the android system)
Android Virtual Device (AVD): It is a android OS Emulator to run on desktop and laptop PC under Windows or Mac or Linux.
App2SD: Mechanisms automatically move data in / data / app on the internal memory (which contains the application package apk files) to / data / app on the sdcard, with a similar partition .. ie ext2/ext3.

B
Bluetooth: Short-range radio made in into smartphones, which makes us able to connect headsets, speakerphones or even connect your computer to the smartphone.
Bootloader: internal mode on a cell phone helps in flashing and other activities
Bootloop: circumstances where the boot process stops and the handheld can not get into the homescreen.
BootAnimation.zip: Animation boot files such as PNG sequential file that is located in / system / media /
Build.prop: a hardware configuration file and the Android OS.
Busybox: linux-command set command shell used in the Android system.
Backup: Backup, forms of media can be a file, the copy of the file (mirror) yng image taken from a hard drive or operating system and can also file created by the backup application to restore. Apps Titanium Backup, Nandroid.

C
C / C + +: This is a programming language used for Android application library file.
Chargermon: File to boot menu, which is used to dual boot or to boot into the recovery menu, just like in the linux boot grub.cfg menu and boot.ini in windows.
Charger: File similar to Chargemon, only being used at the time offline charging.
Cupcake: Android Platform version 1.5
CWM Recovery (Clockwork Mod): The application was originally made by Koush, to set the ROM on Android phone. CWW's many uses one of them to back up and restore application, delete (wipe) data in the system and in the cache (Dalvik). Usually necessary to install (flashing) new ROM, run or shut Voodoo Lagfix kernel etc..

D
DLNA: Abbreviation of Dynamic Living Network Alliance, a method to stream photos and videos wirelessly from our smart phones to TVs.
DDMS (Dalvik Debug Monitor Server): An application for nge-debug or trace the running applications on the Android OS, and can also be used as a file manager and screencapture / screenshot displays on Android.
Dalvik VM: Part of the Android architecture, a virtual machine that serves as an Android application runtime between JAVA programming and Library C / C + +.
Data2SD: Mechanisms automatically move all of the data in / data / internal memory to / data / on the SD Card.
Donut: Android Platform version 1.6

E
Eclair: Android Platform version 2.1
Eclipse: is an IDE (Integrated development environment) for Java-Android programming.

F
Flashing: Flashing is generally the replacement firmware version, can downgrade depending on the availability of firmware upgrade ato itself.
Firmware: Firmware itself can be said to be a version of the operating system. Flashing only made to advance the user.
Framework-res: The file used for the theme in the Android system.
Froyo: Android Platform version 2.2
Fastboot: similar to bootloader mode, where we can flash the low-level components to phone us.
FC (force close): the state of an application when the abrupt death / error.

G
Gingerbread: Android Platform version 2.3
Gmail: Google's email service.
Google: The owner of Android.
Google+: Social Networking from google.

H
Honeycomb: Android Platform version 3.0
Hack (Hacking): Modifying sitem Android to add customization, features, or bypass the restrictions created by the operator or OEM (see root).

I
Ice Cream Sandwich: Android Platform version 4
A
Java: The programming language used in Android Application
JIT (just in time): This is a compiler Dalvik on Android, which serves suppress memory size, pressed for time and get quality seifisien possible.

K
Kernel: Kernel function is as a bridge between the Operating System (OS) and hardware. In other words, the kernel serves as a liaison between the software with the hardware. In the context of the Android cell phone, the kernel also store information for hardware drivers. By karenaya kernel can be replaced with the flashing process to improve the performance of Android hardware, such as overclocking, maximizing the ability of the sound, graphics and others.

L
Link2SD: Mechanisms manually move data in / data / app on the internal memory to the ext2 partition on the SD card / data / app.
LBS (Location Based System): This is a location-based systems, such as foursquare and facebook places application on HP Android.

O
Overclock: create a device to run at higher speeds than the provisions of that device makers. The principle is to create higher performance. But this treatment is risk causing a decreased stability of the system until the destruction of the dioveclock computer peripherals. Overclock is usually practiced by the users PC to "force" a computer peripheral work beyond the capacity of the manufacturer specified standards with the ultimate goal to improve the performance of computer work. PC devices that are tantamount to forced overclock beyond its original capabilities. However, overclocked PC, in addition to making the system becomes unstable, it can create damage to the hardware, especially the Mainboard, RAM, and processor.
Thankfully now many are made with hardware fabrication has been reliable for the purposes of overclocking, so if the insight understanding and experience of overclock, overclock it to damage during diminimaliasi.

R
Reset (hard, soft): The process of rebooting the phone. Soft reset is shut off or turn on the phone, or by disconnecting the battery. Medium hard reset also be interpreted as a factory reset, and erase all the data on our handhelds.
Revolution: Handheld Adroid with 4.3-inch display from LG. Another version of the LG Optimus 2X are bundled with Verizon.
ROM: Literally means "Read Only Memory." In Android, this is what we run now while using handheld.
Recovery Mode: is a process that can be done in Android before entering the OS. This process is similar to the BIOS on the computer where we can change the hardware configuration of Android. Through the Recovery mode we can do flashing ROM (replacing OS), data formats, systems and factory reset. Different location for the Recovery partition with the OS and if the OS is likely to be replaced Recovery Recovery will have impact. Flashing Stock ROM will usually return to Stock Recovery Recovery mode too. However, Custom ROMs may not change the Recovery mode, tergantun Custom ROM is selected. An example is the custom Recovery CWM (Clockwork Mod) Recovery
Revue: Google TV set-top box from Logitech, which consists of a full-sized keyboard, and has wireless capabilities. One of the first Google TV gadget.
Root: root is the process to change the privilage of being a normal user superuser / in other words, like being a Administaror the windows os. Rooting is actually in use in terms of Linux, which aims to get the right full in the OS, so that later we can do whatever we want after getting this right (in the case of software).
Root (SD card): Base folder (or top level) from an SD card. Often thought of as / sdcard in a file structure.

S
Superuser: A file that is used to log in as su (superuser), administrator in android system.
SD card (or microSD card): a small card made of plastic to increase the memory capacity on our handheld, used by applications to store data, we are also able to store songs, photos, etc.. there.
Sideload: An action to install the applications that come from outside the Android Market.
Sideload Wonder Machine: open-source program that allows us to install applications via computer, through the restrictions made by the operator (only in a bundled handheld operator in the U.S.)
Y
YouTube: web-based streaming video from Google. Accessible from Android handhelds.
Labels: Android
Home » Posts filed under Android

Coding layouts without using XML layout

Coding layouts without using XML layout. Simply on this short tutorial I will provide sample code for creating a simple layout that displays text and Imaga without using layout.xml on Android. [java coding of only]. Immediately, this short code :
public class Layout_01 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//make object textview
TextView label = new TextView(this);
//set text, gravity, and size
label.setText("Nama saya dede pradana");
label.setGravity(Gravity.CENTER);
label.setTextSize(20);
//make object imageview
ImageView imageView = new ImageView(this);
//specify the image, from the folder res / drawable [my photos]
imageView.setImageResource(R.drawable.dede);
//specify the parameters of imageView, width : wrap_content, height : wrap_content
imageView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
//fit_xy only image size to get the Fix size
imageView.setScaleType(ScaleType.FIT_XY);
imageView.setAdjustViewBounds(true);
//and create a layout that will be the root layout / viewgroups containing the view2
LinearLayout layout = new LinearLayout(this);
//set layout root ini dengan width & height match_parent
layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT));
//set orientasi vertical
layout.setOrientation(LinearLayout.VERTICAL);
//the last, add a second object view that we created earlier
layout.addView(label);
layout.addView(imageView);
//set content activity.
setContentView(layout);
}
}
Labels: Android
Home » Posts filed under Android

Showing phone contact on listview

Showing phone contact on listview. Listview serves to accommodate the names of contact (phone book). Preview the end result of this exercise looks like Picture 1.

contactTOlistview

The following steps:

1. Create new project

Project Name : contactList
Package Name : com.concact.list
Activity Name : ContactListActivity
Target Device : Andorid 2.3

2. Add widgets ListView on activity_main.xml
activity_main.xml
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <ListView android:id="@+id/list" android:layout_width="match_parent" android:layout_height="wrap_content" > </ListView></LinearLayout>
3. The core of is contactListActivity.java
ContactListActivity
import android.app.Activity;
import android.content.ContentResolver;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.ContactsContract;
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 ContactListActivity extends Activity {
ListAdapter adapter;
String[] item, number;
ListView listView;
Cursor mCursor;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
listView = (ListView) findViewById(R.id.list);
}

@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
readContacts();
}

public void readContacts() {
ContentResolver cr = getContentResolver();
Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null,
null, null, null);

if (cur.getCount() > 0) {
int i = 0;
int j = 0;
item = new String[cur.getCount()];
number = new String[cur.getCount()];
while (cur.moveToNext()) {
String id = cur.getString(cur
.getColumnIndex(ContactsContract.Contacts._ID));
String name = cur
.getString(cur
.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
if (Integer
.parseInt(cur.getString(cur
.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
System.out.println("name : " + name + ", ID : " + id);
item[i++] = name;
// get the phone number
Cursor pCur = cr.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
null,
ContactsContract.CommonDataKinds.Phone.CONTACT_ID
+ " = ?", new String[] { id }, null);

while (pCur.moveToNext()) {
String phone = pCur
.getString(pCur
.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
System.out.println("phone" + phone);
number[j++] = phone;
}
pCur.close();

}
}
ArrayAdapter<String> g = new ArrayAdapter<String>(
getApplicationContext(),
android.R.layout.simple_dropdown_item_1line, item);
listView.setAdapter(g);
listView.setOnItemClickListener(new OnItemClickListener() {

@Override
public void onItemClick(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
String v = number[arg2];
Toast.makeText(getApplicationContext(), v,
Toast.LENGTH_SHORT).show();
}
});
}
}

}
4. Add some user permissions in AndroidManifest.xml (line 8)
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.contact.list" android:versionCode="1" android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.READ_CONTACTS"/> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".ContactListActivity" android:label="@string/app_name" android:theme="@android:style/Theme.Light"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
Completed. Congratulations creative with android!
Labels: Android
Home » Posts filed under Android

Showing inbox sms in listview

On this occasion we will learn how to display the inbox sms in listview. This tutorial is useful for friends who want to develop applications based android sms.

inbox sms view

The following steps :

1. Prepare new project
2. Add this widget to activity_main.xml Listvew. (See code below)
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >
<ListView android:id="@+id/listView1" android:layout_width="match_parent" android:layout_height="wrap_content" > </ListView>
</LinearLayout>
3. How to access sms inbox, retrieve and display the listview. Code is contained on MainActivity.java
MainActivity.java
package com.read.inbox.sms;
import android.net.Uri;import android.os.Bundle;import android.app.Activity;import android.database.Cursor;import android.util.Log;import android.view.Menu;import android.view.View;import android.widget.AdapterView;import android.widget.AdapterView.OnItemClickListener;import android.widget.ArrayAdapter;import android.widget.ListView;import android.widget.Toast;
public class MainActivity extends Activity { String[] m = { "" }; ListView lv; String pesanTerpilih;
@Override
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv = (ListView) findViewById(R.id.listView1);
Uri uriSMSURI = Uri.parse("content://sms/inbox"); Cursor cur = getContentResolver().query(uriSMSURI, null, null, null,
null);
m = new String[cur.getCount()]; int g = 0; while (cur.moveToNext()) { m[g++] = cur.getString(11); Log.i("from :", cur.getString(2)); Log.i("isi pesan :", cur.getString(11));
}
ArrayAdapter<String> a = new ArrayAdapter<String>( getApplicationContext(),
android.R.layout.simple_dropdown_item_1line, m); lv.setAdapter(a); lv.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) { // TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), m[arg2],
Toast.LENGTH_SHORT).show(); pesanTerpilih = m[arg2]; } });
}
@Override
public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; }
}
4. Add user-permission in AndroidManifest.xml below
<uses-permission android:name="android.permission.READ_SMS"/> <uses-permission android:name="android.permission.READ_LOGS"/>
Labels: Android
Home » Posts filed under Android

Make ListView Menu on android


ListView is a menu of the most commonly used in making much application android application. List view is a set list of data displayed and can scroll vertically. The whole point of making the ListView is that we will call a list of lists that we will be disposed to an array, then fed into the adapter of the widget listVew.

Here are the steps.

1. Create new project

2. Interface Design

We can design the interface as beautiful as possible, but in this discussion we will only show a seasoned beauty listview without the other.

in the project explorer in eclipse select res -> layout -> main.xml
add script listview.
<linearlayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">
<listview android:divider="#333333" android:dividerheight="0.2dip" android:id="@+id/list" android:layout_height="wrap_content" android:layout_weight="1" android:layout_width="fill_parent"></listview>
</linearlayout>
in the script that we see we added a listview with name ID "list" that will be submitted to R, we adjust the height and width to cover parentnya (linear layout).

3. Call the main.java.
after designing the interface, we will call xml for show.
src -> main.java
The first step we must defined array to be inserted into the imageView.
protected String[] phone = new String[] {
      "Samsung",
      "Nokia",
      "Sony Ericson",
      "HTC",
      "Motorola"
      };
Array "phone" will be used as a navigation menu on the list.
Call the ImageView widget based on id's in the list by last main.xml ID "list".
ListView mainList = (ListView) findViewById(R.id.list);
set imageView adapter with list di array "phone".
mainList.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, phone));
Run.

listview android

Adding Event klik
Here we will make the event type one item from the list is clicked, it will display a toast message. The step is to add a few lines of script.
mainList.setOnItemClickListener(new OnItemClickListener() {
 @Override
 public void onItemClick(AdapterView parent, View view, int position,
   long id) {
  // TODO Auto-generated method stub
  Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
            Toast.LENGTH_SHORT).show();
 }
});
Labels: Android
Home » Posts filed under Android

Root function on android phone


Android root function is to give the user full rights to the Android to be able to get into the Android system. By doing Root, users can add, subtract or modify files or data that is located on the Android system when in the default state (not root) files can not be accessed. If the analogy Windows computer operating system, Android root function is to give administrator privileges to the user.

By doing root Android will not necessarily increase the performance or capabilities of Android phones. Rooting Android just like, Äúmembuka doors, Äù for you to develop this operating system.

Why Android operating system developer does not provide root access since the beginning?

Root Android
It aims to protect the Android operating system as a whole. If users accidentally or intentionally alter or eliminate one or more file system, it can cause the performance of mobile phone or tablet becomes unstable, and the most severely damaged brick or phone does not turn, therefore Android developers limit access to the file system.

Advantages And Disadvantages Root Android

Disadvantages:

Can eliminate phone warranty

Why Android rooting may void the warranty? Root it is like, Äúsegel warranty, Äù. Analogues such as this, when you buy a factory-built computers (not the computer assembly), it will usually come with the warranty seal or sticker. This seal will usually be broken when we open the computer casing.

If we want to improve computer skills, for example by changing the computer's graphics card with a better one, we should open automatically and automatically casingkomputer will damage the warranty seal. Is the casing will cause the computer to disassemble become damaged? Of course not.

However, if there is damage whether to scorch the warranty? It is clear, because the service center to see that the warranty seal has been broken and gave the verdict that the computer is damaged due to be demolished, but the damage caused by other factors.

Similar to root Android. If HP is damaged, for example, the speaker does not ring and you bring to the Service Center with ter-root condition, then there is a possibility of a warranty claim will be rejected and said that phones damaged by the root, when in fact it is not.

But actually you do not need to worry too much, in contrast to the warranty seal, the process can be reversed or phone root restored to their original condition. This process is called Unroot. If the unroot process is done, it will automatically back guarantee will apply.

Note: If you want to bring the phone to the service center, in addition to do unroot, you should also do factory reset (removing all data and applications are installed)

Disadvantages:

Security issues

Actually, this one is still being debated. It is said that by doing Root, then applications such as virus or Trojan malware can easily get into the file system and did commit theft or destruction of user data.

However, even though HP is not actually in the root, where the virus is, Äúberniat evil, Äù, then without any root, virus applications can easily access the file system.

Advantages:

1. Can Installing Applications that Require Root Access

Here are some examples of applications that require root access to the most widely installed:

App2SD: With this application allows users to move all applications to the SD Card. In general, Android users do root to install application.
Titanium Backup: This application is useful for backing up all the apps installed. Not only that, this application can also back up data applications such settings (setting-an), etc..
Root Explorer: A file manager app for Android with the main features that can access the entire file system inside your Android phone. Another feature is the application is able to read ZIP files, APK, XML and many more.
SetCPU is a tool for changing the CPU settings (capable of overclock and underclock)
GL to SD: Application serves to move data game hd from sd card to external sd card.
Auto Killer Memorry: function to turn off the application that runs automatically when the RAM is on the threshold function to speed up loading your phone and also can save battery.

2. Can install custom ROMs

What is a custom ROM? Custom ROM is a custom Android operating system (alternative) or not made by mobile phone vendors. Custom ROM developed by a community of fans of the Android operating system. Note: by doing root does not mean you can directly install custom ROMs, but most Android phones require root access if you want to install a custom ROM.

Can make arrangements to maximize the performance of the phone.

One of the settings that can be done is to overclock the processor. With overclocking, the processor can, Äúdipaksa, Äù work faster than the speed of luggage that can improve the overall performance of the phone. However, overclocking can shorten processor, make the battery more extravagant and fast heat up and there is also likely to cause the system to become unstable.

Note: In general, by just doing root alone, you will not automatically be able to overclock the processor, but the kernel of the phone / tablet Android supports it. But by doing root, you can do underclock processor or decrease the speed of the processor in order to consume more battery irit.Dapat Uninstall Default Application Factory

By doing root, we can uninstall applications the factory default useless and only meets the phone memory. However, if you intend to do this better be careful, because if one can uninstall cause the performance of the phone to be imperfect. Should not be done when it is not really necessary.
Labels: Android
Home » Posts filed under Android

Android exchange data with a computer without a cable.



Android OS has many features which facilitate our work, a lot of things that we do can be done diandroid like Perform Data transfer or exchange data with android gadget without using a data cable. Perhaps many of us who have been or are doing it this way, but it would not hurt us to explain again how easy and simple way to do it.

Perhaps the readers there must be a wonder and ask, what is the point or what benefits are we doing this? anyway we can use the data cable plug into Notebook stay or even via sd memory card opened through a notebook or even via bluetooth? Let us explain with a simple:

  1. If at any time we forgot to bring the data cable.
  2. If at any time we do not have any android Sd card, or Notebook we do not have the feature to open the sd card or do not take the function card reader.
  3. We do not have a notebook bloetooth.
  4. If at any time we want to control or open all the contents of our android but without using cables.

Maybe a lot of other things that could be a reason we are to learn these tips, but before that note the following:

  • This method can only be done with a path WIFI
  • Make sure the Android and Notebook we do the same with the Gaza WIFI.

Advantages:

  • Able to execute all of the data in our android gadgets, such as opening the message, accept and even move and retrieve data from android and Notebook.
  • Done without going through the data cable.
  • Simple and easy

Disadvantages:

  • Must go through the same WIFI
  • Data execution speed depends on the signal strength / stability of the WIFI signal there.
Here's how :
  1. Ensure our Android and Notebook Set in a WIFI network
  2. Turn on the devices we are WIFI
  3. Install applications AirDroid, check in PlayStore
  4. Once the application is installed on your android then please open it and click on Start and then your application will appear AirDroid
  5. Follow Step 1 as the sample applied
  6. Open your NoteBook, open a web browser and type in www.web.AirDroid.com
  7. Enter the Passcode above into sites that we open earlier
  8. Klik login, and will appear as below:
Android exchange data



Labels: Android
Home » Posts filed under Android

How To Install Eclipse, ADT, and the SDK for Android Programming

How To Install Eclipse, ADT, and the SDK for Android Programming. To start android programming, the first step is to install the necessary tools.

Follow the steps below correctly.
Previously, you had to have 3 pieces of the component below. You can download it with the links below.

1. Eclipse
2. ADT Plugin, version 20.0
3. SDK

Install Eclipse, ADT, and the SDK

Install Eclipse in a way extract the files into a folder.

Install ADT plugins in eclipse
To connect the Eclipse ADT plugin and SDK needed. You must be connected to the internet.

1. Launch Eclipse, then select help> install new software.
2. Click the add on the right above.
3. Add repository dialog box, enter the Name: ADT and Location: https://dl-ssl.google.com/android/eclipse/.
ADT or select the file that you have downloaded earlier, click Archive and locate the ADT file that you have downloaded it.
4. View Available box software. Check the Developer Tools item and then select Next.
5. On the next screen, you will see a list of tools that will be downloaded more detail. Select Next.
6. You will see the license agreement. Select Accept, and then click Finish.
7. After the installation is complete, restart eclipse.

Download and install SDK package

At this stage, you must be connected to the Internet to update the repository. Here's how:
1. In Eclipse, select Window> Android SDK and AVD manager
2. Wait until the Loading completed.
3. Immediately check the Android 2.3.3/2.2 (Since it is commonly used)
4. Then click Install package.
5. Wait a few moments until the download is complete.
6. If the download fails, you can update it online, but you need to download the required packages before. Then put the packages downloaded earlier in the temp folder in the SDK directory, then restart the SDK.

Or by:

Extract SDK files that you have downloaded earlier.
Go to Window> Preferences> Android, click Browse to locate the SDK folder that you have downloaded.
Click Apply
Labels: Android
Home » Posts filed under Android

Android Learning

Along with the development and rapid advances in technology, many people are vying to create a new operating system. They want to create a new innovation that is more sophisticated than previous innovations. One example of an operating system that is now said to be operating sistem no. 1 is Android.

More than 25 million people worldwide are using this operating system. For those readers who do not know about the Android operating system, I will help to explain it. Android is an operating system for mobile phones based on Linux. Android provides an open platform to developers for creating their own applications for use by a variety of mobile devices. Initially, Google Inc.. bought Android Inc.., newcomers who make software for mobile phones.

Android Learning
Then to develop Android, formed the Open Handset Alliance, a consortium of 34 companies for hardware, software, and telecommunications, including Google, HTC, Intel, Motorola, Qualcomm, T-Mobile, and Nvidia. At the inaugural release of Android, 5 November 2007, with the Open Handset Alliance Android states support the development of open standards on mobile devices. On the other hand, Google released the Android code under the Apache license, a license software and open standard mobile device.

In this world there are two types of distributors operating system Android. The first fully supported by Google or Google Mail Services (GMS) and the second is completely free distribution without direct support Google's otherwise known as the Open Handset Distribution (OHD).

Application Programming Mobile Smartphone and Android-Based Tablet PC is designed for people who are interested in becoming a developer or application developer based smatphone / tablet pc. The book comes with complete source code and a discussion about the various apps Android apps that are both local and client-server based applications like the music player application, Islam Daily Prayer Applications, Mobile-Learning applications and various other applications.

General discussion in Android Learning are:

- Eclipse Instalation (Android Simulator for Windows)
- Android Programming 1 (Hello World)
- Android Programming 2 (Linear Layout)
- Programming Android 3 (Relative Layout)
- Android Programming 4 (Table Layout)
- Android Programming 5 (Showing Images and Changing Icon)
- Android Programming 6 (Know the Edit Text Widget)
- Android Programming 7 (Using Check Box)
- Android Programming 8 (Using Radio Button)
- Android Programming 9 (Using Scroll View)
- Android Programming 10 (Exit Button Making)
- Android Programming 11 (Creating Alert Dialog)

Labels: Android
Home

Sponsor

 
Copyright © 2013. Technoledge - All Rights Reserved
Proudly powered by Blogger