Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A child browser plugin with url change callback. Meant to use with social networks.
ActionScript Java JavaScript
Branch: master

use json for object passing

latest commit a60be86c81
Ryan Sweny authored
Failed to load latest commit information.
bin added logging and FilePicker
blackberry.polarmobile.childbrowser use json for object passing
childbrowser
README

README

//Example logging to EventLog and System.out
console.log = function(msg) { motek.childbrowser.log(msg); };
console.log("Hello!");

//Exmaple of opening a browser and listening for location changes:
function getFacebookToken(sourceScreenCode) {
	try {
		//live
		var appID = "123456789";
		var redirect = "http://www.facebook.com/connect/login_success.html";

		var path = 'https://www.facebook.com/dialog/oauth?display=wap&scope=publish_stream,offline_access,email&';
		var queryParams = ['client_id=' + appID, 'redirect_uri=' + redirect + "?n=" + sourceScreenCode, 'response_type=token'];
		var query = queryParams.join('&');
		var url = path + query;
		motek.childbrowser.open(url, urlCallback);
	}
	catch(e) {
		alert(e);
	}
}

function urlCallback(newUrl)
{
	console.log("urlCallback: " + newUrl);
	//extract token from url
}

//Example FilePicker
webworks.ui.filePicker.open(callBackFnFilePassedIn);

There is also a similiar child browser and File Upload plugin for Playbook in this subfolder:
blackberry.polarmobile.childbrowser


Something went wrong with that request. Please try again.