waleedAhmad1 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Intent.ACTION_CALL not supported in GDK. #209

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following code throws an ActivityNotFoundException.

String uri = "tel:+44....." ;
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(uri));
startActivity(intent);

Given that I can say "OK Glass, make a call to The SS Enterprise" to initiate a 
call via my tethered phone, I would have expected the above code to do the same.

FYI: Initially reported here:  http://stackoverflow.com/q/19038703/156477

Original issue reported on code.google.com by kev.su...@gmail.com on 27 Sep 2013 at 3:44

GoogleCodeExporter commented 9 years ago

Original comment by ala...@google.com on 27 Sep 2013 at 3:48

GoogleCodeExporter commented 9 years ago
It can be done this way for now: 

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

Original comment by fantes.m...@gmail.com on 16 Feb 2014 at 1:00

GoogleCodeExporter commented 9 years ago
Is there any current way to determine if the device tethered to is a phone or 
tablet?

I accidentally launched this intent when connected to a tablet without 
telephony and I had to restart my Glass to get out of the loop.

Original comment by IamTheFij on 20 Mar 2014 at 4:17

GoogleCodeExporter commented 9 years ago
Hello guys, is there any progress on this issue or a suggested workaround?

IMO there are 2 things that couls be done in GDK to improve the phone calling 
ability in GDK:

- Add a "phone" attribute to the trigger.constraint node in the trigger XML 
file (alongside "camera", "network" and "microphone") to allow full disabling 
the voice command based on the missing calling capabilities.
- Add API to check calling capabilities in runtime. This way, developer can 
decide to check for the phone capabilities and display instructions in case 
their are not available ("Call +420123456789 or pair your Google Glass with 
your Android phone using MyGlass app").

Original comment by joshis.c...@gmail.com on 26 Mar 2014 at 7:27