with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __PORTING_ANDROID_H__
-#define __PORTING_ANDROID_H__
+
+#pragma once
#ifndef __ANDROID__
#error this include has to be included on android port only!
#include <string>
namespace porting {
-/** java app **/
+// java app
extern android_app *app_global;
-/** java <-> c++ interaction interface **/
+// java <-> c++ interaction interface
extern JNIEnv *jnienv;
-/**
- * do initialization required on android only
- */
+// do initialization required on android only
void initAndroid();
-void cleanupAndroid();
-/**
- * set storage dir on external sdcard#
- * @param lJNIEnv environment from android
- */
-void setExternalStorageDir(JNIEnv* lJNIEnv);
+void cleanupAndroid();
/**
- * use java function to copy media from assets to external storage
+ * Initializes path_* variables for Android
+ * @param env Android JNI environment
*/
-void copyAssets();
+void initializePathsAndroid();
/**
* show text input dialog in java
* @param editType type of texfield
* (1==multiline text input; 2==single line text input; 3=password field)
*/
-void showInputDialog(const std::string& acceptButton,
- const std::string& hint, const std::string& current, int editType);
+void showInputDialog(const std::string &acceptButton,
+ const std::string &hint, const std::string ¤t, int editType);
+
+void openURLAndroid(const std::string &url);
/**
* WORKAROUND for not working callbacks from java -> c++
*/
std::string getInputDialogValue();
-}
-
+#ifndef SERVER
+float getDisplayDensity();
+v2u32 getDisplaySize();
#endif
+}