com.jcdecaux.jcdroid.web
Class NativeAPIWrapper

java.lang.Object
  extended by com.jcdecaux.jcdroid.web.NativeAPIWrapper

public class NativeAPIWrapper
extends java.lang.Object

NativeAPI wrapper for javascript web application.


Constructor Summary
NativeAPIWrapper(android.content.Context context)
          Construct the wrapper to be injected in WebViews (@see WebView.addJavascriptInterface)
 
Method Summary
 java.lang.String getAppEnvironment()
          Returns the actual device's app environment
 java.lang.String getDeviceName()
          Get the device unique name (JCDecaux Identifier)
 java.lang.String getLocale()
          Get the actual locale (IETF BCP 47, "Tags for Identifying Languages")
 int getOrientation()
          Get device orientation
 boolean hasVirtualButtons()
          Deprecated. use isNavigationBarEnabled() Get device information of using virtual Back and Home buttons
 boolean isNavigationBarEnabled()
          Get navigation bar status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeAPIWrapper

public NativeAPIWrapper(android.content.Context context)
Construct the wrapper to be injected in WebViews (@see WebView.addJavascriptInterface)

Parameters:
current - application context
Method Detail

getLocale

public java.lang.String getLocale()
Get the actual locale (IETF BCP 47, "Tags for Identifying Languages")

Returns:
the locale

getDeviceName

public java.lang.String getDeviceName()
Get the device unique name (JCDecaux Identifier)

Returns:
a string identifying the device (unique)

getOrientation

public int getOrientation()
Get device orientation

Returns:
1 for PORTRAIT orientation, 2 for LANDSCAPE orienation

getAppEnvironment

public java.lang.String getAppEnvironment()
Returns the actual device's app environment

Returns:
The app environment name (DEV, PPR, PRD...)

hasVirtualButtons

public boolean hasVirtualButtons()
Deprecated. use isNavigationBarEnabled() Get device information of using virtual Back and Home buttons

Returns:
true if the device has virtual buttons (on screen), false if has physical ones.

isNavigationBarEnabled

public boolean isNavigationBarEnabled()
Get navigation bar status.

Returns:
true if navigation bar is enabled (the user can its buttons)