v-play-2-14-2-how-to-use-vplay-plugins-with-live-reloading

Release 2.14.2: Live Code Reloading with Native Cross-Platform Plugins

By Alex

V-Play 2.14.0 introduced V-Play Live Code Reloading, which reduces your deployment time from minutes to seconds. V-Play 2.14.2 now adds support for using native cross-platform plugins with live code reloading.

2.14.2 also adds improvements to the SocialView components and adds improvements for Navigation components.

What is V-Play Live Code Reloading

V-Play Live reloads your project on every connected device, within seconds after code changes. This reduces the long compilation and deployment times, to only a couple of seconds. V-Play Live also allows you to run and test your applications on iOS from a Windows or Linux desktop. You don’t need to install any native SDKs for deployment with V-Play Live.

how-does-v-play-live-work-compared-with-standard-deployment

Watch this video for a quick demo of V-Play Live in action:

 

V-Play Live displays your app or game with the Live Client application. The desktop Live Client is part of your V-Play installation. For Android and iOS, you can download the Live Client apps in the app stores. For most projects those Live Client apps are sufficient. They have several V-Play Plugins and most of the Qt modules configured, so you can use them with V-Play Live.

Soon you will have the option to extend your own project with the live reloading feature, to build custom Live Clients. This allows you to use any custom C++ or native code together with live reloading for QML & JavaScript. This will also make it possible to use even more V-Play Plugins and features with V-Play Live.

How to Use V-Play Live

V-Play Live is super easy to use. We already covered that in our last blog post, you can read it here: How to use V-Play Live

What are V-Play Plugins

Do you want to add advertisements to your app or game? Do you want to add analytics to track and understand your audience? Do you need push notifications or other cloud services?

V-Play got you covered! With V-Play Plugins, you can add such native cross-platform plugins with just a few lines of code.

 

v-play-native-cross-platform-plugins

 

Beginning with V-Play 2.14.2, you can use many of those plugins also with V-Play Live. This helps you test a plugin without performing any extra setup steps. V-Play Live has several plugins configured already, so you can use them right away. For some plugins, this is not possible yet.

Use V-Play Plugins with V-Play Live

Here is a short video showing how to use V-Play Plugins with V-Play Live:

 

The following list shows which plugins you can already use with V-Play Live. There are no extra setup steps needed. For some services you will need to create an account at the service provider website. You can find the website links in the code examples below.

Access V-Play Plugins

To use V-Play Plugins in your QML code, add

import VPlayPlugins 1.0

at the top of your QML file.

Google AdMob

The AdMob plugin offers several ad formats to optimize your monetization. It features banner ads, interstitial ads and rewarded videos.

AdMobBanner {
  // this is a public test Id, you can create your own at www.google.com/ads/admob/
  adUnitId: "ca-app-pub-3940256099942544/6300978111"
}

You can test the code examples in this post like this:

import QtQuick 2.0
import VPlayApps 1.0
import VPlayPlugins 1.0

App {
  NavigationStack {
    Page {
      title: "AdMob"

      AdMobBanner {
        adUnitId: "ca-app-pub-3940256099942544/6300978111"
      }
    }
  }
}

Chartboost

Charboost is another advertisement service that offers interstitial ads. You can also use it to cross-promote your apps & games.

Chartboost {
  appId: "your App Id from www.chartboost.com"
  appSignature: "your App Signature from www.chartboost.com"
  shouldRequestInterstitialsInFirstSession: true
 
  onPluginLoaded: {
    cacheInterstitial()
  }
  onInterstitialCached: {
    chartboost.showInterstitial()
  }
  onInterstitialFailedToLoad: {
    console.debug("InterstitialFailedToLoad at location:", location, "error:", error)
  }
}

Google Analytics

Google Analytics offers in-depth analysis how users interact with your apps & games.

GoogleAnalytics {
  propertyId: "your Property Id from analytics.google.com"
  
  onPluginLoaded: {
    logEvent("V-Play Live","Test App Loaded","Test Events", 1)
  }
}

Flurry Analytics

Flurry is another popular analytics service that’s provided as V-Play Plugin. Here is a short example how to use it:

Flurry {
  id: flurry
  apiKey: "your Api Key from y.flurry.com"

  onPluginLoaded: {
    flurry.logEvent("App started");
  }
}

V-Play Game Network & Cloud Services

V-Play Game Network offers cross-platform leaderboards and achievements. You can also use an integrated cloud storage for your apps & games.

You can find more about the offered services here: V-Play Game Network & Cloud Services

V-Play Multiplayer & Social Services

V-Play Multiplayer enables you to create real-time and round-based multiplayer games. You can also use those features in your apps, and connect your users with the integrated chat system.

You can read more about the offered services here: V-Play Multiplayer & Social Services

Local Push Notifications

Schedule local notifications based on an upcoming point in time or a time interval.

This code examples schedules a notification 5 seconds after pressing the button. If you close the app, or move it to the background, the notification will be received as push notification.

NotificationManager {
  id: notificationManager
  onNotificationFired: {
    // Log output when the notification is fired. You can find the log output in the Live Server
    console.debug("Notification fired: " + notificationId)
  }
}

Notification {
  id: testNotification
  notificationId: "testNotification"
  message: "Hey there!"
  timeInterval: 5 // in seconds
}

AppButton {
  text: "Schedule Notification"
  onClicked: {
    // Cancel old notification if scheduled
    notificationManager.cancelNotification(testNotification.notificationId)
    // Schedule testNotification
    notificationManager.scheduleNotification(testNotification)
  }
}

More Plugins

You can find the full list of V-Play Plugins here: V-Play Plugins

The following plugins will have no or limited functionality with V-Play Live at the moment: In-App purchases, Facebook, Google Firebase, Game Center, Google Cloud Messaging, OneSignal, HockeyApp.

Of course, you can still use those plugins with standard local deployment, as used to. Nothing changes for your existing projects.

SocialView Improvements

This update brings many new features for the SocialView. For example, you can now search users and start new chats with the newMessagePage. It is even possible to create a custom user search with the SocialUserSearchPage base type.

business-meet-and-chat

For a guide how to best use the SocialView in your projects, please see How to Add In-App Chat or Gamification Features to Your Mobile App.

Navigation Fix

The update also brings a fix for triggering NavigationItem signals like onSelected.

Changelog

For a full list of improvements and fixes to V-Play in this update, please check out the change log!

 

How to Update V-Play

Test out these new features by following these steps:

  • Open the V-Play SDK Maintenance Tool in your V-Play SDK directory.
  • Choose “Update components” and finish the update process to get this release as described in the V-Play Update Guide.

V-Play Update in Maintenance Tool

If you haven’t installed V-Play yet, you can do so now with the latest installer from here. Now you can explore all of the new features included in this release!

 

 

 

More Posts Like This

v-play-2-14-1-live-reloading-windows-mac-linux-ios-android-qt

Release 2.14.1: Update to Qt 5.9.3 | Use Live Code Reloading on macOS and Linux

v-play-live-reloading-windows-mac-linux-ios-android-qt

Release 2.14.0: Live Code Reloading for Desktop, iOS & Android

 

feature

How to Make Cross-Platform Mobile Apps with Qt – V-Play Apps

No Responses

Leave a Reply

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