Search code examples
google-glassgoogle-gdk

action.CALL_DIAL set +1 on phone number


Actualy with the new update, Im getting some troubles with this source code, cos' add a +1 on the phone number. Anyone get the same problem?

Intent localIntent = new Intent();
localIntent.putExtra("com.google.glass.extra.PHONE_NUMBER", callTo);
localIntent.setAction("com.google.glass.action.CALL_DIAL");
sendBroadcast(localIntent);

Solution

  • Yes, that happened to me too. I had to explicitly add the country code and that fixed the issue.

    Intent localIntent = new Intent();
    localIntent.putExtra("com.google.glass.extra.PHONE_NUMBER", "+61282294333");
    localIntent.setAction("com.google.glass.action.CALL_DIAL");
    

    Not sure it works on all countries but I've tried a couple countries and it worked fine.