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; /* ww w . ja v a2s .c o m*/ import ee.ioc.phon.android.arvutaja.R; import android.app.SearchManager; import android.content.Intent; import android.net.Uri; public class DefaultCommand implements Command { private final String mCommand; public DefaultCommand(String command) { mCommand = command; } public int getMessage() { return R.string.msgActionWebSearch; } @Override public Intent getIntent() throws CommandParseException { Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); intent.putExtra(SearchManager.QUERY, mCommand); return intent; } @Override public Uri getSuggestion() { return Uri.parse("https://play.google.com/store"); } @Override public String getCommand() { return mCommand; } @Override public Object getOut() { return ""; } protected static Intent getActionView(String urlPrefix, String urlSuffix) { return new Intent(Intent.ACTION_VIEW, Uri.parse(urlPrefix + Uri.encode(urlSuffix))); } }