@xilefian it is possible use a cordova plugin inside your Client? (Like Vibration Plugin for example)
Exporting to Android (MV Android Client)
RMMV TutorialsI had to build in webview as opposed to crosswalk and make sure your building a signed apk with version 1 and version 2 signatures, I had a similar issue the first build I attempted.
I actually started looking at getting Cordova directly used, however Cordova doesn't seem very friendly to such an idea. I'll reassess when I have more time.
But if you want vibration you can just call navigator.vibrate([500]); in MV (try making this as a script call in an Event for a quick test). If that doesn't work then there's probably a security issue going on.
Getting Node.js features (what Cordova brings to the table) is tricky. I had started re-implementing them myself a couple years back but it is an insane task, it would be smarter to find an Android port of Node specifically for WebView instances (maybe Cordova can provide the answer).
So should I or should I not stop my work on converting my old extension-based code for (the working parts of the) GPlay API stuff over to an AAR? (askin so we don't have, like, 2-3 people trying to do the same thing except they don't know the others are doin' it)
>Would've brought it up on the github issue if I hadn't been swamped with school for the past bit and kept forgettin' >->
Thank you!
At the first try it doesn't work, then i remember that i forgot permission in Manifest file.
So just adding
It work perfectly!
Thank you Xilefian.
At the first try it doesn't work, then i remember that i forgot permission in Manifest file.
So just adding
Code:
<uses-permission android:name="android.permission.VIBRATE"/>
Thank you Xilefian.
Continue your work converting it to an AAR, I suggest you have it as its own GitHub repo so we can reference each other and work on Google Play features separately.
In the meantime, perhaps discuss what a standard Android API for MV would look like. There are concerns such as Google Play Services not being available in some regions that we need to think about. China is the biggest region using MV Android Client and Google Play Services are not available in that region, so discussion is needed.
Done
Intent is to handle achievements, events, and leaderboards as the extension version did.
I'll see what I can do with regions that dont have Play Services; part of me wants to think that, currently, things will just fail to connect and any calls from MV will be consumed with no result (for better or worse) but another is kinda nagging me that this isn't the case
My thoughts are to separate functionality between Google Play Services required and not required. So something like Android file system access does not need Google Play Services, but Achievements, OBB expansions, etc would.
Stuff that doesn't need Google Play can be merged in with main MV Android Client, stuff that does can stay as an AAR library.
Once you have a tutorial for integrating your Google Play AAR we can probably look into tidying it up to be inline with the Altimit Community Contributors guidelines and link it as an official library for MV Android Client as an additional step in the tutorial.
I'll probably look at what you've got and start working out plans on an internal Android library in the main project.
EDIT: OBB support would work best as part of the main MV Android Client, it doesn't explicitly need Google Play either, so that one would probably go under the category of "Android API" rather than "Google API".
Sorry to bother, but... someone known how to solve this?
Check your project's android build plugin in its build.grade
That's actually about all I can find on that. Latest should be 3.3.1
Can't build with signature with the latest update 🙁
The key is correct with older versions work.
EDIT:
If someone have problem to sign an app try to change in
Build gradle Project:
to
I don't know why, but it works for me.
The key is correct with older versions work.
EDIT:
If someone have problem to sign an app try to change in
Build gradle Project:
Code:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}
Code:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
I was having this problem of signature too so I uninstalled Android studio and installed the 3.2.1 and had the another problem I was talking about, I think I have to return to latest:rswt2:
It's strange i cant understand what is.
Actually looks randomly for me...
Wich kind of error you got?
Cant find alias?
Or incorrect key?
Actually looks randomly for me...
Wich kind of error you got?
Cant find alias?
Or incorrect key?
Quite odd; created a new key and it signs just fine using com.android.tools.build:gradle:3.3.1
Excuse me, @xilefian,
I have a bad error on 'Build APK.
Since i've tried to sync builds and customize app id, then i'm trying to build debug apk and i got this:
"Android resource linking failed
error: resource style/Theme.AppCompat.NoActionBar (aka com.dcph.mtc.and:style/Theme.AppCompat.NoActionBar) not found.
C:\RPGMV to APK\mv-android-client-master2\app\build\intermediates\incremental\mergeWebviewDebugResources\merged.dir\values\values.xml:37: error: style attribute 'attr/colorPrimary (aka com.dcph.mtc.and:attr/colorPrimary)' not found.
C:\RPGMV to APK\mv-android-client-master2\app\build\intermediates\incremental\mergeWebviewDebugResources\merged.dir\values\values.xml:38: error: style attribute 'attr/colorPrimaryDark (aka com.dcph.mtc.and:attr/colorPrimaryDark)' not found.
C:\RPGMV to APK\mv-android-client-master2\app\build\intermediates\incremental\mergeWebviewDebugResources\merged.dir\values\values.xml:39: error: style attribute 'attr/colorAccent (aka com.dcph.mtc.and:attr/colorAccent)' not found.
error: failed linking references."
Android tools i got:
Android studio ver: 3.3.1
Jdk ver: 1.8.0.221
And the latest MV Android Client that i downloaded earlier.
Please solve this.
-LeonardPlaysMC
I have a bad error on 'Build APK.
Since i've tried to sync builds and customize app id, then i'm trying to build debug apk and i got this:
"Android resource linking failed
error: resource style/Theme.AppCompat.NoActionBar (aka com.dcph.mtc.and:style/Theme.AppCompat.NoActionBar) not found.
C:\RPGMV to APK\mv-android-client-master2\app\build\intermediates\incremental\mergeWebviewDebugResources\merged.dir\values\values.xml:37: error: style attribute 'attr/colorPrimary (aka com.dcph.mtc.and:attr/colorPrimary)' not found.
C:\RPGMV to APK\mv-android-client-master2\app\build\intermediates\incremental\mergeWebviewDebugResources\merged.dir\values\values.xml:38: error: style attribute 'attr/colorPrimaryDark (aka com.dcph.mtc.and:attr/colorPrimaryDark)' not found.
C:\RPGMV to APK\mv-android-client-master2\app\build\intermediates\incremental\mergeWebviewDebugResources\merged.dir\values\values.xml:39: error: style attribute 'attr/colorAccent (aka com.dcph.mtc.and:attr/colorAccent)' not found.
error: failed linking references."
Android tools i got:
Android studio ver: 3.3.1
Jdk ver: 1.8.0.221
And the latest MV Android Client that i downloaded earlier.
Please solve this.
-LeonardPlaysMC
This error happens when you corrupt a build.gradle file. Can you copy your gradle file to pastebin and link it here? It's likely when you changed application id you broke something else (maybe you used an invalid ID).
@xilefian
This is the code from "C/...mv-android-client-master/app/build.gradle":
Any questions?
-LeonardPlaysMC
This is the code from "C/...mv-android-client-master/app/build.gradle":
Code:
/*
* Copyright (c) 2017-2019 Altimit Community Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imp
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.android.application'
android {
/**
* Advanced Configuration
*/
def BACK_BUTTON_QUITS = true // Use back button to quit the app?
def SHOW_FPS = false // Display the FPS monitor?
def FORCE_CANVAS = false // Disables fast WebGL rendering when available
def FORCE_NO_AUDIO = false // Disables WebAudio
def ANDROID_SDK = 28 // Android 9 "Pie" API 28
compileSdkVersion ANDROID_SDK
defaultConfig {
/**
* Project Identification
*/
applicationId "com.dcph.mtc.and" // Change this to your applicationId.
versionCode 1 // Set this to a higher number for game updates.
versionName "1.0.12" // This is the version that the player sees.
targetSdkVersion ANDROID_SDK
}
buildTypes {
buildTypes.each { buildType ->
buildType.buildConfigField "boolean", "BACK_BUTTON_QUITS", String.valueOf(BACK_BUTTON_QUITS)
buildType.buildConfigField "boolean", "SHOW_FPS", String.valueOf(SHOW_FPS)
buildType.buildConfigField "boolean", "FORCE_CANVAS", String.valueOf(FORCE_CANVAS)
buildType.buildConfigField "boolean", "FORCE_NO_AUDIO", String.valueOf(FORCE_NO_AUDIO)
}
}
flavorDimensions "mv_android_client"
productFlavors {
webview {
dimension "mv_android_client"
minSdkVersion 21
buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true"
}
// WARNING: As of February 2017 Crosswalk is no longer maintained https://crosswalk-project.org/blog/crosswalk-final-release.html
zz_crosswalk {
dimension "mv_android_client"
minSdkVersion 21
buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true"
}
}
}
Any questions?
-LeonardPlaysMC
@Damage Control check even
Value.xml in res>values>
error: style attribute 'attr/colorPrimaryDark looks like an error from there.
Value.xml in res>values>
error: style attribute 'attr/colorPrimaryDark looks like an error from there.
@Lakaroth
The thing in app/src/main/res/values/values.xml:
Is anyone solve this?
-LeonardPlaysMC
The thing in app/src/main/res/values/values.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2017-2018 Altimit Community Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Theme Colors -->
<color name="color_primary">#424242</color>
<color name="color_primary_dark">#212121</color>
<color name="color_accent">#009688</color>
<!-- Icon Colors -->
<color name="icon_background">#FFF</color>
<!-- Project Name -->
<string name="app_name">The Mystery in the Campus</string>
<!-- Web Linking -->
<string name="app_scheme">https</string>
<string name="app_host">altimit.systems</string>
<!-- Quit Message -->
<string-array name="quit_message">
<!-- Remove all items (empty string-array) to disable quit warning -->
<item>Are you sure to quit?</item>
<item>Your investigation will be undone!</item>
</string-array>
</resources>
-LeonardPlaysMC
@Damage Control values.xml looks ok...
The only think you can do is to download the latest MV Client here and re import your project.
If don't work, try to update Android Studio, maybe u use an older version.
The only think you can do is to download the latest MV Client here and re import your project.
If don't work, try to update Android Studio, maybe u use an older version.
Original thread: https://forums.rpgmakerweb.com/threads/exporting-to-android-mv-android-client.84971/