navit  0.5.3-trunk
org.navitproject.navit.Navit Class Reference
Inheritance diagram for org.navitproject.navit.Navit:

Public Member Functions

void onCreate (Bundle savedInstanceState)
 
void onRestart ()
 
void onStart ()
 
void onNewIntent (Intent intent)
 
void onResume ()
 
void onPause ()
 
void onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults)
 
void setActivityResult (int requestCode, NavitActivityResult activityResult)
 
boolean onPrepareOptionsMenu (Menu menu)
 
boolean onOptionsItemSelected (MenuItem item)
 
boolean onSearchRequested ()
 
void onDestroy ()
 
void onStop ()
 
native void navitDestroy ()
 

Static Public Attributes

static boolean sShowSoftKeyboardShowing
 

Protected Member Functions

void onActivityResult (int requestCode, int resultCode, Intent data)
 
void onPrepareDialog (int id, Dialog dialog)
 
Dialog onCreateDialog (int id)
 

Package Functions

void showMenu ()
 
int showNativeKeyboard ()
 
void hideNativeKeyboard ()
 
void fullscreen (int fullscreen)
 
void disableSuspend ()
 

Package Attributes

boolean mIsFullscreen
 

Static Package Attributes

static String sMapFilenamePath
 

Private Member Functions

void createNotificationChannel ()
 
boolean resourceFileNeedsUpdate (String filename)
 
boolean extractRes (String resname, String result)
 
boolean extractAsset (String assetFileName, String output)
 
void showInfos ()
 
void verifyPermissions ()
 
void handleIntent (Intent intent)
 
void windowSetup ()
 
void buildNotification ()
 
void invokeCallbackOnGeo (String geoString, NavitCallbackHandler.MsgType msgType, String name)
 
void parseNavigationURI (String schemeSpecificPart)
 
void start_targetsearch_from_intent (String targetAddress)
 
void runOptionsItem (int id)
 
void setMapLocation ()
 
native void navitMain (String lang, String path, String path2)
 

Private Attributes

NavitDialogs mDialogs
 
PowerManager.WakeLock mWakeLock
 
NavitActivityResult[] mActivityResults
 

Static Private Attributes

static final int MY_PERMISSIONS_REQ_FINE_LOC = 103
 
static final int NavitDownloaderSelectMap_id = 967
 
static final int NavitAddressSearch_id = 70
 
static final int NavitSelectStorage_id = 43
 
static final String NAVIT_PACKAGE_NAME = "org.navitproject.navit"
 
static final String TAG = "Navit"
 

Member Function Documentation

◆ buildNotification()

void org.navitproject.navit.Navit.buildNotification ( )
inlineprivate

◆ createNotificationChannel()

void org.navitproject.navit.Navit.createNotificationChannel ( )
inlineprivate

◆ disableSuspend()

void org.navitproject.navit.Navit.disableSuspend ( )
inlinepackage

◆ extractAsset()

boolean org.navitproject.navit.Navit.extractAsset ( String  assetFileName,
String  output 
)
inlineprivate

Extract an asset from the apk archive (assets) and save it to a local file.

Parameters
outputThe full path to the local file
assetFileNameThe full path of the asset file in the archive
Returns
true if the local file is extracted in output

References org.navitproject.navit.Navit.resourceFileNeedsUpdate(), org.navitproject.navit.NavitAppConfig.sResources, and org.navitproject.navit.Navit.TAG.

◆ extractRes()

boolean org.navitproject.navit.Navit.extractRes ( String  resname,
String  result 
)
inlineprivate

Extract a resource from the apk archive (res/raw) and save it to a local file.

Parameters
resultThe full path to the local file
resnameThe name of the resource file in the archive
Returns
true if the local file is extracted in result

References org.navitproject.navit.Navit.NAVIT_PACKAGE_NAME, org.navitproject.navit.Navit.resourceFileNeedsUpdate(), org.navitproject.navit.NavitAppConfig.sResources, and org.navitproject.navit.Navit.TAG.

◆ fullscreen()

void org.navitproject.navit.Navit.fullscreen ( int  fullscreen)
inlinepackage

References fullscreen().

◆ handleIntent()

void org.navitproject.navit.Navit.handleIntent ( Intent  intent)
inlineprivate

◆ hideNativeKeyboard()

void org.navitproject.navit.Navit.hideNativeKeyboard ( )
inlinepackage

Hides the native keyboard or other input method.

◆ invokeCallbackOnGeo()

void org.navitproject.navit.Navit.invokeCallbackOnGeo ( String  geoString,
NavitCallbackHandler.MsgType  msgType,
String  name 
)
inlineprivate

Invoke CallbackHandler on a geographical position.

Parameters
geoStringA string containing the target geographical position with a format like "48.25676,16.643"
msgTypeThe type of message to send
nameThe name/label to associate to the geographical position

References lat, name, and org.navitproject.navit.NavitCallbackHandler.sCallbackHandler.

◆ navitDestroy()

native void org.navitproject.navit.Navit.navitDestroy ( )

◆ navitMain()

native void org.navitproject.navit.Navit.navitMain ( String  lang,
String  path,
String  path2 
)
private

◆ onActivityResult()

◆ onCreate()

void org.navitproject.navit.Navit.onCreate ( Bundle  savedInstanceState)
inline

◆ onCreateDialog()

Dialog org.navitproject.navit.Navit.onCreateDialog ( int  id)
inlineprotected

◆ onDestroy()

void org.navitproject.navit.Navit.onDestroy ( )
inline

◆ onNewIntent()

void org.navitproject.navit.Navit.onNewIntent ( Intent  intent)
inline

◆ onOptionsItemSelected()

boolean org.navitproject.navit.Navit.onOptionsItemSelected ( MenuItem  item)
inline

◆ onPause()

◆ onPrepareDialog()

void org.navitproject.navit.Navit.onPrepareDialog ( int  id,
Dialog  dialog 
)
inlineprotected

◆ onPrepareOptionsMenu()

boolean org.navitproject.navit.Navit.onPrepareOptionsMenu ( Menu  menu)
inline

◆ onRequestPermissionsResult()

void org.navitproject.navit.Navit.onRequestPermissionsResult ( int  requestCode,
String[]  permissions,
int[]  grantResults 
)
inline

◆ onRestart()

void org.navitproject.navit.Navit.onRestart ( )
inline

◆ onResume()

◆ onSearchRequested()

boolean org.navitproject.navit.Navit.onSearchRequested ( )
inline

◆ onStart()

void org.navitproject.navit.Navit.onStart ( )
inline

◆ onStop()

void org.navitproject.navit.Navit.onStop ( )
inline

◆ parseNavigationURI()

void org.navitproject.navit.Navit.parseNavigationURI ( String  schemeSpecificPart)
inlineprivate

Parse google navigation URIs (usually starting with "google.navigation:") and take the appropriate actions.

Parameters
schemeSpecificPartA string containing the URI scheme, for example "ll=48.25676,16.643&q=blabla-strasse"

References org.navitproject.navit.NavitCallbackHandler.MsgType.CLB_SET_DESTINATION, and p.

◆ resourceFileNeedsUpdate()

boolean org.navitproject.navit.Navit.resourceFileNeedsUpdate ( String  filename)
inlineprivate

Check if a specific file needs to be extracted from the apk archive. This is based on whether the file already exist, and if so, whether it is older than the archive or not

Parameters
filenameThe full path to the file
Returns
true if file does not exist, but it can be created at the specified location, we will also return true if the file exist but the apk archive is more recent (probably package was upgraded)

References filename, org.navitproject.navit.Navit.NAVIT_PACKAGE_NAME, and org.navitproject.navit.Navit.TAG.

Referenced by org.navitproject.navit.Navit.extractAsset(), and org.navitproject.navit.Navit.extractRes().

◆ runOptionsItem()

◆ setActivityResult()

void org.navitproject.navit.Navit.setActivityResult ( int  requestCode,
NavitActivityResult  activityResult 
)
inline

◆ setMapLocation()

◆ showInfos()

void org.navitproject.navit.Navit.showInfos ( )
inlineprivate

Show the first start infobox (presentation of navit and link website for more info).

References org.navitproject.navit.NavitAppConfig.NAVIT_PREFS.

◆ showMenu()

void org.navitproject.navit.Navit.showMenu ( )
inlinepackage

Shows the Options menu.

Calling this method has the same effect as pressing the hardware Menu button, or touching the overflow button in the Action bar.

◆ showNativeKeyboard()

int org.navitproject.navit.Navit.showNativeKeyboard ( )
inlinepackage

Shows the native keyboard or other input method.

Returns
1 if keyboard is software, 0 if hardware

◆ start_targetsearch_from_intent()

void org.navitproject.navit.Navit.start_targetsearch_from_intent ( String  targetAddress)
inlineprivate

◆ verifyPermissions()

void org.navitproject.navit.Navit.verifyPermissions ( )
inlineprivate

◆ windowSetup()

void org.navitproject.navit.Navit.windowSetup ( )
inlineprivate

Field Documentation

◆ mActivityResults

NavitActivityResult [] org.navitproject.navit.Navit.mActivityResults
private

◆ mDialogs

NavitDialogs org.navitproject.navit.Navit.mDialogs
private

◆ mIsFullscreen

boolean org.navitproject.navit.Navit.mIsFullscreen
package

◆ mWakeLock

PowerManager.WakeLock org.navitproject.navit.Navit.mWakeLock
private

◆ MY_PERMISSIONS_REQ_FINE_LOC

final int org.navitproject.navit.Navit.MY_PERMISSIONS_REQ_FINE_LOC = 103
staticprivate

◆ NAVIT_PACKAGE_NAME

final String org.navitproject.navit.Navit.NAVIT_PACKAGE_NAME = "org.navitproject.navit"
staticprivate

◆ NavitAddressSearch_id

final int org.navitproject.navit.Navit.NavitAddressSearch_id = 70
staticprivate

◆ NavitDownloaderSelectMap_id

final int org.navitproject.navit.Navit.NavitDownloaderSelectMap_id = 967
staticprivate

◆ NavitSelectStorage_id

final int org.navitproject.navit.Navit.NavitSelectStorage_id = 43
staticprivate

◆ sMapFilenamePath

◆ sShowSoftKeyboardShowing

boolean org.navitproject.navit.Navit.sShowSoftKeyboardShowing
static

◆ TAG

final String org.navitproject.navit.Navit.TAG = "Navit"
staticprivate

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