Windows phone 8.1, toast notification, globalization and text parameters - windows-phone-8.1

I want to send a toast notification (from a server to a windows phone), the notification have to be something like "Katie bought you 3 items", but it have to run in different languages, so I can't writte that directly on the server.
The text comes from the server and you can't catch a notification if the app is not running.
There is a way to do globalization writting "ms-resource:label" but it is a fixed text, or at least in the website of Microsoft I can't see anyway to write something more, so with that the max I can get is something like "Someone bought you N items", without Katie and the number 3.
Can I put parameters in a resource? Something like ms-resource:label#Katie#3
where label is %1 bought you %2 items.
Or maybe there is another way.. How can I send this kind of messages in a toast notification?
Thank you.

After getting back the channel URI from WNS, when you are sending it to your server (from device), you can also pass device region and language information along with it. While sending notifications to WNS (from server), check these values against every channel URI to create customized text for that respective user.

Related

Windows phone 8 dialor

I am pretty new to Windows phone development. I want to create an application that will be displayed as an option to the user, when the user dial a number or select 'call' option from a saved contact, for routing the call through that application. The application first dial some number to connect to a specific service provider and then dial the number on the selected contact or the number that the user dials to make the call. I had an experiment with the PhoneCallTask but not succeeded. Any help will be appreciated.
First, there is no way to put your app's shortcut in Phone app. I assume what you are looking for is a call interceptor app. Currently, the builds till WP8.1 don't support it. There are possibilities of such API in the final Windows 10 build though.
Please use a search engine to look for API limitations first and then ask a question in SO.

Call Recording in Windows Phone 8

Can you route me to API's capable of intercepting incoming and outgoing phone calls in Windows Phone 8 and record the call conversation ?
Once Recording is in progress, is there a way to simultaneously packetize these data and send it over to a remote server ?
Finally can I set this call recording application to be auto invoked whenever there is an incoming & outgoing Call ?
Since SIP is not exposed in Windows Phone 8 do we have an alternate approach to serve the purpose (say a 3rd party Library) ?
Can you route me to API's capable of intercepting incoming and outgoing phone calls in Windows Phone 8 and record the call conversation ?
No, there is no way to intercept anything on Windows Phone. (And this makes the rest of your questions invalid).
There is a way to interact which can identify the incoming call,
Example : New Version of TrueCaller application, it will integrate its app with Network+ app of system and then it will possible but its special api that Microsoft (not Nokia) provided to them I try to contact them since last 2 months i will I have good news/ bad news in very short period of time.
Thanks.

ios/Android targeted push notifications in AIR app

I was wondering if it is possible to have multiple custom push notifications setup in a single AIR App.
What I am trying to do is allow users to setup custom alerts based on information they would like to receive for example say user 1 would like to know when new actions or drama movies are released on DVD, user 2 would like to know when new comedies are released, user 3 would like to know when any new movie is released.
This is a simple example and there are possibly 1000's of options (postcode/zip information).
Thanks
Technically, there's nothing that wouldn't allow you to do this.
The implementation is mostly backend related though, let me just quickly draft a design for that here;
The user's device registers for push notifications at your backend service.
Your service takes the user's id stores in a DB and passes the device token to the corresponding push notification server.
Once the registration is completed, the user selects what items he'd like to get notified of (naturally your backend service has to know this information as well to store it in the DB).
As soon as a new action movie (or whatever kind of information the user registered for) is available, your service looks in the DB what users registered for that kind of movies and sends a message via push.
So a simple database and some server side scripting will get you going.

Displaying Tiles data with Time interval using Push Notifications in Metro Apps?

I have metro application in which I implemented Push notification concept for getting single message.If I get more than 1 notification,still my application tile is able to show only 1 notification(msg).Am not able to do how to display multiple notifications for time-specific.Means do I need to write any extra code for displaying multiple notifications on my tile.If so, where should I need do write either client-side or server-side?
Thank you.
There are several ways to look at updating, and depending on what your end goal is, you may end up implementing the code either on the client, or the server, or a little of both.
For the scenario you describe, you need to use Windows Notification Services to push the notification each time you want a new tile notification. Typically, this is done by having a service running in the cloud (a website, or a Windows Azure service, or similar), that calls Windows Notification Service and sends a tile update to the app when something of interest occurs.
If what you want is for multiple notifications to cycle on the tile, that's enabled by calling the enableNotificationQueue method on the TileUpdater class:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.tileupdater.enablenotificationqueue.aspx
Per the comment below, enableNotificationQueue works for any notification source. But if you want to pull information from a remote service, rather than using push, you can use scheduled polling as means of updating the tile using remote information, as described here:
http://msdn.microsoft.com/en-us/library/windows/apps/Hh761476.aspx
Combined with the call to enableNotificationQueue, it may also enable the scenario you're looking for.

How does Facebook detect when a user receives a new message & make changes to the html?

I'm new to AJAX and PHP but I know that PHP is a server-side scripting language and so there will not be any changes to the html unless the user refreshes the page or the user submits a form. Therefore I suppose the change of the number in <span id="mercurymessagesCountValue"> when a facebook user receives a message
is AJAX-related.
And this is my guess:
The change of the number is triggered when it is detected that another user [the sender] has inserted a new row into a particular table and each column contains different data: the time, the message, the sender id and the receiver id.
So here's my question... In this case, how is the changes in the database detected and how does it trigger a javscript [or something else] to make changes to the html? Or if I'm wrong... can I know how Facebook does that? Thanks very much!!
If I got the question right, you should check out about pull and push models. Facebook works under the push model: facebook server knows when new message is received and it pushes the notification to the client (website open in the browser).
Let me clear a few things up for you here,
AJAX is simply a type of request being sent by the browser to go grab data from another page dynamically. In facebook's case, they actually have a special type of connection to the client computer to keep the page 'alive'. This way, they can push dynamic updates to the client without the need to constantly poll/refresh a single page on the server (would make large amounts of load).
So, let's just pretend, they are constantly refreshing the page on the server to determine how many notifications are unread -
Client -> Ajax Call -> Server PHP Page -> Ajax Return -> Client
So, in order, the client sends a request for the page to be generated by the server.
The server's php page will then count the number of 'unread' notification rows in the database for that particular user. It will then output the number of unread rows in plain html.
The client then recieves this plain HTML from the Ajax call, and simply updates the DOM with the new number of unread notifications
PLEASE NOTE: This is not how facebook works, but it's a good example of how to set up your own basic notification system if you are new to dynamic coding.
My guess is that requests are sent frequently from the client via Javascript, to the host, asking "has anything new happend since last time i asked?". The answer is responded by the server, with PHP, if it is yes, the new data is delivered in the respond and JavaScript updates the DOM (HTML) with the new data, like showing the red flag or something.
javascript:location.load(t);
(t=time interval)
i guess ,, refreshing a page in every several seconds will pop up the notifications recieved..!!