axmol/tools/simulator/libsimulator/proj.android/hellolua/Runtime_android.cpp

20 lines
403 B
C++
Raw Normal View History

2015-04-18 23:20:41 +08:00
#include <jni.h>
#include <android/log.h>
#include "jni/JniHelper.h"
#include <string>
#include <vector>
using namespace std;
using namespace cocos2d;
static std::string className = "org/cocos2dx/lua/AppActivity";
2015-04-18 23:20:41 +08:00
void setActivityPathForAndroid(const std::string& path)
{
className = path;
2015-04-18 23:20:41 +08:00
}
string getIPAddress()
{
return JniHelper::callStaticStringMethod(className, "getLocalIpAddress");
2015-04-18 23:20:41 +08:00
}