Harmattan: How to listen for incoming sms event - meego-harmattan

Is there any example for Meego Harmattan that I can look at so that I can develop an app that is aware of incoming sms/mms/email event? I looked through the Developer Libraries, API Topics, API Libraries but couldn't find any explicit examples/documentations that say how to do it.
Any input would be appreciated.
Regards,

The QtMobility Messaging API documentation provides examples on how to listen to messaging events. See http://doc.qt.digia.com/qtmobility-1.2/messaging.html (in the end there are two examples)

Related

Portability check with Twilio

I am trying to determine if a number is portable to the Twilio platform.
Other providers have portability/eligibility APIs that I can use for this purpose, but I can't seem to find anything equivalent for Twilio.
Am I missing something? How can I check if a number is portable to Twilio?
Twilio doesn't offer an API or page where users can check this currently (although this is under investigation). The best approach today is opening a support ticket with the porting team to verify portability.

Twilio Use Case

I am considering using Twillio as an extension in an existing application.
My use-case is this:
User clicks button in application
Using Twilio API, the application calls the user.
The user answers their phone
Twilio connects user to some phone number. (fetched from db)
It's a bit strange, but it is exactly my customer's request. Before I spend too much time in the rabbit hole, I thought I would ask the community, can I do this with Twilio APIs?
Twilio developer here!
This is definitely a common use case for Twilio. In fact, it's so common that we wrote up an in-depth tutorial showing you how to build an app like the one you described.
We've got it in PHP, Node, Python, and Ruby - here's the PHP version:
https://www.twilio.com/docs/howto/walkthrough/click-to-call/php/laravel
If you prefer to just reference the code, you can find it on GitHub too: https://github.com/TwilioDevEd/clicktocall-laravel
Yes. That's actually very simple in Twilio:
https://www.twilio.com/docs/api/rest/making-calls

Twitter StreamingAPI with Pusher

I am working on a project, which has a few dependencies. I would like to have your insights and best practices on a few matters.
Which is the right Twitter Streaming API to get the tweets from the authenticating user?
Does it make sense to hook that streaming API to Pusher and hook my Arduino on Pusher as well?
What is the best library to hook the streaming API to a Laravel backend?
I sincerely hope that this question is within the rules of StackOverflow, as I am not sure. I would really like to gain this information.
https://dev.twitter.com/rest/reference/get/statuses/home_timeline
You can definitely easily hook an incoming feed from Twitter up with Pusher (see next answer). And Pusher does have an Arduino library that should help you too.
Pusher has a solid PHP library so it will be easy to publish data from a Laravel application. The tricky part may be consuming the Twitter streaming API from Laravel and PHP.Phirehose claims to offer access to the streaming API from PHP.
If you could consider other technologies then there's an in-progress Pusher + Twitter Streaming example that you could look at written in Node. There's also this older example that uses Python.

Rails + Pubnub Integration Architecture

I am new to Pubnub and real-time application. I wrote some ruby application before and I am currently research an option to integrate pubnub into my rails application. I read pubnub docs already and have an basic architecture in my head but not quite sure if it is good or even feasible. I appreciate any opinions.
In the application, there will be a peer to peer chat window, and one person can talk to any person he wants.
1) Rails will not store any messages, and it will only stores which channels each person is subscribing to. In this case, since it is a peer-to-peer chat, a channel person publishing to is also the channel the person subscribing to. Rails will store all channels informations for all channels. And thats' it.
2) In client side, server will give each current_user the channels him/her subscribing/publishing to and using those channels, current_user can retrieve all history chats from pubnub server for channels he/she subscribes to.
This is what's in my head. Is there a better architecture implementation ? As far as I read in pubnub docs, they don't store channels for each unique user. Also, in terms of security, since everything will happen in the front-end and subscribe/publish key will be exposed to the browser. How secure is it ? Any drawbacks to this implementation ?
Thanks !!
Its very feasible... you can even get more creative after you nail down the basics. Here is a good chat with PubNub overview link:
http://www.pubnub.com/use-cases/chat/
Here you will find links to iOS and JS demo chat implementations.
Just for our Ruby fanatics, here is the link to a chat app purely using our Ruby SDK:
https://github.com/pubnub/ruby/blob/master/examples/translator.rb
The ruby app is pretty cool, as it lets people not only chat, but chat across multiple languages (via Bing translation API).
I'd say cut your teeth on these, and if you need further guidance, just shoot an email to support#pubnub.com, and we'll get you up and running with more tools and tricks specific to your use case.

Twitter push notifications using Spring Social .NET

I'm using Spring.NET Twitter extensions in an application. Instead of querying in a loop for twit updates (pulling), I just want to listen to twits of interest (hashtags, # mentions, keywords or updates in timeline) and receive push notifications as they come. So I think the way to do it is to use an event model such as Observables, however, I can't find anything in the API to handle this nor any samples to demonstrate it. I would appreciate if anyone can put me in the right direction for this functionality. Thanks.
Spring Social Twitter only recently started supporting Twitter's streaming API. But that's for Java and your question is about SpringSocial.NET. I doubt that SpringSocial.NET has support for this yet. But I'll ping Bruno (the SpringSocial.NET project lead) and see if he can chime in here.
Until SpringSocial.NET supports Twitter's streaming API, your options are to continue polling (which is non-ideal due to rate limiting concerns) or to implement streaming support on your own. I'm sure Bruno wouldn't mind a pull-request to add streaming support to his project. :)
To be clear, SpringSocial.NET is not the same project as Spring Social and the two projects are only loosely related (in that I know who to email if there's ever a question about SpringSocial.NET).
Rx will just allow you to expose Push based API nicely. If the API does not support Push then you could use Rx to Fake Push by doing polling but expose it as if it was push (Observable.Interval or Schedulers etc).
You first will need to find how Twitter exposes Push based notifcations. If your Client (Spring.NET Twitter Ext) does not support this you are stuck with polling (via Rx or not).
It appears that you want to look at Twitter Streams API (https://dev.twitter.com/docs/streaming-apis)

Resources