Sha256: c6c1827816207e23f33b9fb4336794b4bccd1a67a0943df7e22e06bf6021c074

Contents?: true

Size: 1.34 KB

Versions: 6

Compression:

Stored size: 1.34 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 android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class TelUriHandler implements UriHandler {
	
	private Context ctx;
	
	public TelUriHandler(Context c) {
		ctx = c;
	}
	
	public String scheme() {
		return "tel";
	}

	public void handle(Uri uri) {
		Intent intent = new Intent(Intent.ACTION_DIAL);
		intent.setData(uri);
		
		ctx.startActivity(Intent.createChooser(intent, "Dial..."));
	}

}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rhodes-1.5.5 platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java
rhodes-1.5.4 platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java
rhodes-1.5.3 platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java
rhodes-1.5.2 platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java
rhodes-1.5.1 platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java
rhodes-1.5.0 platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java