Problem while Making a Call and SMS in same Process on Windows Phone 7 - windows-phone-7

I am developing a application for Windows Phone 7 in which on a button click I need to first send some text messages and then make a call. But as both process are user dependent so I am not getting how should I make it such a way that unless user first finishes the sending messages my app should not initiate call. Because unless I do so it will give thread abort exception.
Thanks;
nil

With the current SDK there is no way to know if the SMS was actually sent. It could also have been changed by the user before being sent!
Lots of people have asked for this functionality (or similar but for other tasks). Let's hope it comes in a future update.

I believe you can't do it in parallel, because WP7 isn't really multitask.
Do you really need to do it in parallel?
Search for the events deactivated and activated. They are in App.cs.
After you make a call, and back to the program, the activated event will detect it, so you can add code there to send SMS.

Done in reverse way. First make a call and then when user comes back after tombstoning send an Email...but flag manipulation need to be saved in isolated storage.

Related

Is there a way to suppress incoming notifications in Xamarin (iOS)

At work I have to modify an existing Application to differentiate incoming push notifications by the language of the news.
In Android I found a way to not send the push notification. So I could easily check for the language and only send the right one.
In iOS it seems a little different. (I'm not the Author of the existing code, so maybe I have overlooked something.)
But I can't find any function where I could intercept the incoming message.
I tried functions like UNUserNotificationCenter.Current.RemoveAllPendingNotificationRequests();
and
UIApplication.SharedApplication.CancelAllLocalNotifications();
But without any success... maybe I put them into the wrong place.
Thanks for hints and help
If I understand your question, the answer is it depends.
If you cannot change the push notification on the server, then no. The system will display it as soon as it arrives as it is formatted as the notification that needs to be displayed.
However, you can change the format of notification payload so that it doesn't display but it is rather processed by the application. Then you can process it in the app similar to what you do on Android.
I don't want to change the notification. I just don't want to show
it...
I don't think it is possible to choose which notification to show when your app is not running.
If your app isn't running then the notification is processed by iOS and your app doesn't get called.
You can have a look at answer in this thread.
Refer: https://learn.microsoft.com/en-us/xamarin/ios/platform/user-notifications/

Receiving messages back to my platform

Use Case SMS leaves my platform and goes out to a receiver (SMS). I would like to attach some sort of custom identifier so when the user responds back to the SMS..and my platform received the message..I know how to internally route the response back in my platform.
Any ideas?
Maybe set up a system where when the code is sent out
For instance:
Code - 11832
The user then has to enter this code on your website. A program will then match to see if it's the identical code. So you are then able to log the information
No expert on this though and Where is your code ?
Twilio evangelist here.
There isn't really a great way to attach an identifier to the message itself. You could force the user to prepend/append a code in their reply, but depending on your specific scenario that might not be a great user experience.
Another option is to save the to/from phone number as a unique pair when you send the message. Then as your application receives replies you can check the incoming to/from phone number against what you saved.
Hope that helps.

Xamarin iOS - How to make sure messaging app is up to date?

I have set background fetch to the app. But, It is not called all the time (it depends on how often the app is used by the user)
This is what want to do: When someone send a message to me, I need to make sure that my phone receives the message. Right now, I am using APNS (which works well is the phone is online and working). But, let's say the phone is off or internet not working, the user will never know that a new message has been received, unless he opens the app.
Is there anyway to make sure that, as soon as the user CAN be informed that a new message has been sent, a notification will be displayed on his phone? Right now, if the phone is off and a message sent, if I turn it on, nothing will happen.

Windows Phone 7 - Incoming Call Screen

Is there anyway when receiving a call to add data to the incoming call screen?
I'd like to be able to add text to that screen if possible.
Update:
If there is no way to currently add text to this screen is there a way to trigger code based off of an incoming phone call?
The only way you can do anything in relation to an incoming call is be informed that this has happened via the Obscured event.
Be aware that other things (such as an alarm) also trigger this event and there is no way within your app to know what caused your app to be obscured.

Windows Phone 7 - How to calculate call duration or termination

I'm new to windows phone 7 development...
Can anyone please tell me how to calculate call duration? or how to get notification of incoming call? using silverlight or c#
is there any API's available..
Thanks
Sam
There is no way to get calls information or notifications of incoming calls on the current Windows Phone 7 SDK.
There is no way to access call information.
However if your app is running and a call comes in the Obscured event will be triggered. You can then use a combination of the Unobscured, NavigatedTo, Loaded & Activated events to determine when the app has the focus again.
This won't give you the length of the call but rather then time between an event that may be a call (including incoming SMS, alarms, etc.) and the user returning fully to your app. This may be a good enough approximation, but it will depend on your needs.

Resources