H
HW.
Guest
I want to ask YoYo team, or anyone else who has experiences to answer this specific question about the RunnerActivity of the GMS2 engine, for the sole purpose of creating an Android native extension for GameMaker projects (best-practice way).
Okay, so what i read from the YoYo official documentation about creating the native Android extension for GMS is:
the guide always reminds us of not forgeting to add these three lines :
I have an Android extension from the marketplace that is working fine when is running on the device
that it :
import ${YYAndroidPackageName}.R WITHOUT import ${YYAndroidPackageName}.RunnerActivity;
when the rest of the java codes on the middle area is calling RunnerActivity.something bla bla bla.
CASE B:
I also see another Android extension from the marketplace which is also working fine when is running on the device
that it :
import ${YYAndroidPackageName}.R AND ALSO WITH import ${YYAndroidPackageName}.RunnerActivity;
when the rest of the java codes on the middle area is calling RunnerActivity.something bla bla bla.
BOTH are working fine, so MY QUESTIONS as the title of this thread:
1. Is "R" shortcut of "RunnerActivity"??
~ import ${YYAndroidPackageName}.R; representing-or-shortcut of import ${YYAndroidPackageName}.RunnerActivity; ???
2. Is the CASE A or CASE B the same thing? which is the best practice to be implemented so that GMS2 Android mobile runner can recognize the code better?
3. If on the java codes for the Android extension to be used for GMS2 runner to work with best-practice way,
-- Do i need to import one of them already enough?
-- only import ${YYAndroidPackageName}.R ??
-- or just import ${YYAndroidPackageName}.RunnerActivity; ??
-- or both import ${YYAndroidPackageName}.R AND ALSO WITH import ${YYAndroidPackageName}.RunnerActivity; ??
note: i also learned that most Android extensions for GMS/GMS2 also import android.app.Activity; in addition to both that yellow and green. Out of my question but i want to hear some tips about it too, because is related to the Android Activity.
Okay, so what i read from the YoYo official documentation about creating the native Android extension for GMS is:
the guide always reminds us of not forgeting to add these three lines :
CASE A:package ${YYAndroidPackageName};
import ${YYAndroidPackageName}.R; <-- i want to specificly ask about this
import com.yoyogames.runner.RunnerJNILib;
I have an Android extension from the marketplace that is working fine when is running on the device
that it :
import ${YYAndroidPackageName}.R WITHOUT import ${YYAndroidPackageName}.RunnerActivity;
when the rest of the java codes on the middle area is calling RunnerActivity.something bla bla bla.
CASE B:
I also see another Android extension from the marketplace which is also working fine when is running on the device
that it :
import ${YYAndroidPackageName}.R AND ALSO WITH import ${YYAndroidPackageName}.RunnerActivity;
when the rest of the java codes on the middle area is calling RunnerActivity.something bla bla bla.
BOTH are working fine, so MY QUESTIONS as the title of this thread:
1. Is "R" shortcut of "RunnerActivity"??
~ import ${YYAndroidPackageName}.R; representing-or-shortcut of import ${YYAndroidPackageName}.RunnerActivity; ???
2. Is the CASE A or CASE B the same thing? which is the best practice to be implemented so that GMS2 Android mobile runner can recognize the code better?
3. If on the java codes for the Android extension to be used for GMS2 runner to work with best-practice way,
-- Do i need to import one of them already enough?
-- only import ${YYAndroidPackageName}.R ??
-- or just import ${YYAndroidPackageName}.RunnerActivity; ??
-- or both import ${YYAndroidPackageName}.R AND ALSO WITH import ${YYAndroidPackageName}.RunnerActivity; ??
note: i also learned that most Android extensions for GMS/GMS2 also import android.app.Activity; in addition to both that yellow and green. Out of my question but i want to hear some tips about it too, because is related to the Android Activity.