• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Distributing Android Apps

Chimpy

New member
Joined
Sep 16, 2019
Messages
18
Hello Cerberus X Community,

I found Cerberus X a couple of days ago when I was intensively searching for a graphics programming language for Android and I simply love it. It is so simple but yet powerful, it is amazing, plus it supports a wide variety of target platforms as well as Linux as hosting system, plus it is open source. This is so awesome that I actually started wondering why it doesn't get more attention?
I already finished a first little project, a tetris clone, well sound is missing I have to admit but other than that I am happy with it.
Because I am a complete Android noob when it comes to programming I might miss very obvious things, but looking into the documentation and the forum I couldn't find any information about some basic things, first changing the app icon. I found the path of the icons in the build folder, but when I overwrote them, Cerberus X changed them back to the defaults one, when targeting the android platform, so the workaround for my was now just to overwrite the default icons.
I now would like to publish the app on Google Play. I found this page - https://developer.android.com/studio/publish - where they tell that I have to change name, version etc. in the Manifest file to meet the requirements for distributing an app, but again, when I am building the app again with Cerberus X the Manifest file gets overwritten again with default values.
How can I "sign" an application?
Maybe somebody can guide me a little bit what steps minimum I have to do to distribute an app. That would be very helpful. Thanks:)
 
Welcome to the forum. May i refer you to the documentation, Target SDKs?
 
Welcome to the forum!

Icon change: You have to change the Icon set in this folder: android\gradletemplate\app\src\main\res
There is this nice tool from Android Asset Studio to make all icons at once from a simple image.
You only have to change the manifest file, if you want to change app permissions. Other things like keystore or version you can set by using config constants for android.
Documentation is still a weak point, but the community is very nice.
 
Thank you both,
I can't believe I missed that part in the documentation. I will try it out when I have some time, I'm currently very busy with my job.
So i don't need to manually change things in the android build folder besides the icons, that's good For writing a file i need an extra permission i guess. How would you guys save a game state or an highscore, simply write to a file? If i need to change the permission in the manifest file, how to recompile the program with the changes to take effect? I see i have to study more about android developement in general o_O
Yeah, the community appears to be great
 
For writing a file i need an extra permission i guess. How would you guys save a game state or an highscore, simply write to a file?
Not, as far as I know if you are just using SaveState(text:String) and text=LoadState() as they are not connecting to the normal file system of the device.

If you need to change the manifest, try the one in this folder: your_build_folder\android\gradletemplate\app\src\main
It should be enough to do a normal build after that. - Both not tested!
 
@Chimpy To add native libs and permissions, please have a look at the source files of admob.cxs and cerberusstore.cxs inside the modules/brl folder.
 
Hi again,
Just wanted to say that I successfully uploaded my game to Google Play. It was much simpler than I thought. The only issue that I have is that I get a warning in the Google Play Console that my game is too big (1,13 MB) and should be optimized, but it is harmless I guess?
I don't think that it is worth to post this in the Showcase subforum because it's nothing special (mainly just a test), so I just post it here, if you are curious: https://play.google.com/store/apps/details?id=com.toybagames.fuzzyblocks
Thanks again
 
Congrats for your release but that game is ip and trademark protected like there is no tommorow. Don't be surprised if you get a C&D letter.
And was it 1,13 MB or 113 MB?
 
It is only 1,13 MB of course.
I thought game ideas cannot be protected, am I wrong? I don't use any trademarks - all the graphics are made by myself (using just primitive draw routines provided by CX). I also don't make any money of it.
But I guess I will read further and take the game down on doubts.
 
The 'warning' is because Google Play is pushing to create several builds, one for each architecture supported by Android. They 'think' because your APK is 'one fits all' it is 'bloated' and should be separated into smaller ones, for specific devices.

I get it with all my games, and I just ignore it.
 
I successfully uploaded my game to Google Play. It was much simpler than I thought.
Good to hear. Could you sum up the steps you took to get it uploaded? It has been some time since I did this the last time.
I am thinking about tackling the android target with my CXDeploy tool next.
 
I decided to remove the game to avoid possible copyright problems. I don't care so much for it anyway, it was mainly a test. Next time I will publish a game based on one of my own ideas :)

@Phil7
Of course, I'm not sure if I remember all steps, but I will try. I am on Arch Linux here, but I guess steps are very similiar on Windows.
I have installed all the android packages which I thought I need (which are: android-platform, android-sdk, android-sdk-build-tools, android-sdk-platform-tools, android-armv7a-eabi-system-image, android-studio) and the Oracle Java Development Kit (because I had trouble building packages with CX using the OpenJDK Development Kit).
I have generated a key using this command:
Code:
keytool -genkey -v -keystore release-key.keystore -alias release-key-alias -keyalg RSA -keysize 2048 -validity 10000
Then I moved the generated key to the build folder (not into the android build folder but to the general build folder, i.e. YOURPROJECT.buildv2019-05-05).
Inside the source code of my project, I included some preprocessor defines
Cerberus:
#ANDROID_APP_LABEL="My Game"
#ANDROID_APP_PACKAGE="com.mycompany.mygame"
#ANDROID_SCREEN_ORIENTATION="portrait"              'one of: user, portrait, landscape
#ANDROID_VERSION_CODE="1"
#ANDROID_VERSION_NAME="1.0"
#ANDROID_NATIVE_GL_ENABLED=False                    'for use with the opengl modules
#ANDROID_KEY_STORE="../../release-key.keystore"
#ANDROID_KEY_ALIAS="release-key-alias"
#ANDROID_KEY_STORE_PASSWORD="password"
#ANDROID_KEY_ALIAS_PASSWORD="password"
#ANDROID_SIGN_APP=True
Then I have build the project, using the CX compiler:
Bash:
transcc_linux -target=Android_Game -config=Release ~/Projects/YourProject/YourProject.cxs
The building process fails first, because the gradlew shell script (inside the generated android build folder) is not set to executable. I fixed this by chmoding it to be executable: chmod +w gradlew. I think this issue has been already mentioned somewhere in the forum.
I have created a Google Play Developer Account and uploaded the game there. I also needed 2 screenshots as well as a presentation image for the app. I have filled various forms required to do such as defining the app content, filling out a description etc. and then waited 4 days for getting the app published.
 
The 'warning' is because Google Play is pushing to create several builds, one for each architecture supported by Android. They 'think' because your APK is 'one fits all' it is 'bloated' and should be separated into smaller ones, for specific devices.

Thanks for the explanation! I was always wondering why they complain about my games, when there are so many boilerplate Unity "games" up there that take 10x the space... I guess in the end, everyone is ignoring that file size warning. IMHO games smaller than 2mb are never an issue for any user.
 
Back
Top Bottom