Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 50 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
![Game.apk](app/src/main/res/mipmap-xxxhdpi/app_icon.png)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H55F9KTF8JWBS)

## What is the MV Android Client

The MV Android Client is a runtime client for the [Android™ operating system](https://www.android.com) intended to play games created with the [RPG Maker MV](http://www.rpgmakerweb.com) game development tool-kit.

This client can be used to deploy your game as an Android APK package for distribution.

## How to get MV Android Client

The latest (master branch) of the client can be downloaded via this URL:
https://github.com/AltimitSystems/mv-android-client/zipball/master

## Tutorial & Usage Support

A tutorial is hosted at HBGames.org at the following URL:
[hbgames.org/forums/viewtopic.php?f=48&t=79391](http://www.hbgames.org/forums/viewtopic.php?f=48&t=79391)

Usage support is provided with this tutorial.

You are free to provide a translation of this tutorial with the condition that you link back to this repository and the original English translation hosted at HBGames.org.

## Bugs, issues and enhancements

Please create reports for bugs related to the project at [GitHub issues](https://github.com/AltimitSystems/mv-android-client/issues)
Suggestions and other forms of feedback and concerns can either be posted as a GitHub issue or in the HBGames.org tutorial thread.

## License

The MV Android Client is under the [Apache License 2.0](https://github.com/AltimitSystems/mv-android-client/blob/master/LICENSE).

## Contributing

Please read the [contributing guide](https://github.com/AltimitSystems/mv-android-client/blob/master/CONTRIBUTING.md) and send pull requests to [https://github.com/AltimitSystems/mv-android-client](https://github.com/AltimitSystems/mv-android-client).
![Game.apk](app/src/main/res/mipmap-xxxhdpi/app_icon.png)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H55F9KTF8JWBS)

## What is the MV Android Client

The MV Android Client is a runtime client for the [Android™ operating system](https://www.android.com) intended to play games created with the [RPG Maker MV](http://www.rpgmakerweb.com) game development tool-kit.

This client can be used to deploy your game as an Android APK package for distribution.

## How to get MV Android Client

The latest (master branch) of the client can be downloaded via this URL:
https://github.com/AltimitSystems/mv-android-client/zipball/master

## Tutorial & Usage Support

A tutorial is hosted at HBGames.org at the following URL:
[hbgames.org/forums/viewtopic.php?f=48&t=79391](http://www.hbgames.org/forums/viewtopic.php?f=48&t=79391)

Usage support is provided with this tutorial.

You are free to provide a translation of this tutorial with the condition that you link back to this repository and the original English translation hosted at HBGames.org.

## Triggering Events on Android

You can now trigger events on Android devices to show an ad (interstitial or other) or perform another action (solicit a review, share, etc.) To trigger these events, add a custom script to your Event like the following:

```
if(typeof boot !== 'undefined'){
boot.triggerEvent("ad_interstitial")
}
```

Where "ad_interstitial" can be any event you want to handle. And then edit the following method in WebPlayerActivity.Bootstrapper to perform your actions:
```
public void onTriggerEvent(String type)
```

## Bugs, issues and enhancements

Please create reports for bugs related to the project at [GitHub issues](https://github.com/AltimitSystems/mv-android-client/issues)
Suggestions and other forms of feedback and concerns can either be posted as a GitHub issue or in the HBGames.org tutorial thread.

## License

The MV Android Client is under the [Apache License 2.0](https://github.com/AltimitSystems/mv-android-client/blob/master/LICENSE).

## Contributing

Please read the [contributing guide](https://github.com/AltimitSystems/mv-android-client/blob/master/CONTRIBUTING.md) and send pull requests to [https://github.com/AltimitSystems/mv-android-client](https://github.com/AltimitSystems/mv-android-client).
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import android.support.v7.app.AlertDialog;
import android.util.Base64;
import android.view.View;
import android.webkit.WebView;
import android.widget.Toast;

import java.io.File;
import java.nio.charset.Charset;
Expand All @@ -45,6 +47,13 @@ public class WebPlayerActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

if(BuildConfig.DEBUG){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
}

if (BuildConfig.BACK_BUTTON_QUITS) {
createQuitDialog();
}
Expand Down Expand Up @@ -233,9 +242,23 @@ protected void onPrepare(boolean webgl, boolean webaudio, boolean showfps) {
mPlayer.post(this);
}

@Override
public void onTriggerEvent(String type) {
//these events can be any type, in this case we're just showing an AlertDialog, but it could be an ad
if(mPlayer.getContext() instanceof Activity) {
new AlertDialog.Builder(mPlayer.getContext())
.setTitle("Event")
.setMessage("Here's where I'd trigger an event of type: " + type)
.setPositiveButton(android.R.string.ok, null)
.show();
}else{
Toast.makeText(mPlayer.getContext(), "Here's where I'd trigger an event of type: " + type, Toast.LENGTH_SHORT);
}
}

@Override
public void run() {
mPlayer.removeJavascriptInterface(INTERFACE);
//mPlayer.removeJavascriptInterface(INTERFACE);
mPlayer.loadUrl(mURIBuilder.build().toString());
}

Expand Down
7 changes: 1 addition & 6 deletions app/src/main/res/values/values_internal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@
</string>

<string name="webview_default_page">
PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPG1ldGEgY2hhcnNldD1VVEYtOD4KPHN0eWxlPmJvZHl7YmFja2dy
b3VuZC1jb2xvcjpibGFja30jY29weXJpZ2h0e3Bvc2l0aW9uOmZpeGVkO2JvdHRvbTowO3JpZ2h0OjA7Y29sb3I6d2hp
dGU7Zm9udC1mYW1pbHk6Q29uc29sYXMsTW9uYWNvLEx1Y2lkYSBDb25zb2xlLExpYmVyYXRpb24gTW9ubyxEZWphVnUg
U2FucyBNb25vLEJpdHN0cmVhbSBWZXJhIFNhbnMgTW9ubyxDb3VyaWVyIE5ldyxtb25vc3BhY2V9PC9zdHlsZT4KPC9o
ZWFkPgo8Ym9keSBvbmxvYWQ9Ym9vdC5zdGFydCgpPgo8ZGl2IGlkPWNvcHlyaWdodD4mIzE2OTsgJiM5MjM7TFRJTUlU
IENPTU1VTklUWSBDT05UUklCVVRPUlM8L2Rpdj4KPC9ib2R5Pgo8L2h0bWw+
PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPG1ldGEgY2hhcnNldD1VVEYtOD4KPC9oZWFkPgo8Ym9keSBvbmxvYWQ9Ym9vdC5zdGFydCgpPgo8L2JvZHk+CjwvaHRtbD4=
</string>

<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static abstract class Interface {

protected abstract void onStart();
protected abstract void onPrepare(boolean webgl, boolean webaudio, boolean showfps);
protected abstract void onTriggerEvent(String type);

@JavascriptInterface
public void start() {
Expand All @@ -46,6 +47,10 @@ public void prepare(boolean webgl, boolean webaudio, boolean showfps) {
onPrepare(webgl, webaudio, showfps);
}

@JavascriptInterface
public void triggerEvent(String type){
onTriggerEvent(type);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static abstract class Interface {

protected abstract void onStart();
protected abstract void onPrepare(boolean webgl, boolean webaudio, boolean showfps);
protected abstract void onTriggerEvent(String type);

@JavascriptInterface
public void start() {
Expand All @@ -47,6 +48,10 @@ public void prepare(boolean webgl, boolean webaudio, boolean showfps) {
onPrepare(webgl, webaudio, showfps);
}

@JavascriptInterface
public void triggerEvent(String type){
onTriggerEvent(type);
}
}

}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.4.2'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Feb 10 17:59:11 GMT 2019
#Wed Aug 14 18:37:42 BST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip