Metro app - how to update live tile when using javascript/html? - microsoft-metro

I'm just getting started on Metro app development using HTML, JS, & CSS. Is it possible to update the live tile with some data retrieved thru a WCF service? I don't see a "Add Service Reference" option when I right-click on References in Visual Studio 2012. This whole Metro app thing is pretty confusing. Can I use a combination of HTML/JS/CSS and C# (like ASP.NET) in a Metro app?
Here's what I'm trying to do - when the app is launched, it should open a webpage in an iframe within the app. I also want to read the logged-on user's account name (Windows authentication), fire off a call to a WCF service, get some data and display it on the tile, refreshed periodically. It sounds like I need a combination of HTML/JS and also C#.
Thank you!

Periodic notifications seem to fit your scenario perfectly. With periodic tile updates, Windows will automatically update an app tile with the XML tile notification content hosted at a web address. The web content can be served by a WCF service, or any other web server.
Code showing how an app can set up periodic updates using startPeriodicUpdate:
var tileUpdater = Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();
var interval = Windows.UI.Notifications.PeriodicUpdateRecurrence.halfHour;
// Every 30 minutes, Windows will update the tile with the content at 'uri'.
tileUpdater.startPeriodicUpdate(uri, interval);
If multiple updates should be downloaded to use tile notification cycling, use startPeriodicUpdateBatch.
Note: It is possible to have an app written in HTML, JS, & CSS consuming a C# library, but I don't believe it is needed in this situation.

Related

Is PWA applicable for desktop web application?

I have recently gone through couple of Progressive Web application(PWA) articles on google. What I have got it it is concept for web application
which combines best of two world i.e. latest browser features(like web workers etc) and native application(speed, home page etc).
I have two basic doubts .
Is PWA applicable for mobile sites only or for desktop based application also ? In the couple of examples I have gone through mainly talks that using
PWA allows the mobile user to user the mobile sites like app without installing and equally good speed.
I understand the point with PWA user does not have to install the native app on his/her mobile but i believe even in case of PWA all content(static content like html,css,jss,images etc) will be stored in cache as user navigates to web application. Service worker checks if content
available in cache it will serve it from there otherwise fetch it from server.
So when PWA caching the content on client side, it will be equivalent
of size of native app. Is n't it ?
Its applicable to both. Think a PWA as a website that gets stored in local cache.
It really depends on what you configure service workers in the browser to do, but the gist of the thing is:
cache HTML, CSS, and JS on the client (usually on a per need basis, load and cache)
use browser local database storage to store data coming from your back end database
use AJAX, and/or WebSockets to get data back and forth from your back end systems
Call it a website, a javascript application, whatever you call it, its just the same old/new browser tricks working with local cache introduced; so it loads offline.
And loading offline is pretty much as close as they come to a native app, PWAs as of today are HTML, CSS, JS applications running on a browser; generically called a website.
Hope its clear.

Fire Chrome Alarms from background service when using cca Google Chrome apps

Experimenting with Mobile Chrome apps API: ( https://github.com/MobileChromeApps/mobile-chrome-apps )
What I'm trying to achieve is the registering of my chrome alarms without having to crudely start the apps' main activity as this causes a bad user experience.
The challenge:
I have specified a chome.alarm which gets successfully registered when I open the app ('cca run android ' for example). These alarms are specified in a background.js file, which is declared as a background script in the manifest.json file.
I wanted these to be registered automatically on boot, therefore I implemented a background service and thought I could simply call the app to register the alarms specified in the background.js file. However, the only way I can find thus far to achieve this, is via a call to launch the apps main activity via an Intent from within the background service as explained in more detail below.
On boot, my background service simply invokes:
//Launch main activity..
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.company.appname");
startActivity(LaunchIntent);
The above launches the app into its main activity and the aforementioned chrome.alarms are registered as desired. Happy days! A massive downside to this, of course, is that no user wants the full blown main activity window to open on boot.
Please advise if there is a less clunky way to have the chrome.alarm specified in background.js registered at boot by a background thread. I do not wish to open the mainActivity of the app, yet this is currently the only way thus far I can see to get them to be registered. It is preferable not to register these alarms from within the Android SDK as I intend to stay as close to using web APIs and want to use background.js as the hook to do this keeping things in-line with chrome web apps as-well-as the android platform.
What I have done:
A cca (chrome mobile web app) app which registers a background service natively (I extend BackgroundService) as a plugin and register this to run at boot time. This is the only 'native android code' in order to load the app at boot-time.
Upon booting android, this background service then simply issues a startActivity(LaunchIntent) in order to open the app. In doing so, my chrome.alarm specified in my background.js file get registered successfully. If I don't do this, my chrome alarm specified in background.js do not get registered until I manually open the apps main activity. Therefore I use the backgroundService to open the apps main activity.
This is not at all ideal, I would simply like to somehow have my chrome.alarms registered without crudely having to launch the apps main activity window.
Is there a call which I can place in my BackgroundService to have only the chrome.alarms contained in my background.js file read and registered to fire?
Thank you for your time.
First, thanks for using Chrome Apps for Mobile! (Note: I work on the project)
Sorry that our current bootstrap is "crude" and "clunky", and we agree that it is. You can track this issue for progress on our effort to replace our current Background-scripts-embedded-in-main-Activity-webview strategy with a real background service and multiple window support. Basically you've summarized exactly our plan and existing limitations.
This work is actually scheduled for the near term, and will certainly be done before the end of the year.
As well as chrome.alarms, this feature is quite important for chrome.gcm and chrome.tcpServer (among other reasons).

Running web files inside an iOS App

I'm working on a project that will need to be inside an iOS app as well as a website. It will need to run inside the app since it will must be accessed without a wireless connection.
Is it possible to run my web files inside the app without using something like phone gap?
What is the web connection for? Is it for user authentication? Is it for parsing data from a website? It really depends what you need an internet connection for, if you need some external data from a website or database then you would need to internally create some stores/sqlite db's to hold the data and sync that data when there is a connection.
If you are just running a client side app that you decided to create in HTML then I'd still use Sencha Touch, then Cordova to get it to compile natively.
You can always "Add to home screen" from Safari, to make it run locally. To do this, just visit the webpage when you have internet then add it to the homepage, it will run fullscreen without an internet connection; it will work fine offline IF AND ONLY IF you don't need to connect for any data.

Lync enabled Windows Store app - File Transfers & Video Conversation - Lync SDK

We’re building a mobile solution on windows 8 i.e. Windows Store App, enabling real time collaboration features for maintenance personnel to connect with Customer Support team. We are leveraging Lync 2010 client SDK to support the collaboration needs. The following are the key functionality we plan to enable with in the app
Text Conversations
Audio Conversations
Video Conversations
File Sharing (Send/Receive)
Remote Desktop Sharing
White board sharing
The following is the approach we’ve taken to integrate Lync with Windows Store app:
Lync will be running in UI Suppression Mode & app will communicate with Lync client through SDK APIs, since the functionality is needed within the application.
Lync Assemblies are wrapped in WCF service, since Lync SDK is not available for Windows Store apps.
We are currently able to enable Text & Audio Conversations through SDK in UI Suppression mode
We right now are in need of an approach to enable File sharing between the app & Lync standard Client.
The option available for file transfers is through contextual conversations which requires GUID exchange as per the below references.
http://code.msdn.microsoft.com/office/Lync-2010-Transferring-f766e7aa
We want to know if this scenario works between Windows Store App & standard Lync Client, if not request to advise the right approach.
Along with File transfers, we'd also need the approach to enable video conversations, remote desktop/white board sharing with the current approach (Lync -> WCF Service -> Windows Store app) as from SDK it is not clear how we get stream data which can be forwarded to Windows Store app.
Just found out that Desktop/Whiteboard/Resource sharing is not possible in UI Suppression mode, (reference below)
http://social.msdn.microsoft.com/Forums/en-US/communicatorsdk/thread/1a7355fe-5c64-4b11-ba25-ce18d6bdd3dd
The following behavior will be the concern from user experience point of view in case of Automation APIs, especially for Windows Store App, considering their full screen behavior
On starting a conversation, corresponding conversation window flashes and takes the user to desktop, user will have to manually go to the windows store app, post this event. The conversation window can be docked in case of desktop apps, i.e. WinForms/WPF using DockWindow(),is there a way for Windows Store app?
Incoming call notifications are bubbled which disturbs the user experience with the Windows Store App
User has to accept the file transfers to receive, in the conversation window, manually
Please advise if there is a best solution to avoid the above behavior if Automation API is the only option to go with for Windows Store App.

Pass image from an email to image viewer in Xcode

We have an iPhone app that can display an image dataset and pass it to an UIImageviewer - however we could do with a rough pointer. If the user was sent the dataset (image) via email as an attachment how could we pass that onto the app to be displayed. These are not regular jpeg/png/bmp images - more datasets which need to go through / use a set of libraries to be displayed.
You can launch an application if that application registers its own URL scheme. However, I'm not sure how you would embed your own scheme into an email attachment.
http://mobileorchard.com/apple-approved-iphone-inter-process-communication/
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
On a related note, I've noticed that you have been asking a lot of questions regarding DICOMs and iOS devices, trying to develop your own app, because you have a particular (email-centric) workflow not supported by existing PACS. It seems like you've already developed your own app, so congratulations are in order. If at any time, you decide that it may be more trouble than its worth, feel free to check out ours.
http://nephosct.com
Currently we bootstrap off of OsiriX as our server, but that should be fixed when we release a platform independent version (hopefully within a week). We would also be happy to work with you to add features to the app so that it supports your daily workflow.