You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added JNI error codes to make errors in that easier to debug. [CL 2243721 by Daniel Lamb in Main branch]
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include <jni.h>
|
|
#include <android/log.h>
|
|
|
|
extern JavaVM* GJavaVM;
|
|
extern jobject GJavaGlobalThis;
|
|
|
|
/*
|
|
* NOTE -- At the moment, this is specific to GameActivity
|
|
*/
|
|
|
|
// Define all the Java classes/methods that the game will need to access to
|
|
class JDef_GameActivity
|
|
{
|
|
public:
|
|
static jclass ClassID;
|
|
|
|
// Nonstatic methods
|
|
static jmethodID AndroidThunkJava_ShowConsoleWindow;
|
|
static jmethodID AndroidThunkJava_ShowVirtualKeyboardInput;
|
|
static jmethodID AndroidThunkJava_LaunchURL;
|
|
static jmethodID AndroidThunkJava_ShowLeaderboard;
|
|
static jmethodID AndroidThunkJava_ShowAchievements;
|
|
static jmethodID AndroidThunkJava_QueryAchievements;
|
|
static jmethodID AndroidThunkJava_ResetAchievements;
|
|
static jmethodID AndroidThunkJava_WriteLeaderboardValue;
|
|
static jmethodID AndroidThunkJava_GooglePlayConnect;
|
|
static jmethodID AndroidThunkJava_WriteAchievement;
|
|
static jmethodID AndroidThunkJava_ShowAdBanner;
|
|
static jmethodID AndroidThunkJava_HideAdBanner;
|
|
static jmethodID AndroidThunkJava_CloseAdBanner;
|
|
|
|
static jmethodID AndroidThunkJava_GetAssetManager;
|
|
static jmethodID AndroidThunkJava_Minimize;
|
|
static jmethodID AndroidThunkJava_ForceQuit;
|
|
|
|
// IDs related to achievement query
|
|
static jclass JavaAchievementClassID;
|
|
static jfieldID AchievementIDField;
|
|
static jfieldID AchievementProgressField;
|
|
};
|
|
|
|
// Returns the java environment
|
|
JNIEnv* GetJavaEnv(bool bRequireGlobalThis = true);
|