Flathead Games





JNI method signatures
May 26th, 2016
Since I couldn't find the answer to this anywhere online, here's some code.

JAVA:
package com.flathead.MYFWPackage; public class MYFWActivity extends Activity { private IAPManager m_IAPManager = null; public IAPManager GetIAPManager() { return m_IAPManager; } }

To call GetIAPManager() from C++, we need it's function signature, which is:

()Lcom/flathead/MYFWPackage/IAPManager;

it would be used by the following C++ code:

C++
jmethodID getIAPManager = g_pEnv->GetMethodID( activity, "GetIAPManager", "()Lcom/flathead/MYFWPackage/IAPManager;" );
No comments Leave comment
Login to comment on news