lse123 0 Junior Poster in Training

Android intents Qs: Phonebook app, on view particular contact...facebook call works, skype is like not press, email shows not supported, and phone call gives error 2.3.3/2.2 ... well?
all from menu button menu... can you debug...

    private void call(int i) {
        // TODO Auto-generated method stub
          switch (i) {
       case 0: 
                try {
                    Intent callIntent = new Intent(Intent.ACTION_CALL);
                    callIntent.setData(Uri.parse("tel:" + phoneTextView.getText()));  // f:/  no work get error
                    startActivity(callIntent);
                } catch (ActivityNotFoundException activityException) {
                    Log.e("dialing-example", "Call failed", activityException);
                }
                break;
       case 1: 
                try {       
                      Intent sky = new Intent(Intent.ACTION_VIEW);
                      sky.setData(Uri.parse("skype:" + skypeTextView.getText()+"?chat"));
                      startActivity(sky);
                } catch (ActivityNotFoundException activityException) {
                    Log.e("skype-example", "skype Call failed", activityException);
                }
                break;
       case 2:
                try {       
                    Intent emailIntent = new Intent(Intent.ACTION_VIEW);
                    Uri data = Uri.parse("mailto:" + emailTextView.getText());//?to=
                    emailIntent.setData(data);
                    startActivity(emailIntent);
                } catch (ActivityNotFoundException activityException) {
                    Log.e("email-example", "email Call failed", activityException);
                }
                break;
       default: 
                try {
                    Intent facebookIntent = new Intent(Intent.ACTION_VIEW);
                    facebookIntent.setData(Uri.parse("http://www.facebook.com/" + facebookTextView.getText()));
                    startActivity(facebookIntent);
                } catch (ActivityNotFoundException activityException) {
                    Log.e("facebook-example", "facebook Call failed", activityException);
                }


          }

    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.