Created
August 5, 2019 05:59
-
-
Save goodmorningcody/4da74a3372029d170cbf4596613f999a to your computer and use it in GitHub Desktop.
Inherited from UnityPlayerActivity to extend Android Platform.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kakaogames.android; | |
import android.os.Bundle; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; | |
import com.unity3d.player.UnityPlayerActivity; | |
public class MyUnityPlayerActivity extends UnityPlayerActivity | |
{ | |
@Override protected void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
} | |
@Override protected void onStart() | |
{ | |
super.onStart(); | |
showTestDialog(); | |
} | |
//test code | |
private void showTestDialog() { | |
AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
builder.setMessage("This is a test") | |
.setCancelable(false) | |
.setPositiveButton("Yes", new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int id) { | |
dialog.dismiss(); | |
} | |
}); | |
AlertDialog alert = builder.create(); | |
alert.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment