Back to project page Arvutaja.
The source code is released under:
Apache License
If you think the Android project Arvutaja listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ee.ioc.phon.android.arvutaja.command; /*from w w w. java 2 s .com*/ import ee.ioc.phon.android.arvutaja.R; import android.content.Intent; import android.net.Uri; public class Dial extends DefaultCommand { public static final String PREFIX = "call "; public Dial(String command) { super(command); } public int getMessage() { return R.string.msgActionDial; } @Override public Intent getIntent() throws CommandParseException { String number = getCommand().replaceFirst(PREFIX, ""); Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + Uri.encode(number))); return intent; } public static boolean isCommand(String command) { return command.startsWith(PREFIX); } }