Logging Device Tokens

John Craig john at splash21.com
Thu Aug 9 16:09:34 EDT 2012


Hi, Dan.   The following info will hopefully help, or at least give you 
some ideas.  I wrote a 'draw something' style app at the beginning of 
the year and although it's never been released, it's delivered thousands 
of push notifications on the test service.  The scripts run on an on-rev 
server.  The links below are on another server that doesn't parse .lc 
scripts, so they should show up fine in your browser.

Script that runs on LiveCode server and is successfully delivering push 
notifications in a test app;
http://splash21.com/info/notify.lc

I'm also using Mark Smith's libJson 1.0.1b (you'll see it referenced in 
the above);
http://splash21.com/info/json.lc

I've used this script since LC server's been around for MySQL - basic, 
but it does what I need it to do  ;)
http://splash21.com/info/mysql.lc

Here's the MySQL structure of the table I use to record device info;
http://splash21.com/info/devices.sql




On 06/08/2012 22:29, Dan Friedman wrote:
> Mike,
>
> THANK YOU for the information.  I am wondering what you use to log the Tokens?  Do you have the app fire a PHP script on your server that writes it down?  What are you using to store the data?  Flat files, like XML?  Or a database?
>
> Thanks for the advise!
> -Dan
>
>
>
>> Nope, you aren't crazy.  There is a reason you have to do this - because
>> you have to know who wants to receive push and who does not - and since
>> different users may have different settings, you need to be able to
>> customize those messages.
>>
>> Think about a weather app that uses push - the users are from all over.
>>   You need to be able to push custom alerts/forecasts/etc.
>>
>> It is a lot easier than you might think, and thousands/millions of records
>> are just numbers.
>>
>> Yes, you need to have a server somewhere that you can talk to from your app
>> to send the custom settings.
>>
>> You also need to check with APNS to make sure that user x is still on the
>> push list, since they can manually disable push in the Notifications
>> preferences, which you are then expected to respect (read the notes from
>> Apple on this).
>>
>> It works great, and I just want to thank RR for implementing push/local
>> notifications, and for John Craig for putting up the example that made
>> coding it easier when I was still trying to make it work.
>>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the Use-livecode mailing list