Is there a way to force an email received by a blackberry to open directly in a certain URL? - blackberry

Let me explain:
There are some apps (like the Facebook app) that send emails to the BB device, but when I open the said email, it opens directly in my facebook app. How is that possible? Is there an API or something I need to know about to be able to program that on my own app?
On another topic, could I do the same thing, but simply force the email to open a certain url in the BB browser?
Hope I explained myself.
Cheers!

Short answer, yes.
Take a look at the Message List Demo Sample application and the net.rim.blackberry.api.messagelist.* apis. That will handle the "injecting my own stuff into the message list" component of what Facebook does.
Secondly as for "grabbing incoming emails and doing things with them" you need to use FolderListener from net.rim.blackberry.api.mail.* APIs

Related

Let the user choose an e-mail client on iOS

We would like to give the ability to the user to choose any installed email client (Gmail, Yandex, etc.) in our app. But iOS provides only Mail or builtin MFMailComposeViewController. Is there any way to present a list of email clients to the user?
There's no way to achieve this directly, as iOS doesn't know the concept of 'default application'. You could implement yourself a function which checks the various URLs used by different iOS email clients, and determines which clients are installed. For instance, GMail uses googlegmail://. You could also show a menu with the clients found on the device.
If you don't want to create your own implementation, ThirdPartyMailer is a library that can do this for you.
If you're looking for something similar to the way Android handles it, then no it's not possible. Some email apps though might support a custom scheme - for example Gmail uses googlegmail:// (taken from this question).
You should try something like this:
let url = NSURL(string: "mailto:jon.doe#mail.com")
UIApplication.sharedApplication().openURL(url)

Possible to open mail app with search results displayed from app?

I don't want to write my own email app. All I want is to be able redirect to mail with a preconfigured search string to display relevant emails. There doesn't appear to be a way to read or list emails from mail.app from within another app. Am I overlooking something? Is there a workaround for this?
I am fully aware of and able to use message UI in my app. What I want is to read, not send, email that has already been downloaded and exists in mail.app.
The only way that you can use to connect apps with other apps in iOS is thought url scheme.
You can take a look at Url Scheme reference
but it seems like you can't make this action.
UPDATE:
you can take a look the extra functionalities at Wikipedia

How to read a SMS in iOS and is it able to pass an string to the application via link in the SMS

do anybody know about how to read a SMS in iOS with Xamarin iOS ? and then I want to pass a string from that SMS to the application via link. For example when user click the link in the SMS it will pass a string value to the application and in the application a method is waiting to trigger that.
It's impossible to read incoming or storing SMS's due to iOS security restriction.
Although you can't directly intercept SMS messages, you can create a custom URL scheme so that if a user clicks a link in your message it will launch your app.
If Jason's answer of using a link to the app, there is an alternative. In my case a web service is sending down a code (two stage auth). When I know its going to be coming, I prompt the user to looks for it, and when it comes long press the message bubble, and copy the whole message to the pasteboard.
When the user switches back to my app, I've set a flag to look at the pasteboard, I see the message, extract out the code, and if it "works" the user can continue without further interruption.
Not as elegant as Jason's answer, but if you cannot control the sms content, its an option.
It is possible from iOS 12
textField.textContentType = .oneTimeCode
Please check this doc

Possible to send automated email?

The iOS SDK class MFMailComposeViewController can be used to let the user compose an email message.
What I'd like to do, is for the iOS app to send an email in the background, with no user interaction. Is this at all possible/allowed in the iOS SDK?
Nope. There isn't any API available to do this. You'd need to roll your own SMTP client and have the user enter credentials into your application. On top of that Apple may not approve this.
Unfortunately, I don't think Apple would ever allow this because (for example) then you could just get everyone's email address by auto-sending mail to yourself. :(
I actually wanted to implement something like this for the express purpose of alerting me when a critical error happens on an app in the app market.
Best solution would be to create an API (just ping a php file or something), and have it send the relative alert message to your email).

How to Add Phone With twitter using Third Party tool

I need a script that will add my phone with Twitter for All latest notification.
I found this page Twitter but i need to create script for my own application.
I goggled but i didn't get any solution For this.Please Help me to find this answer.
Thanks a lot in advance.
First Edit
This is a twitter's new feature Send notification to Phone. Actually I want to create an app that will allow users to register there phone with twitter via my application. Ie I need a script to implement send notification to phone.
The question that others are asking you Pankaj is what platform is your application being written for. You keep saying you want a "script" to do this, but what kind of script?
Giving us more insight to what your application is (a console application written in C#, or an ASP.NET web application) would lend more detail and raise the chances of someone being able to help you. :)
Regardless of your app's platform though, you're probably going to need to look into the Twitter API for setting this up. This is the normal method to interact with Twitter from 3rd party applications. So all the suggestions above, specifically the list of API's available, is probably what you're looking for.
Hey, can you give some more information? What kind of Phone are you developing for?
Maybe that helps solving your Problem.
If you are just searching for a way connecting your Phone to Twitter, here is the Twitter FAQ for Phone connecting:
http://support.twitter.com/articles/14014-twitter-phone-faqs
Maybe it helps, or give you more keywords for your search.
I don't believe there's a way to get or set the notification phone number using the API, however if a phone is already setup on the profile you want to configure, you can do the following to get notification from all user friends.
The user will need to authorize your application to access her account. This flow uses OAuth, and begins here:
http://api.twitter.com/oauth/request_token
Once the user has granted your app access, and your application has all the required OAuth credentials, turn on notifications using account/update_delivery_device:
http://api.twitter.com/1/account/update_delivery_device.json?device=sms
Next, fetch all the IDs for your user's friends using the friends/ids API call. Be sure to study the documentation; this call uses cursors, so you will have to manage those if the user has over 5,000 friends. Store these IDs for use in the next step. Here's an example call:
http://api.twitter.com/1/friends/ids.json?cursor=-1
Once you have all of the friend IDs, you can call notifications/follow repeatedly to enable notifications on your mobile device whenever your friend makes an update:
http://api.twitter.com/1/notifications/follow.xml?user_id=12345
This approach will burn one API call for each user that you enable notifications for; there's no way currently to manage notifications en masse.

Resources