本文整理匯總了Java中android.webkit.GeolocationPermissions.Callback類的典型用法代碼示例。如果您正苦於以下問題:Java Callback類的具體用法?Java Callback怎麽用?Java Callback使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Callback類屬於android.webkit.GeolocationPermissions包,在下文中一共展示了Callback類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onGeolocationPermissionsShowPrompt
import android.webkit.GeolocationPermissions.Callback; //導入依賴的package包/類
@Override
/**
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
*
* This also checks for the Geolocation Plugin and requests permission from the application to use Geolocation.
*
* @param origin
* @param callback
*/
public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
callback.invoke(origin, true, false);
//Get the plugin, it should be loaded
CordovaPlugin geolocation = parentEngine.pluginManager.getPlugin("Geolocation");
if(geolocation != null && !geolocation.hasPermisssion())
{
geolocation.requestPermissions(0);
}
}
示例2: onGeolocationPermissionsShowPrompt
import android.webkit.GeolocationPermissions.Callback; //導入依賴的package包/類
public final void onGeolocationPermissionsShowPrompt(String paramString, GeolocationPermissions.Callback paramCallback)
{
if (paramCallback != null)
{
zzp.zzbI();
if (!zziq.zza(this.zzpX.getContext().getPackageManager(), this.zzpX.getContext().getPackageName(), "android.permission.ACCESS_FINE_LOCATION"))
{
zzp.zzbI();
if (!zziq.zza(this.zzpX.getContext().getPackageManager(), this.zzpX.getContext().getPackageName(), "android.permission.ACCESS_COARSE_LOCATION")) {
break label92;
}
}
}
label92:
for (boolean bool = true;; bool = false)
{
paramCallback.invoke(paramString, bool, true);
return;
}
}
示例3: onGeolocationPermissionsShowPrompt
import android.webkit.GeolocationPermissions.Callback; //導入依賴的package包/類
@Override
public void onGeolocationPermissionsShowPrompt(
String origin,
Callback callback)
{
super.onGeolocationPermissionsShowPrompt(origin, callback);
callback.invoke(origin, true, false);
}
示例4: onGeolocationPermissionsShowPrompt
import android.webkit.GeolocationPermissions.Callback; //導入依賴的package包/類
@Override
/**
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
*
* @param origin
* @param callback
*/
public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
callback.invoke(origin, true, false);
}