57#elif defined(__APPLE__)
59#elif defined(HAVE_LIBDBUS)
61#elif defined(__ANDROID__)
63 JNIEnv* env =
reinterpret_cast<JNIEnv*
>(SDL_GetAndroidJNIEnv());
64 jobject wesnoth_instance =
reinterpret_cast<jobject
>(SDL_GetAndroidActivity());
65 jclass wesnoth_activity(env->GetObjectClass(wesnoth_instance));
66 jmethodID percentage = env->GetMethodID(wesnoth_activity,
"getBatteryPercentage",
"()D");
67 return env->CallDoubleMethod(wesnoth_instance, percentage);