I have an Appcelerator question.
Is there somekind of callback for new ACS reviews? One way to do this
is to make the app refresh every x-seconds.. but this will quickly use too much resources.
Imagine 10 people use it for 10 minutes, with auto-refresh set for 10 seconds.. it will amount to 10x6x10 = 600 API calls! And that is only for 10 people for 10 minutes, and what if they are online for 1 month??
So having a callback which notifies only if there is a NEW review will greatly of help here.
Is there actually a way doing this that I've missed, or other workarounds? Thanks!
One possible solution is through push notifications?
Related
For the google actions that i am developing some responses are complex and take more than 5 seconds to process.
Could someone please suggest how can this be handled.
Generally i would consider using loading dots and then replacing that message with the result but i don't see any Google Action API for it. Also is there any endpoint to which we could async send back the result later ?
Thanks
PS: I am using Conversation API.
We don't really have a good way to handle this right now, but we have a couple of approaches that sorta work based on your needs.
Notifications are currently available for the Assistant on smartphones, and they're coming for speakers. In some cases, it might make sense to say that you're working on the problem and you'll send a notification when you have it, and then resume the conversation from the notification.
Another approach is to use the Media Response to play a bit of "hold music". At the end of the segment of music, your webhook will get a notice that the music has completed. If you have the result available, you can report it at that time.
I am going to use Laravel 4 queues and integrate them with Iron.io
All of that is pretty straight forward, and I dont think I am going to have problems with that.
Thing that interests me is what is the best way to get status once task is completed?
Iron.io is going to do return call to my server to trigger job, and once that job completes I need to notify user about that...
How could I store this responses, and still be aware of job its related to, because there will be number of different job types?
I would like to hear how did you implement this.
Thanks
As Joseph pointed out in the comments, you'll need to:
Hopefully have a job quick enough for it to be finished when a user is still in browser
Use some sort of way to PUSH data back to your web browser.
The popular methods are:
Websockets
Server-sent events
Long polling - with ajax
I know quite a few questions have been asked around this topic; however, am penning this as they don't seem to specifically answer my question, & some don't have any correct answer listed.
What I want to do in my iPhone App
Fetch some data when the App is not running (basically, it's a prefetch, so as to quicken it when the user uses the App the next time). What's the best way to do this?
Some Potential Solutions
Those that I could think of & some from Stackoverflow & such resources:
Possibility 1 : Fetch the data at a specific time of the day (maybe after midnight ?). Am not seeing 'clearly' how to do this if this this possible in the first place. Some suggest using a NSTimer -> but the timer is put off when the application is suspended, right?
Possibility 2 : Using local notification (?) But I see that Apple's documentation specifically mentioning that notification is to be used to convey something to the user & so this would defy Apple's doc then, right?
Possibility 3 : Through applicationDidEnterBackground -> beginBackgroundTaskWithExpirationHandler . This wouldn't run the fetch at a specific time of the day though. However, it might serve its purpose of 'pre'-fetching. Is this better than the other two?
Any thoughts please?
as you already know that none of the option you have presented are not going to work with ios and user can always close the background applications anyway so I would suggest that it'd be a good idea to fetch the data for next calendar day whenever the app is running.
As samfisher is saying none of your specs. fit with the Apple active background requirements. The only thing that I can suggest you is to use the beginBackgroundTaskWithExpirationHandler I understand that is a "post fetching" instead of prefetching but I guess is the only way.
The other way, but is a little bit trickier, is masquerade your prefetching with some sort of geolocation, in this way you could opt for an active background. This involve a lot of aspects such as:
Appstore rejection
Battery consumption
There are plenty of app on the appstore that use this trick, I can remember one that calculate data traffic.
I know there's a few questions knocking around on this topic but none quite the same.
I'm currently searching by location for all the pages relating to a particular geographic location and caching their events in a database. The problem being I have to currently loop through all the pages i'm watching frequently to check for updates.
At the moment the >10,000 Pages I'm keeping track of takes a good while to update. It would be much neater (and nicer to fb) to be notified instead of polling.
Does anyone know of a more efficient to do this?
Thanks
Ben
There is an API called Real-time Updates. You will have to register an http-server. Facebook will send a POST request with the related changes. You cannot subscribe to all connections but events are okay. I haven't tried it but it should work for you.
Searching for "[facebook] real time updates events" here on Stack Overflow gives 5000+ results. So I think, there should be some usable code somewhere.
I'm using LocalNotication to set schedule Alarm. atribute repeatInterval allow me to set repeat each minute, each hour.. But I want to set repeat each two minutes? How can i do?
try looking at this blog posting
http://useyourloaf.com/blog/2010/9/13/repeating-an-ios-local-notification.html
You can schedule 30 alarms. One for each 2nd minute for a whole hour, and set repeatInterval to each hour fo each of the 30 notifications.
I've filed a bug report/enhancement at http://bugreport.apple.com/
You may take a look at my report archived at Open Radar: http://openradar.appspot.com/radar?id=759402
According to Marco, developer of Instapaper, Apple prioritizes enhancement and feature requests partly based on how many developers are requesting them.
If this feature is important to you I urge you to file a report as well.