Android: Simple application explained

I found this tutorial on youtube. There was a small mistake you need to correct when executing this tutorial, when you call intent when overriding onListItemClick you would need to call Intent.ACTION_CALL) and not the one in the tutorial. I think it must have changed from then and now. Since I just downloaded a fresh SDK just yesterday.

First of all you need to set you eclipse pointing to the SDK, if you want the SDK not found error gone. You can do this by going to Window->Preferences->Android and set the SDK location to wherever you have set the andriod SDK download.

Change the files according as shown below in the AndroidManifest.xml

uses-permission id=android.permission.READ_CONTACTS name=android.permission.READ_CONTACTS

uses-permission id=android.permission.CALL_PHONE name=android.permission.CALL_PHONE

Long phoneId = C.getLong(C.getColumnIndex(People.DISPLAY_NAME));
//i.setData(Phones.NUMBER
String uriString = phoneId.toString();
i.setData(Phones.CONTENT_URI.parse(uriString));
startActivity(i);

Not sure on wht else you would need to change. By changing all this I could get my project to run atleast. But still trying to get the names of contacts on the list.
Let me know, if you can get it.

All the best!!!!!!!!!!!!!!!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *