Intent addContactIntent = new Intent();
addContactIntent.setAction(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT);
addContactIntent.addCategory(Intent.CATEGORY_DEFAULT);
addContactIntent.setData(Uri.fromParts("tel", officeNumber, null));
addContactIntent.putExtra(ContactsContract.Intents.Insert.NAME, employeeNameText.getText());
addContactIntent.putExtra(ContactsContract.Intents.Insert.EMAIL, emailAddress);
this.startActivity(addContactIntent);
Another slight modification from the original work was to use a different icon for the launcher. There are three screen densities for the Android: Low, Medium and High. Low density (ldpi) uses a 36x36 px PNG file, Medium density (mdpi) uses 48x48 and High density (hdpi) uses 72x72. These three densities each have a folder in the project under the res folder. Simply dropping a png file named icon.png into each of these three folders will change the icon of your application. There is a table at developer.android.com as a reference.
No comments:
Post a Comment