Retrieve data from another Windows runtime apps - windows

I have two WinRT Apps. I want to open second WinRT app from first app and get the data from second app to first app. Is it possible or not?

Yes, you can, here is how to do it:
In both app (let's call them app_A and app_B), you define the active protocol for them. So app_A will handle app_A:// protocol and app_B will handle app_B:// protocol.
In app_A, you press a button (for the sake of this sample), launch url: app_B://{your query here}.
app_B will handle your query, prepare returning data, and launch url app_A://{returning data here}.

No, you can't, but with the new APIs on Windows 10 we can more 'communicate' between apps.

Related

How to communicate between UI app and an Helper App

I have a main application. Now I need to add upload capability. I thought of using a helper app which runs in dock so that even if the main app is closed it continues to upload. Now my problem is that I need to feed the file paths to the helper app so that it can start uploading.
How can I send message to the helper app from the main app ?
You could use Unix Domain Sockets, or perhaps Distributed Notifications, if you want a Cocoa specific framework.

How to grab selected HTML from browser and pull into my app

I'd like to create a Cocoa app that is able to grab selected text from a website in a third-party browser (in other words, NOT from an embedded webkit instance running within my own app) and then store it in my app's database. From what I can tell, I need to user some kind of service for this, like how selected text in Textedit can be turned into a new sticky note via a service. However, I'd like to be able to provide this app through the App Store. Does that mean I need to use XPC services?
That's as far as I have gotten. So if I do need to use XPC services, can someone point me in a helpful direction? The Services Implementation Guide is totally over my head.

Access to SMS and browser content tombstoning

WP7 newbie here..
In my application, I am using embedded web browser control to load an external web page.
I have a PIN based validation step in that application, which involves
1) User Leaving the current application, (which has a external web page loaded in the embedded web browser) to launch the SMS Inbox.
2) User reads the SMS he just received, which has the PIN. I am sending this SMS to the user.
3) The User then needs to resume back to the original application by hitting back button, to enter the PIN which he received in the SMS earlier.
Once user enters Step2, my application will go into background, and subsequently will get tombstoned. Once user enter Step3, I want to restore application state (with the embedded web browser control), without making a fresh HTTP request again to load the web page.
So, with the given scenario in my mind, I have following two questions -
1) Is there a better way to do all this, like not having to exit the original application, and still let user read the SMS. ( i.e any api to read sms ?)
2) Is there a way to serialize the browser state/save entire web page (with images, css, js) , such that entire web page can be rendered exactly the way it was, when user left the running application.
Important points:
1) I can only use SMS as a communication channel. I can not use something like raw push notification channel, which could let me show PIN to the user, without exiting the application.
2) I am targeting Windows phone 7.0 runtime, but if there is a better option available in Windows Mango update, please do tell me.
Any sort of help is greatly appreciated.
Update:
Added link to the embedded web browser component.
1) There is no API that would let you access the contents of the Messaging hub from inside your application. This is set up for privacy purposes.
2) By default, the web browser saves its state. So if you navigate away from your app, and then come back - the same web page will still be there unless you explicitly re-navigate on activation
1) The better way to do this would be to not embed the web page within an app. Just build a mobile website. If all the functionality is within the web page you gain nothing but problems by trying to put it inside an app.
The web browser control is not intended to be used to create an alternative browser (which is really what you're doing).
2) You can try using the SaveToString() method to store the state of the page when tombstoned but this doesn't allow for modifications to the page since it was loaded (including anything dynamically updated or any state in javascript). If you have multiple pages you'll also need to maintain the internal backstack and the state of each page separately.
Short answer: If you want to put your application logic in a webBrowser control then you can't support tombstoning. Fast-App-Switching (in Mango) partially addresses this but not completely.

Accessing Voice Mail Services in Windows Phone 7

I am creating a module for my project which is location based profile change in Windows Phone 7.
I am giving an extra feature in my app. When a user recieves a call, when in a certain profile (i.e silent or driving), the incoming call will recieve a service like voice mail where he/she can record a message.
Which API can I use to achieve that?
It's not entirely clear what you're after but I'm certain you can't do it:
There is no API for accessing profile information.
There is no API for accessgin call history details.
There is no way to determine if your application is being obscured for an incoming call or another reason.
Access to voicemail is operator dependent. There is no universal way to access this. Some oeprators provide their own APIs for accessing things like voicemail but these vary in implementation, availability and capabilites.

Is it easier to register a custom protocol or a MIME-association across OSes?

From a web browser (Win/Mac) I need to launch a desktop application and pass it a response string (e.g. XML) from the webserver. For Windows, as far as I can tell I have two straightforward options:
Set the application as a default program, and respond in a standard way so the browser associates the response with that extension/Content-type. The browser validates the association, stores the response to a temp file and the app opens it.
Register a protocol, which causes the browser to launch the app, passing the URL to it. In this case apparently the string needs to be something like Base64-encoded (yet shorter than the browser's URL length limit). Otherwise I'd store the file on the webserver and the URL would be given to the app to request itself. This seems to be less than ideal, but iTunes uses it (itms://).
Which is generally easier to register by app installers across platforms? What I don't know at the moment is the particular installer framework being used by this app.
I have NO development experience with this but I think it's all about what you are developing and the business model.
Option 1
Would be useful when you create some sort of custom meta data file which can be viewed nicely in an application.
Company X has their own XML Schema's. Customers can download their data in that format.
Company servers serve these files with their registered/custom content-type. Customer can install an application that handles that content-type. Application development is focused on supporting the XML Schema's and build an interface upon it.
Option 2
Would be useful when you distribute content online.
Apple turned their iTunes business model into a protocol. So every channel (web,browser extensions,mobile apps,desktop,mobile sites,company devices,etc) they want market share can use that protocol. Application development is focused on supporting the protocol (business model) and build an interface upon it most fit for the channel.

Resources