Sha256: 51cb00d20ff964d4a6b97cda95780d0a598a408b45a554026f2adff2cf08f219
Contents?: true
Size: 1.54 KB
Versions: 66
Compression:
Stored size: 1.54 KB
Contents
/* ============================================================================ Author : Dmitry Moskalchuk Version : 1.5 Copyright : Copyright (C) 2008 Rhomobile. All rights reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ============================================================================ */ package com.rhomobile.rhodes.uri; import com.rhomobile.rhodes.Logger; import android.content.Context; import android.content.Intent; import android.net.Uri; public class TelUriHandler implements UriHandler { private static final String TAG = "TelUriHandler"; private Context ctx; public TelUriHandler(Context c) { ctx = c; } public boolean handle(String url) { Uri uri = Uri.parse(url); if (!uri.getScheme().equals("tel")) return false; Logger.D(TAG, "This is 'tel' uri, handle it"); Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(uri); ctx.startActivity(Intent.createChooser(intent, "Dial...")); return true; } }
Version data entries
66 entries across 66 versions & 1 rubygems