This shows you the differences between two versions of the page.
|
smd:laboratoare:02 [2021/03/24 23:19] adriana.draghici |
smd:laboratoare:02 [2021/03/25 20:41] (current) adriana.draghici [Task 3 - Make a call (1p)] |
||
|---|---|---|---|
| Line 35: | Line 35: | ||
| <code Java> | <code Java> | ||
| Intent intent = new Intent(Intent.ACTION_VIEW); // We've set the ACTION | Intent intent = new Intent(Intent.ACTION_VIEW); // We've set the ACTION | ||
| - | setData(Uri.parse("https://ocw.cs.pub.ro/smd/lab2"); // We've set DATA | + | intent.setData(Uri.parse("https://ocw.cs.pub.ro/smd/lab2"); // We've set DATA |
| // We check before if an application that can support our intent exists. | // We check before if an application that can support our intent exists. | ||
| Line 203: | Line 203: | ||
| <code> | <code> | ||
| Intent intent = new Intent(Intent.ACTION_DIAL); | Intent intent = new Intent(Intent.ACTION_DIAL); | ||
| - | intent.setData(Uri.parse("tel:"+"enter the phonenumber"); | + | intent.setData(Uri.parse("tel:"+"enter the phonenumber")); |
| startActivity(intent); | startActivity(intent); | ||
| </code> | </code> | ||