unique URL -> user phone -> Corona App

I want to make an app for a collection of users. They are all essentially “customers”, and I have their names, phone #s, email, etc. in a database.  For those that I can convince to load this app on their phones, I want to connect that app to what is essentially their “account” on my backend server.  I specifically do not want them to have to start the app, enter some account ID, password, etc. When the app starts up, it needs to connect to the backend server in a way that lets me uniquely identify the customer.

Most ideal, the app starts up and is able to send an HTTP request that includes some uniquely identifying piece of information (can I get at and transmit the phone#?) so that the backend knows who it is and can send back custom ID info that the app can use on all future interactions.

Second best, I transmit a unique URL (includes token identifying that unique user) to their email address, they tap on it in their phone, and somehow it gets that info to the Corona app so it has it next time it starts up (no idea if that kind of cross-app data sharing is available via Corona).

It’s really the initial “stamping” of that app with a customer ID of some sort that is the only trick. It would have to work with iPhone, Android, and (being in Microsoft’s back yard) Windows phone would be really nice. I’m initially trying to avoid push notifications, both because I don’t want the server-side complexity for a demo app, and because I fear it would quickly get abused, causing customers to uninstall the app. But, if that were the only way to go for the lowest-friction experience, I would have to look at that route (but I think I read that the push plug-in doesn’t support Windows phone, which is a minus).

Can someone give me a handwaving overview of what my options are to accomplish something like this?

In the mobile app world, privacy is super important and vendors like Apple and Google continue to try and restrict access that can uniquely identify a device. Blindly sending a phone number would most certainly be a no-no for Apple and you generally can’t get that info. Android requires a permission to access phone data (Corona SDK can’t get it anyway, but you could with Corona Enterprise) and that phone permissions is a huge turn off to Android users.

There is a plugin for iOS called OpenUDID that will get you a unique identifier, but you wouldn’t have a way to tie that to the user with just that data. I think we can still get the AdvertiserID on Android which is a unique value there when you include the AdMob plugin.

The second method of sending an email message would work for certain on iOS. You have to define a URL scheme in your build.settings that identifies your app. Lets say your app is called “MyData”, you could register “mydata://” as a URL scheme. Then you could pass key-value pairs after the //:  “mydata://?name=fred&home=bedrock”. When that URL is tapped, your Corona SDK app will start up and you will get the key-value pairs passed into something called “launchArgs”.

Android as a similar system, I just don’t know the exact steps for that. A Google search should help narrow in on it. I’m not sure what your Windows Phone 8 options are. They have to have something similar.

Rob

Thanks Rob! I’ll study up on the URL scheme options.

In the mobile app world, privacy is super important and vendors like Apple and Google continue to try and restrict access that can uniquely identify a device. Blindly sending a phone number would most certainly be a no-no for Apple and you generally can’t get that info. Android requires a permission to access phone data (Corona SDK can’t get it anyway, but you could with Corona Enterprise) and that phone permissions is a huge turn off to Android users.

There is a plugin for iOS called OpenUDID that will get you a unique identifier, but you wouldn’t have a way to tie that to the user with just that data. I think we can still get the AdvertiserID on Android which is a unique value there when you include the AdMob plugin.

The second method of sending an email message would work for certain on iOS. You have to define a URL scheme in your build.settings that identifies your app. Lets say your app is called “MyData”, you could register “mydata://” as a URL scheme. Then you could pass key-value pairs after the //:  “mydata://?name=fred&home=bedrock”. When that URL is tapped, your Corona SDK app will start up and you will get the key-value pairs passed into something called “launchArgs”.

Android as a similar system, I just don’t know the exact steps for that. A Google search should help narrow in on it. I’m not sure what your Windows Phone 8 options are. They have to have something similar.

Rob

Thanks Rob! I’ll study up on the URL scheme options.