Android Back Button

Hello there noob here

I'm Al-Farizi i want to develop a game for mobile and the game is still development i hope the game Will be popular🙂

But i have some problem with the back button

The default back button in rmmv is two tap fingers right?

Can someone make a plugin for replace it with Android back button
Example:
images (3)-picsay.png


Can someone help me pleasee🙁
I really want to make a RPG maker MV games good too for mobile
i don't really understand, but which one do you need?
i don't really understand, but which one do you need?
Yes that's what i need can i get the TM Back Button plugin?
Btw sorry for my bad English
It's from Japanese site. The author is tomoaky. Just search it for yourself, that plugin name is TM_BackButton.js

It's from Japanese site. The author is tomoaky. Just search it for yourself, that plugin name is TM_BackButton.js


Well it's good, but i mean i want to replace the two fingers tap with Android back navigation, did u know the plugin for that?
images (3).jpeg

Btw sorry for my bad English
replace the two fingers tap with Android back navigation, did u know the plugin for that?
Spoiler: Manual Method, See below for all in one easy to use plugin
This would require this very small plugin which will disable the DualTouch/RightClick for the menu.
...but more importantly for what you require not a plugin but a change to the java activity file you use would be how to change what the back button does.
For example:
If using code by xilefian (aka. felixjones) as the core for the android app you would simply change the "onBackPressed" function ...
from:
Code:
    @Override
    public void onBackPressed() {
        if (BuildConfig.BACK_BUTTON_QUITS) {
            if (mQuitDialog != null) {
                mQuitDialog.show();
            } else {
                super.onBackPressed();
            }
        } else {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
        }
    }
...to this:
Code:
    @Override
    public void onBackPressed() {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
    }
...Basically more info may be required on how you are going about building the android app & it's a change to a "java" file not javascript so don't think a plugin (traditional at least) will be able to be developed to work with the android back button.

Edit:
Hmm... Scratch all that lol
I may have done it. I made a plugin that might do this as needed.
Can't test right now but I'll test when I can.
Please let me know if you try it out before me, let me know if that works I may have done it...
CTB_AndroidBackButton.js

That also includes the DisableClickDualTouchMenu fix too so only need the one plugin file 🙂
Spoiler: Manual Method, See below for all in one easy to use plugin
This would require this very small plugin which will disable the DualTouch/RightClick for the menu.
...but more importantly for what you require not a plugin but a change to the java activity file you use would be how to change what the back button does.
For example:
If using code by xilefian (aka. felixjones) as the core for the android app you would simply change the "onBackPressed" function ...
from:
Code:
    @Override
    public void onBackPressed() {
        if (BuildConfig.BACK_BUTTON_QUITS) {
            if (mQuitDialog != null) {
                mQuitDialog.show();
            } else {
                super.onBackPressed();
            }
        } else {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
        }
    }
...to this:
Code:
    @Override
    public void onBackPressed() {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
    }
...Basically more info may be required on how you are going about building the android app & it's a change to a "java" file not javascript so don't think a plugin (traditional at least) will be able to be developed to work with the android back button.

Edit:
Hmm... Scratch all that lol
I may have done it. I made a plugin that might do this as needed.
Can't test right now but I'll test when I can.
Please let me know if you try it out before me, let me know if that works I may have done it...
CTB_AndroidBackButton.js

That also includes the DisableClickDualTouchMenu fix too so only need the one plugin file 🙂
Really thanks i'll try it, thank you so much
Spoiler: Manual Method, See below for all in one easy to use plugin
This would require this very small plugin which will disable the DualTouch/RightClick for the menu.
...but more importantly for what you require not a plugin but a change to the java activity file you use would be how to change what the back button does.
For example:
If using code by xilefian (aka. felixjones) as the core for the android app you would simply change the "onBackPressed" function ...
from:
Code:
    @Override
    public void onBackPressed() {
        if (BuildConfig.BACK_BUTTON_QUITS) {
            if (mQuitDialog != null) {
                mQuitDialog.show();
            } else {
                super.onBackPressed();
            }
        } else {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
        }
    }
...to this:
Code:
    @Override
    public void onBackPressed() {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
    }
...Basically more info may be required on how you are going about building the android app & it's a change to a "java" file not javascript so don't think a plugin (traditional at least) will be able to be developed to work with the android back button.

Edit:
Hmm... Scratch all that lol
I may have done it. I made a plugin that might do this as needed.
Can't test right now but I'll test when I can.
Please let me know if you try it out before me, let me know if that works I may have done it...
CTB_AndroidBackButton.js

That also includes the DisableClickDualTouchMenu fix too so only need the one plugin file 🙂
Screenshot_2020-03-26-20-40-29-796_id.LonelyG.app.png well it's doesn't work, but i'll try use the pure new project
View attachment 137928 well it's doesn't work, but i'll try use the pure new project
Ok good to know, figured that was too simple.
Try just changing the "onBackPressed" in your <activity name here>.java file from:
Code:
@Override
    public void onBackPressed() {
        if (BuildConfig.BACK_BUTTON_QUITS) {
            if (mQuitDialog != null) {
                mQuitDialog.show();
            } else {
                super.onBackPressed();
            }
        } else {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
        }
    }
to:
Code:
@Override
    public void onBackPressed() {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
    }
...If you have the function onBackPressed() in your java activity file that is.

The "ActivityFileName.java" would probably be in a folder like this:
Code:
.\AndroidApp\app\src\main\java\packageNamePartA\packageNamePartB\packageNamePartC\ActivityFileName.java
I'll look further into a plugin but that's the best way to do it manually until then.
Ok good to know, figured that was too simple.
Try just changing the "onBackPressed" in your <activity name here>.java file from:
Code:
@Override
    public void onBackPressed() {
        if (BuildConfig.BACK_BUTTON_QUITS) {
            if (mQuitDialog != null) {
                mQuitDialog.show();
            } else {
                super.onBackPressed();
            }
        } else {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
        }
    }
to:
Code:
@Override
    public void onBackPressed() {
            mPlayer.evaluateJavascript(TOUCH_INPUT_ON_CANCEL);
    }
...If you have the function onBackPressed() in your java activity file that is.

The "ActivityFileName.java" would probably be in a folder like this:
Code:
.\AndroidApp\app\src\main\java\packageNamePartA\packageNamePartB\packageNamePartC\ActivityFileName.java
I'll look further into a plugin but that's the best way to do it manually until then.
Thank you very much for the information, for now i'll try manually until the plugin is out
It's from Japanese site. The author is tomoaky. Just search it for yourself, that plugin name is TM_BackButton.js

This is really helpful! Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/android-back-button.119426/