Skip to content

Commit f56a942

Browse files
committed
added delay inside the mainloop, it is ok for L, not for M; it is better
1 parent dc9972b commit f56a942

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

samples-android/ButtonClicker/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.google.example.games.bc3"
2+
package="com.google.example.games.bc3.fix"
33
android:versionCode="1"
44
android:versionName="1.0" >
55

66
<uses-sdk
77
android:minSdkVersion="11"
8-
android:targetSdkVersion="19" />
8+
android:targetSdkVersion="22" />
99

1010
<uses-feature android:glEsVersion="0x00020000" >
1111
</uses-feature>
@@ -47,4 +47,4 @@
4747
</intent-filter>
4848
</activity>
4949
</application>
50-
</manifest>
50+
</manifest>

samples-android/ButtonClicker/jni/Application.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
APP_PLATFORM := android-9
1+
APP_PLATFORM := android-22
22
#APP_ABI := all
33
APP_ABI := armeabi-v7a
4-
#,arm64-v8a
4+
#APP_STL := arm64-v8a
55

66
APP_STL := c++_static
77

samples-android/ButtonClicker/jni/ButtonClickerNativeActivity_Engine.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,15 @@ void android_main(android_app *state) {
296296
// Init play game services
297297
g_engine.InitGooglePlayGameServices();
298298

299+
//let's wait here...
300+
{
301+
int count = 50;
302+
while(count--) {
303+
std::chrono::milliseconds d(100);
304+
std::this_thread::sleep_for(d);
305+
}
306+
LOGI("=====Spin Waiting done for gpg service");
307+
}
299308
state->userData = &g_engine;
300309
state->onAppCmd = Engine::HandleCmd;
301310
state->onInputEvent = Engine::HandleInput;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<resources>
22

3-
<string name="app_name">ButtonClicker</string>
4-
<string name="app_id">REPLACE_ME</string>
3+
<string name="app_name">ButtonClicker_ndk</string>
4+
<string name="app_id">953759410967</string>
55

66
</resources>

samples-android/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ set -eua
44
# List of targets to build. Interpreted as directories relative to
55
# this script's path.
66
declare targets=( \
7-
CollectAllTheStarsNative \
8-
Minimalist \
9-
TbmpSkeletonNative \
10-
Teapot \
11-
TrivialQuestNative \
7+
# CollectAllTheStarsNative \
8+
# Minimalist \
9+
# TbmpSkeletonNative \
10+
# Teapot \
11+
# TrivialQuestNative \
1212
ButtonClicker \
1313
)
1414

samples-android/build_sample.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ trap cleanup EXIT
104104
# Copy the lib project and run "android update lib-project" on it.
105105
# This requires a target, which apparently needs to be android-10.
106106
cp -r ${lib_project} ${private_lib}
107-
${android_tool} update lib-project --path ${private_lib} --target android-10
107+
${android_tool} update lib-project --path ${private_lib} --target android-22
108108

109109
#
110110
# At last, build!

0 commit comments

Comments
 (0)