Windows Simulator 2013.1047 Target App Store?

Under the new daily build of 2013.1047 there is an option for Target App Store.

I can understand why there is the Nook, Amazon and Google Play, but what is the difference between building for Google Play and the Samsung Store?

Previously I just build for ‘android’ and submitted to both these stores using the same build with success, so now a little confused why there are two options for google play and the samsung store.

[import]uid: 179960 topic_id: 37194 reply_id: 67194[/import]

We’ve added a new API called [lua]store.target[/lua] which returns a string indicating which store your app is targeting. It’ll return one of the following strings:

  • “google” for Google Play
  • “samsung” for the Samsung app store
  • “amazon” for the Amazon app store
  • “nook” for B&N’s nook app store
  • “none” for generic Android builds that do not target an app store.
  • “apple” for all iOS builds.

This allows your app to determine which store it is targeting at runtime so it knows which marketplace features are available to it such as in-app purchase, displaying the app rating dialog, and in the near future… Google Licensing (LVL) support and expansion file support which are Google Play only features. Having the app recognize which app store it belongs to at runtime has proven to be absolutely necessary as we’re adding more marketplace specific features.

Also, this makes it easier for us to support other Android app-stores/platforms, such as Ouya. :slight_smile:
Ouya comes with its own SDK including its own in-app purchase system, game network, and API for determine which keys refer to which buttons on the ouya control pad. Every Android platform does things a bit differently (such as in-app purchase) making this more and more important.

We plan on updating our store API documentation next week. This is just a sneak peek at things to come. [import]uid: 32256 topic_id: 37194 reply_id: 145461[/import]

Sounds great Joshua, thanks for the quick and informed response.

Does that mean from now on if I want to create a rating button for instance instead of using:

local options =  
{  
 iOSAppId = "1234567890",  
 nookAppEAN = "0987654321",  
 supportedAndroidStores = { "google", "samsung", "amazon", "nook" },  
}  
native.showPopup("rateApp", options)  

I would use:

local options =  
{  
 iOSAppId = "1234567890",  
 nookAppEAN = "0987654321",  
 supportedAndroidStores = store.target,  
}  
native.showPopup("rateApp", options)  

If this is the case then that’s great as it saving having to change my code for every store that I build for. The rest sounds great too. Ouya!!! [import]uid: 179960 topic_id: 37194 reply_id: 145462[/import]

Joshua, is there an ETA on the Google Licensing support? [import]uid: 145848 topic_id: 37194 reply_id: 145466[/import]

Icy Spark,
Yes, you can feed “store.target” into the “supportedAndroidStores” list. That’ll work perfectly. :slight_smile:
We actually want to modify the rateApp dialog to automatically choose the targeted store, making it even easier.

chronon,
Our Google licensing feature is pretty much done, pending review. We’re currently writing up the API documentation and sample code now. We’re hoping it’ll be done by the end of next week. There will be a new “license” API where you have to opt-in to verifying your app with Google Play, letting you decide what to do when an app is not verified, which may be okay if it is a free app. The key thing here is that you only want to verify your app if it is targeting Google Play.
[import]uid: 32256 topic_id: 37194 reply_id: 145471[/import]

Joshua, can you explain how to use store.target? I’m trying to use it in the way Icy Spark suggests, but store.target is crashing with a runtime error (Attempt to index global ‘store’ (a nil value). Even if I just try to print store.target it is nil. I’m using build 1049.

-Stephen [import]uid: 9422 topic_id: 37194 reply_id: 145529[/import]

Hi Stephen.

I haven’t got round to testing this myself bu have you tried

local store = require("store")  

prior to using store.target? [import]uid: 179960 topic_id: 37194 reply_id: 145530[/import]

D’oh! That worked, Icy Spark! Thanks for that.

On the simulator store.target returns “none”, and installed on my iPad I was able to redirect to my app’s review page on the App store. Haven’t tried it yet on Android devices.

-Stephen

EDIT: hmm… Didn’t work on a Kindle Fire to Amazon store or a Galaxy Tab to the Google Play Store. No visible error so I suspect store.target must be being seen as “none” on those devices. [import]uid: 9422 topic_id: 37194 reply_id: 145533[/import]

Stephen,

The [lua]supportedAndroidStores[/lua] property expects to receive an array of strings. It should look something like this…
[lua]
supportedAndroidStores = { store.target }
[/lua]

As a test, you can also try printing the store target string to the Android log to give you confidence that it is working…
[lua]
local store = require(“store”)
print("Store Target = " … tostring(store.target))
[/lua]

At the moment, store target is hard coded to “none” in the Corona Simulator. We haven’t decided what to do about it there yet. At least for the generic Android devices such as the Droid and Galaxy SIII.

Anyways, I hope this helps. [import]uid: 32256 topic_id: 37194 reply_id: 145543[/import]

Hi Joshua, Looks like I didn’t put the store.target in brackets to make it an array. Now that I’ve done that it’s working as expected on Galaxy Tab to Google Play store and Kindle Fire to Amazon app store. Thanks for the help. EDIT : removed my code sample since the network connection check I was using was too slow.

 

We’ve added a new API called [lua]store.target[/lua] which returns a string indicating which store your app is targeting. It’ll return one of the following strings:

  • “google” for Google Play
  • “samsung” for the Samsung app store
  • “amazon” for the Amazon app store
  • “nook” for B&N’s nook app store
  • “none” for generic Android builds that do not target an app store.
  • “apple” for all iOS builds.

This allows your app to determine which store it is targeting at runtime so it knows which marketplace features are available to it such as in-app purchase, displaying the app rating dialog, and in the near future… Google Licensing (LVL) support and expansion file support which are Google Play only features. Having the app recognize which app store it belongs to at runtime has proven to be absolutely necessary as we’re adding more marketplace specific features.

Also, this makes it easier for us to support other Android app-stores/platforms, such as Ouya. :slight_smile:
Ouya comes with its own SDK including its own in-app purchase system, game network, and API for determine which keys refer to which buttons on the ouya control pad. Every Android platform does things a bit differently (such as in-app purchase) making this more and more important.

We plan on updating our store API documentation next week. This is just a sneak peek at things to come. [import]uid: 32256 topic_id: 37194 reply_id: 145461[/import]

Sounds great Joshua, thanks for the quick and informed response.

Does that mean from now on if I want to create a rating button for instance instead of using:

local options =  
{  
 iOSAppId = "1234567890",  
 nookAppEAN = "0987654321",  
 supportedAndroidStores = { "google", "samsung", "amazon", "nook" },  
}  
native.showPopup("rateApp", options)  

I would use:

local options =  
{  
 iOSAppId = "1234567890",  
 nookAppEAN = "0987654321",  
 supportedAndroidStores = store.target,  
}  
native.showPopup("rateApp", options)  

If this is the case then that’s great as it saving having to change my code for every store that I build for. The rest sounds great too. Ouya!!! [import]uid: 179960 topic_id: 37194 reply_id: 145462[/import]

Joshua, is there an ETA on the Google Licensing support? [import]uid: 145848 topic_id: 37194 reply_id: 145466[/import]

Icy Spark,
Yes, you can feed “store.target” into the “supportedAndroidStores” list. That’ll work perfectly. :slight_smile:
We actually want to modify the rateApp dialog to automatically choose the targeted store, making it even easier.

chronon,
Our Google licensing feature is pretty much done, pending review. We’re currently writing up the API documentation and sample code now. We’re hoping it’ll be done by the end of next week. There will be a new “license” API where you have to opt-in to verifying your app with Google Play, letting you decide what to do when an app is not verified, which may be okay if it is a free app. The key thing here is that you only want to verify your app if it is targeting Google Play.
[import]uid: 32256 topic_id: 37194 reply_id: 145471[/import]

Joshua, can you explain how to use store.target? I’m trying to use it in the way Icy Spark suggests, but store.target is crashing with a runtime error (Attempt to index global ‘store’ (a nil value). Even if I just try to print store.target it is nil. I’m using build 1049.

-Stephen [import]uid: 9422 topic_id: 37194 reply_id: 145529[/import]

Hi Stephen.

I haven’t got round to testing this myself bu have you tried

local store = require("store")  

prior to using store.target? [import]uid: 179960 topic_id: 37194 reply_id: 145530[/import]

D’oh! That worked, Icy Spark! Thanks for that.

On the simulator store.target returns “none”, and installed on my iPad I was able to redirect to my app’s review page on the App store. Haven’t tried it yet on Android devices.

-Stephen

EDIT: hmm… Didn’t work on a Kindle Fire to Amazon store or a Galaxy Tab to the Google Play Store. No visible error so I suspect store.target must be being seen as “none” on those devices. [import]uid: 9422 topic_id: 37194 reply_id: 145533[/import]

Stephen,

The [lua]supportedAndroidStores[/lua] property expects to receive an array of strings. It should look something like this…
[lua]
supportedAndroidStores = { store.target }
[/lua]

As a test, you can also try printing the store target string to the Android log to give you confidence that it is working…
[lua]
local store = require(“store”)
print("Store Target = " … tostring(store.target))
[/lua]

At the moment, store target is hard coded to “none” in the Corona Simulator. We haven’t decided what to do about it there yet. At least for the generic Android devices such as the Droid and Galaxy SIII.

Anyways, I hope this helps. [import]uid: 32256 topic_id: 37194 reply_id: 145543[/import]

Hi Joshua, Looks like I didn’t put the store.target in brackets to make it an array. Now that I’ve done that it’s working as expected on Galaxy Tab to Google Play store and Kindle Fire to Amazon app store. Thanks for the help. EDIT : removed my code sample since the network connection check I was using was too slow.