AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.GingerbreadUtil Class Reference

Static Public Member Functions

static CookieHandler newCookieManager ()
 
static boolean clearCookies (CookieHandler cookieHandler)
 
static NfcAdapter newNfcAdapter (Context context)
 
static void enableNFCWriteMode (Activity activity, NfcAdapter nfcAdapter, String textToWrite)
 
static void disableNFCAdapter (Activity activity, NfcAdapter nfcAdapter)
 
static NdefRecord createTextRecord (String payload, boolean encodeInUtf8)
 
static void resolveNFCIntent (Intent intent, NearField nfc)
 
static boolean writeNFCTag (NdefMessage message, Tag tag)
 

Detailed Description

Helper methods for calling methods added in Gingerbread (2.3, API level 9).

Author
lizlo.nosp@m.oney.nosp@m.@goog.nosp@m.le.c.nosp@m.om (Liz Looney)

Definition at line 36 of file GingerbreadUtil.java.

Member Function Documentation

◆ clearCookies()

static boolean com.google.appinventor.components.runtime.util.GingerbreadUtil.clearCookies ( CookieHandler  cookieHandler)
static

Clears the cookies in the given cookie handler. Cookies can only be cleared if the cookieHandler is a CookieManager with a non-null CookieStore.

Parameters
cookieHandlerthe cookie handler where cookies should be cleared
Returns
true if cookies were cleared; false otherwise

Definition at line 54 of file GingerbreadUtil.java.

◆ createTextRecord()

static NdefRecord com.google.appinventor.components.runtime.util.GingerbreadUtil.createTextRecord ( String  payload,
boolean  encodeInUtf8 
)
static

Definition at line 83 of file GingerbreadUtil.java.

◆ disableNFCAdapter()

static void com.google.appinventor.components.runtime.util.GingerbreadUtil.disableNFCAdapter ( Activity  activity,
NfcAdapter  nfcAdapter 
)
static

Definition at line 79 of file GingerbreadUtil.java.

◆ enableNFCWriteMode()

static void com.google.appinventor.components.runtime.util.GingerbreadUtil.enableNFCWriteMode ( Activity  activity,
NfcAdapter  nfcAdapter,
String  textToWrite 
)
static

Definition at line 73 of file GingerbreadUtil.java.

◆ newCookieManager()

static CookieHandler com.google.appinventor.components.runtime.util.GingerbreadUtil.newCookieManager ( )
static

Creates a new CookieManager instance.

Definition at line 43 of file GingerbreadUtil.java.

◆ newNfcAdapter()

static NfcAdapter com.google.appinventor.components.runtime.util.GingerbreadUtil.newNfcAdapter ( Context  context)
static

Creates a new NfcAdapter instance.

Definition at line 69 of file GingerbreadUtil.java.

◆ resolveNFCIntent()

static void com.google.appinventor.components.runtime.util.GingerbreadUtil.resolveNFCIntent ( Intent  intent,
NearField  nfc 
)
static

Definition at line 98 of file GingerbreadUtil.java.

◆ writeNFCTag()

static boolean com.google.appinventor.components.runtime.util.GingerbreadUtil.writeNFCTag ( NdefMessage  message,
Tag  tag 
)
static

Definition at line 150 of file GingerbreadUtil.java.


The documentation for this class was generated from the following file: