maxsap wrote:
> 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.

You can only put your own activities in tabs, not activities from the
system or third party apps.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

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

Reply via email to