Forums

OverviewFelgo 2 Support (Qt 5) › License Warning Cloud Builds (Android)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23352

    Sylvia Winkler

    Hi,

    I’m trying to build an Android version of my app with Cloud Builds. My app includes a little game in a NavigationStack (GameWindowItem). I’m having issues regarding licenses.

    Here’s what I’ve done:

    1. Generate License Key with version code: 1

    2. Add (the same) license key to: project.pro, Main.qml and my GameWindowItem

    3. In project.pro, set
    PRODUCT_VERSION_NAME = 1.0.0
    PRODUCT_VERSION_CODE = 1

    4. In AndroidManifest.xml, set
    android:versionName=„1.0.0“ android:versionCode=„1“

    5. In config.json,set
    “versioncode”: 1,
    “versionname”: „1.0.0“,
    “stage”: “publish”

    6. Clean project

    7. Push to my git-repo and build. I also tried different build configurations:
    a) Build Configuration: Overwrite Version Name: 1.0.0, Overwrite Version Code: 1, Update License key: unchecked
    b) Build Configuration: Overwrite Version Name: empty, Overwrite Version Code: empty, Update License key: unchecked
    c) Build Configuration: Overwrite Version Name: 1.0.0, Overwrite Version Code: 1, Update License key: checked

    For all I got the same results.

    Result:

    ARMv7 apk -> App works fine, for the game I get „This license key is invalid. Do you want to request a new licenseKey now? Invalid license reason: “

    ARMv8 apk -> As soon as the app is started I get „This license key is invalid. Do you want to request a new licenseKey now? Invalid license reason appVersionCodeDoesntMatch“. The game works as intended, with no license key warning.

    When I looked into the build logs I found that v7 gets the following outputs:

          |   Version Name | ‘1.0.0’

          |   Version Code |  1

    And v8

          |   Version Name | ‘1.0.0’

          |   Version Code |  2

    Output for v8 seems a bit odd to me, since they are from the same build (and all variations of build configurations).

    I’d love to know how I can fix this issue and publish my app without any license warning.

    Thanks in advance,
    Sylvia

    #23372

    Alex
    Felgo Team

    Hi,

    for Cloud Builds, you should make use of the feature to “Automatically increase version code and license key”. You can find a guide how to use this setting in this post: https://felgo.com/blog/android-64-bit-support-felgo-qt-cloud-builds

    For submissions of an Android app, you need to include both an ARMv7 and an ARMv8 (64-bit) APK, which need to have a different version code. This is why you see Cloub Builds increasing the version code for v8.

    The post that I linked shows tips for both manual building and using Cloud Builds, to handle the different architectures. The most important thing to know is, that a license key is bound to a specific version number, thus for every increase of the version number, a new license key is required. Cloud Builds can handle this for you automatically.

    Best,
    Alex

    #23400

    Sylvia Winkler

    Hi,

    thanks for the explanation. That makes sense. But I’m still left with the problem that the license for the game seems to be invalid: „This license key is invalid. Do you want to request a new licenseKey now? Invalid license reason: “

    My code looks like the following:

    App {
    
        licenseKey: "1234..."
    
        Navigation {
            NavigationItem {
                NavigationStack {
                    Page {
                        id: gamePage
    
                        AppButton {
    
                            text: "Start"
    
                            onClicked: {
                                gamePage.navigationStack.push(component)
                            }
                        }
    
                        Component {
                            id: component
    
                            Page {
                                GameWindowItem {
                                    id: gameWindowItem
    
                                    licenseKey: "1234..."
                                }
                            }
                        }
                    }
                }
            }
        }
    }

     

    I’m using the same license key for the game and for the application, but I’m always getting the error mentioned above. Is there anything I can do to avoid this behaviour?

    Thanks in advance,

    Sylvia

    #23493

    Alex
    Felgo Team

    Hi Sylvia,

    the GameWindowItem is not intended to be used like that, it is actually only used for plain Qt Apps (e.g. with Window as root) that include Felgo Plugins.

    Anyway, something like that could work for you:

    import Felgo 3.0
    import QtQuick 2.0
    App {
      Component {
        id: gamePageComponent
        Page {
          Scene {
            id: scene
            // allow scene to fill whole page, regardless of safe area insets
            // page already covers safe area as well, see Page::useSafeArea
            useSafeArea: false
            sceneGameWindow: parent // scale scene to parent, instead of "GameWindow" item with default id "gameWindow"
            scaleMode: "letterbox" // set chosen scalemode
            // fills the sceneGameWindow
            Rectangle {
              anchors.fill: scene.gameWindowAnchorItem
              color: "lightgreen"
            }
            // fills the scene, which is scaled to fit into the game window
            Rectangle {
              anchors.fill: parent
              color: "lightyellow"
              Text {
                anchors.centerIn: parent
                text: "Scene"
                font.pixelSize: 20
              }
            }
          }
        }
      }
      Navigation {
        NavigationItem {
          title: "Tagebuch"
          icon: IconType.book
          NavigationStack {
            Page {
              id: diary
              title: "Tagebuch"
              Page {}
            }
          }
        }
        NavigationItem {
          title: "Spiel"
          icon: IconType.book
          NavigationStack {
            Page {
              id: gamePage
              AppButton {
                text: "Start"
                onClicked: {
                  gamePage.navigationStack.push(gamePageComponent)
                }
              }
            }
          }
        }
      }
    }

    Best,
    Alex

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support