OneSignal

I love OneSignal. For those that don’t know they provide mobile push notification for your apps. They recently also added e-mail notifications. There are other providers that do this, but I have not found any that are low-cost or free. OneSignal is free. Completely free. It doesn’t matter how small or large you are. I never question a company revenue methods. I was just glad it was free.

I used them for years for cuadros. When the GDPR deadline approached I looked at what kind of data they collected and for what purpose to add it to the consent dialog. And then I realized that the reason that it is free, is because they collect data to sell. As with most of these privacy policies, they amount to a bunch of maybe will collect this data or that data statements.  I didn’t feel comfortable adding all that information to the consent dialog and I didn’t think anybody would consent to the random list of possible data elements.

Fast forward to a few weeks ago. The Corona plugin is a native plugin meaning that OneSignal wrapped up their iOS and Android plugin in a Lua facade. The Corona plugin has not been updated in a while which resulted in a nasty bug when building for Oreo (probably Pie also).

Since it appeared that it was not going to be fixed in a reasonable timeframe I decided to use their REST API to create a fully Lua solution. I also figured that I could limit or at least know exactly what data I would be sending and this would make the process of being GDPR compliant easier.

Last week was a long weekend, and I didn’t have any day work spill over to the weekend. So I took the opportunity to write it. I am excited that I’ll be able to inform users of new features and other random things. Don’t worry, I know less is more when we talk about push notification.

Advertisements

Gamehouse and QuickLua

The nice people at MadeWithMarmalade are running a promotion with gamehouse where if you integrate their game network promotion api you win money and a Marmalade license extension. There are some stiff requirements (at least for me and my apps) to get the incentives, but I decided to integrate a couple of my apps just to see what it was like (and because I am on vacation with nothing to code). What I found out is that unlike most tap or impression exchanges, gamehouse will show your app thousands a time a day for free (at least during their beta period).

Two of the apps I integrated gamehouse with are written in C++ (what all the instructions are written for), but one of my app I used Marmalade’s Lua api. What follows is how I got the gamehouse extension working with my Lua project.

1. Download the gamehouse Marmalade extension from here:  http://gpn.gamehouse.com/sdk

2. Once the sdk is unzipped copy the gamehouse folder to the extension folder inside your marmalade folder. In my case that is: C:\Marmalade\7.1\extensions.

3. Modify your project .mkb to include the gamehouse extension in the sub-project section. Your subproject section should look like this (unless you have added other projects):

options
{
s3e-data-dir = resources
app-icf = ‘resources/common.icf,resources/app.icf’
}

subproject
{
gamehouse/gpn
}

4. Download the files located here: https://devnet.madewithmarmalade.com/questions/18739/gamehouse-and-quick-integration.html.

Place the header file in the header folder. On my machine it is located here: C:\Marmalade\7.1\quick\include.

And the source file here: C:\Marmalade\7.1\quick\source

5. Modify quickuser.mkf located here: C:\Marmalade\7.1\quick

By adding  the two files you just added. It should look something like this after your changes.

includepath .

files
{
quickuser_tolua.cpp
quickuser_tolua.pkg
quickuser.h

#Gamehouse c++ files.
include/CGGameHouse.h
source/CGGameHouse.cpp
}

6. Modify quickuser_tolua.pkg also located here: C:\Marmalade\7.1\quick by adding the reference to the header file. Your file should look something like this:

//——————————————————————————
// Mark-up in header files
//——————————————————————————
$cfile “quickuser.h”
$cfile “include/CGGameHouse.h”

7. Run the quickuser_tolua.bat file. According to the documentation it should be located here: C:\Marmalade\7.1\quick. Unfortunately I have not seen it in a few releases. If you don’t have it either copy it from the same folder but the 6.4 install (the last version that had it for me).

8. At this point you can either open the quick_prebuilt.mkb or any of your Quick project in Visual Studio and compile it using the x86 Debug target.

9. From within your Lua project now you should be able to initialize gamehouse by calling:

gameHouse.initGameHouse(“yourGameHouseAppKey”)

and request the display of the ad by calling:

gameHouse.presentAd()

10. Remember to add the required items for the particular platform you are deploying it to. For example for Android you need to add the required activity to the android manifest file. Instructions can be found in the gamehouse integration document found in this thread: https://devnet.madewithmarmalade.com/questions/18456/how-can-i-integrate-the-gamehouse-extension.html

That is all, if you run into problems let me know and I’ll try to help. I am back to bill paying work after the new year.