Mobile Apps: Beyond Wappler - signing and submitting

I am so close to completing my mobile app! :beers:

Where do I find my final build files for submitting and how do i ‘sign’ them?

(Edit: I found the debug .apk for android. How do I get a non-debug version? I can’t see anywhere to turn debug off.)

Can someone help me take the app beyond Wappler? (iOS and Android)

2 Likes

Hi Brad

I’m glad you’re close to completing your app. My applications are still being tested by the customer in the internal testing of Google play. I haven’t contacted iOS yet, so I can only give advice on the android platform.

Personally, I did the final build and signing of the application not through the Wappler, but through the Android Studio. To do this:

  1. First make an assembly with debugging in the Wappler.
  2. Then open the app folder in Android Studio located at platforms\android\app:
  3. After that, you can make an apk/aab build with a signature for placement on the Google Play platform:
  4. Since you haven’t created a signature yet, you will have to create it first. But this is a fairly simple linear procedure, you just need to fill in the fields and that’s it.

I will note separately about the apk/aab build. Google Play insists on switching to the aab format: https://developer.android.com/guide/app-bundle And very soon there may be difficulties with the apk. Therefore, I recommend collecting it in aab format in advance.

Also, when posting on the Google Play platform, I recommend that you do not rush to publish, but turn to their testing system. It consists of three levels:

  • internal testing
  • closed testing
  • open testing

Internal testing is very useful. It allows you to avoid any checks and delays. In internal testing, the application becomes instantly available after placement, among those to whom you give access. This greatly helps to speed up the testing procedure and communication with the customer on the project.

I wish you no errors when building the application and when it will work, as well as a speedy launch in a public format :+1:

4 Likes

Thank you so much! That should help me get started on the Android side. I so much appreciate it, @Mr.Rubi!

Now I know what I will be doing tomorrow.

Further to the above. To submit Bundles you must subscribe to the Google Play signing within the Play Developer console. All very simple after you understand the way the console is set-up (easy to get lost at first). Each release essentially has its own console. So you’ll upload your apk/bundle to its specific console by selecting the app from your repository (list of uploads). You can not self-sign bundles but you can sign apks, either in the manner Mr Rubi is directing you or by implementing in to your build process by including your key:

https://haensel.pro/apache-cordova/cordova-create-a-signed-release-apk-easy-howto

1 Like

I’m seriously excited for you @brad. Would love to see the final result. Would you also be happy to give some info on how you went about it all in Wappler? I still haven’t fully begun creating a mobile app in Wappler but am very keen to.

2 Likes

@sitestreet

Quickest way. Take an already created Project. Clone it. Open it up and add Android to it using the Platform menu. Save your Project. There is the basis for you. If you wish to use dynamic data you will then connect the Android App to your Server Actions as normal but you will be selecting the data Project from the drop down list provided when you pick your Server Actions. You must use two Projects for this side. The actual process of conversion is pretty much click and add the Platform.

1 Like

@Mr.Rubi, I don’t seem to have that option in Android Studio?

Could it be because build initially fails in Android Studio? What do these errors mean?

All I can find on the issue is

Only mention of compileSdkVersion in my gradle.build file is:

Do these errors appear in Android Studio or Wappler? When do they occur? Before opening the app folder in Android Studio, did you build the app in the Wappler, as I wrote in the guide above?

By errors:

  1. Problems with the location of your android sdk folder. Before you start working on the application, make sure that Android Studio works correctly in principle and there are no conflicts. Nothing else comes to mind. I myself have not encountered such a problem.

  2. I did not encounter the compilesdkversion error, but there is a problem with api versions, and the latest version of cordova will build the application using Android api 25, while Google Play refused to accept the application with this api version (Google Play requires version 26 and higher).

In order to install the android sdk version used in the build, I did the following:

  1. I made sure that the versions of cordova, gradle, and android sdk are updated.
  2. Before proceeding to build the application, run the following commands:

UNIX

export ORG_GRADLE_PROJECT_cdvCompileSdkVersion=android-26
export ORG_GRADLE_PROJECT_cdvBuildToolsVersion=26.0.1

WINDOWS

set ORG_GRADLE_PROJECT_cdvCompileSdkVersion=android-26
set ORG_GRADLE_PROJECT_cdvBuildToolsVersion=26.0.1

After that, I was able to build the app using the android sdk version 26, which was adopted by Google Play. This procedure you will have to do in any case, perhaps it will solve the problem under the second number.

Thank you.

I get the error in Android Studio. I am on a Mac where do I run those commands?

Save your current build.gradle (as a backup, NOT gradle.build, easy to mix the two up so be careful!) and replace everything after:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

With:

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

        classpath 'com.android.tools.build:gradle:3.3.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }

    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="28.0.3" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=29 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And see if that rectifies the issue Brad?

1 Like

Make sure in the Android Studio SDK Manager you have the Build Version installed (now up to version 30 which will be required from August, but for now 28 and above are good, and all are backward compatible pretty much). VERY IMPORTANT to install the Android version SDK’s! We usually go with the last three versions, including the latest. Which covers most Android devices in use.

Yeah, I already have all the SDK installed and updated. :frowning:

It builds fine in Wappler but not in Android Studio. So I assume the issue is there but not sure how to fix it.

Did you replace the contents of build.gradle as directed above Brad?

Yes, same issue. I am just doing an install of every possible thing to install in Android Studio.

Make sure you import the location (directory) Wappler outputs when you import in to Android Studio, ie the path to the release directory as outputted by Wappler. Is this so with your Android Studio import?

But you want to aim Android Studio to the directory not the file.

And you’ll probably need to create a configuration file for the application if you have not already done so?

Hmmm, that’s an interesting thought. Indeed there is no device recognized. But what do I choose in the configuration?

Template - Android App. Name it and restart Android Studio as sometimes it can be a bit of a gimp reflecting changes…

:wink:

After doing the above you may also have to update or add to the Project Structure in Android Studio Brad, can’t remember…