DDraceNetwork Docs
|
#include "android_main.h"
#include <SDL.h>
#include <base/hash.h>
#include <base/log.h>
#include <base/system.h>
#include <engine/shared/linereader.h>
#include <string>
#include <vector>
Classes | |
class | CIntegrityFileLine |
Functions | |
static bool | UnpackAsset (const char *pFilename) |
static bool | EqualIntegrityFiles (const char *pAssetFilename, const char *pStorageFilename) |
static std::vector< CIntegrityFileLine > | ReadIntegrityFile (const char *pFilename) |
const char * | InitAndroid () |
void | RestartAndroidApp () |
Variables | |
constexpr const char * | INTEGRITY_INDEX = "integrity.txt" |
constexpr const char * | INTEGRITY_INDEX_SAVE = "integrity_save.txt" |
constexpr uint32_t | COMMAND_USER = 0x8000 |
constexpr uint32_t | COMMAND_RESTART_APP = COMMAND_USER + 1 |
|
static |
const char * InitAndroid | ( | ) |
Initializes the Android storage. Must be called on Android-systems before using any of the I/O and storage functions.
This will change the current working directory to the app specific external storage location and unpack the assets from the APK file to the data
folder. The folder user
is created in the external storage to store the user data.
Failure must be handled by exiting the app.
nullptr
on success, error message on failure.
|
static |
void RestartAndroidApp | ( | ) |
Sends an intent to the Android system to restart the app.
This will restart the main activity in a new task. The current process must immediately terminate after this function is called.
|
static |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |