Hello all I am developing an application and as part of it I would
like to show a tabactivity and use the contact activity to let the
user see,modify,or call a specified contact. my code is this:
package com.WaveCally;
import android.app.AlertDialog;
import android.app.TabActivity;
import android.app.AlertDialog.Builder;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
public class WaveCally extends TabActivity {
private TabHost mTabHost;
private int PICK_CONTACT;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mTabHost = getTabHost();
try{
mTabHost.addTab(mTabHost.newTabSpec("Contacts").setIndicator
("TAB 1").setContent(R.id.ParentView));
mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator
("Contacts").setContent(new Intent(Intent.ACTION_PICK,
People.CONTENT_URI)));
mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator
("TAB 3").setContent(R.id.textview3));
}catch(java.lang.SecurityException ex){;
}
mTabHost.setCurrentTab(0);
}
}
but when I run this programm I get a securityException even though I
have all the needed permision on my manifest.
I tried to run only the intent for calling the contact and worked so I
think the problem occurs when triyng to show the contact activity as a
tab content. So the questions are :
how to make it work and call the contact activity and set it as the
content of a tab?
And why I can't set the contents with the above mentioned code?
thanks in advanced maxsap
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en