Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to initiate Skype call through your android app

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 558
    Comment on it

    To initiate a skype call through your android app please add the code mentioned below :-

    • The third line
    Uri skypeUri = Uri.parse("skype:" + number + "?call");

     in the code below helps you to make call but  if you need video call then implement

    Uri skypeUri = Uri.parse("skype:" + number + "?call&video=true");
    • This code will open your Skype through intent.
    private void initiateSkype(){
    String number = "+919897910168";
    Uri skypeUri = Uri.parse("skype:" + number + "?call");
    Intent myIntent = new Intent(Intent.ACTION_VIEW, skypeUri);
    myIntent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main"));
    myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    boolean skypeFound = isAppInstalled(applicationContext, "com.skype.raider");
    //IF your device contains Skype then only the skype will be initiated 
    if (skypeFound) {
    applicationContext.startActivity(myIntent);}
    }
    

     

    • isAppInstalled method written below returns the boolean value true if the device contains the skype app else it will return false
       

     

    
    public  boolean isAppInstalled(Context context, String packageName) {
        try {
            context.getPackageManager().getApplicationInfo(packageName, 0);
            return true;
        } catch (PackageManager.NameNotFoundException e) {
            return false;
        }
    }

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: