Communicating between the desktop Apps and Windows store app - windows-runtime

I want to share an image file between Desktop application and the windows store application. What is the best way to do the communication between the desktop app and the windows store app.I have tried creating the shared memory between the apps, but i think this is not possible( Reference ).

It's not possible to communicate and share date directly, except launching via protocol handler. As Aniruddha already said sharing via Filesystem (e.g. pictures library) is a convenient way to do it.
If you are on Windows 8.1 and don't have the requirement to put your application in the public Windows Store there's another option:
Windows Runtime Brokered Components. This is quite awesome stuff. It allows you to freely communicate between a Windows Store App and any other application. It is documented here: https://msdn.microsoft.com/en-us/library/windows/apps/dn630195.aspx
The setup isn't exactly easy but it is very powerful. Keep in mind that you won't get this app published into the public Windows store, if you're using brokered components.
I haven't tried Brokered Components on Windows 10 yet, I'm not sure if this is still supported.

Related

Why does the managed version of WinRT not include access to the .NET API?

Recently I began working in WinRT for Windows Store Apps (and the upcoming Windows 10 Universal Apps) using C#. After working in .NET for awhile previously, I was excited to work with .NET on mobile devices, only to find that WinRT did not feel like home at all.
Constantly I find myself having to search for alternatives to certain classes that I'm familiar with in .NET since often they're not the same or even implemented in WinRT. I figure that the lack of implementation derives from the fact that WinRT at its core is unmanaged, even though the CLR binds to it from managed code.
My question is: What is stopping Microsoft from allowing developers to import and use all of the familiar .NET classes from managed code, even with WinRT running from behind? I know it's not a limitation of the device because my Surface Pro can run desktop .NET apps just fine and the Mono project has succeeded in porting almost the entire .NET API to devices of every kind.
Thanks for your input!
This is a big topic but there are three basic reasons why you don't get the full .NET API from a Windows Store app.
The APIs don't fit on smaller devices like phones. Since the purpose of the Universal Windows Platform is to have apps that can run everywhere, it can't include APIs that are too resource-intensive (disk, memory, CPU, etc.) to run on smaller devices. (Note that even if the managed API appears to be small, it might have a dependency on a large underlying Win32 API).
The APIs aren't compatible with the Store app model. Many APIs that require permissions not granted to Store apps fall into this category, as do APIs that would enable apps to do "unwanted" things to your machine (the degree of "unwantedness" is subjective).
The APIs are deprecated or there are newer alternatives. This was the case with a lot of APIs in Windows 8, where things like file-system access and network sockets were blocked from Store apps because there were newer WinRT equivalents.
Note that Microsoft is always open to re-evaluating whether a specific API should be included or not. For example, Windows 10 brings back many APIs that were banned from Windows 8.1 (such as System.IO and System.Net.Sockets) and has expanded the capabilities granted to apps. You can file feedback via the Windows Feedback app or on UserVoice if you want additional APIs brought back (adding detailed justification never hurts).

How to turn on /off the capabilities through a Windows 8.1 RT app

I am trying to develop an application which will deal with the following hardware and perform the stuff mentioned. I want to know that would it be feasible .
1)
Wi-FI
Scan for wi-fi , provide option to turn it off and on or reboot it .
2)
Bluetooth
Turn it off /on , make it discoverable if its not discoverable.
Apps
Get list of all apps that are installed and provide an option to kill them if they are running or uninstall them. The provision should also list the user the apps which he has sideloaded(need to know which all are the sideloaded apps).
Internet Connectivity
If internet is connected , check whether data is flowing or not.
Battery Status
Find all those apps which are consuming too much battery.Provide the option to uninstall them and lower the screen brightness and decrease the screen lock time
All these have to be implemented in an application that I want to develop.
I would be needing links for answers so that I can provide it in my feasibility report.
thanks
You will need to write a desktop app for this. Most of what you're looking for is completely out for a Windows 8.1 Runtime app. Windows 10 adds functionality for several of the bullet points, but in both versions you'll need a desktop app to manipulate other applications.
Universal Windows apps (aka Windows Runtime apps) run isolated and cannot generally affect the system or other apps. They can make changes only within their own context.
1 and 2: Windows 10 adds the Windows.Devices.Radios.Radio class to address your radio bullets, but this functionality is not available in Windows 8.1 Runtime apps.
3: This cannot be done from a runtime app. A desktop app can enumerate a user's apps with the Windows.Management.Deployment.PackageManager class.
4: You can query connectivity with Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile
5: This is not available in a Windows 8.1 Runtime app. In Windows 10 see Windows.Devices.Power.Battery

Best way to distribute Cloud HTML5 App

I thought PhoneGap was a simple wrapper for HTML5, but it looks like it does in fact compile into native in some way.
I have a Cloud based, HTML5 Single Page Web application that I just want to run full screen, and distribute via an app store.
Should I just create a PhoneGap App with an InAppBrowser?
If you intend to publish an HTML5-based app in a "native" app store sucha s Google Play or Apple Store, you have 2 options:
1- Implement your own native application using a webview to show your web-based app.
2- Use some existing framework like Phonegap/Cordova even you do not use the native API. The framework will already setup everything for you to just deploy your HTML5 code.
However, if your web app is meant to be hosted remotely (i.e. not run from local files), you may encounter problems when trying to publish in the Apple Store. They have some strict rules about remote content, and about publishing apps that may not provide much more value and/or functionality than a simple web-app can.
Best.

HTML5, jquery mobile app deployed as stand alone app

I have read a few forums and articles on this but can't get a clear answer.
I need to build a mobile app that can run on any platform/device. It looks like HTML5 + jquery is the best option but I need the application to do the following:
The app must run on any platform (Windows Phone, iOS, Android, etc).
It must work as a stand alone application. Meaning it must work without internet connection.
Because it is stand alone, I need a local database on the device. The database can be embedded in the app. I'm thinking SQL CE.
The local database on the device must be able to sync to a SQL Server database.
The app needs to interact with features of the device like the camera, or GPS device.
Is it possible to build such a mobile application?
I am using ASP.net MVC 4 to do the development.
If you want to use HTML5 and JQuery then the PhoneGap/Cordova framework would suit you best.
Phonegap is a cross platform framework that gives you access to the device features like GPS and Camera using a standard javascript API.
The app must run on any platform (Windows Phone, iOS, Android, etc).
Phonegap is compatible with all these and many more including blackberry. See here for full list: http://phonegap.com/about/feature/
It must work as a stand alone application. Meaning it must work without internet connection.
PhoneGap runs as a native application inside each devices webview. It does not need access to a data connection to run
Because it is stand alone, I need a local database on the device. The database can be embedded in the app. I'm thinking SQL CE.
PhoneGap cannot run its own SQL Database like a standard native application but it can use the web standards Web Storage and Web SQL. Though this approach does have limitations. Read more about this here: http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html#Storage
The local database on the device must be able to sync to a SQL Server database.
This would be upto you to design and implement but can definitely be done
The app needs to interact with features of the device like the camera, or GPS device.
Most device features supported with PhoneGap. See above link for full support list.
If the lack of a full SQL Database support is a problem for you there are frameworks like Titanium Appcelerator that build a fully native cross platform app for you that may be more suited to your situation.
http://www.appcelerator.com/platform/titanium-platform/
But if you're using HTML and JQuery to go cross platform then PhoneGap is your best bet.
Edit: Also there are plugins for PhoneGap to run a standard SQLite DB but this requires extra work on each platform. Every platform you develop for would require a compatible plugin.
http://brodyspark.blogspot.com.au/2012/12/cordovaphonegap-sqlite-plugins-offer.html
Use PhoneGap: http://phonegap.com/
or Apache Cordova: http://cordova.apache.org/
or Intel XDK: http://xdk-software.intel.com/

Can I use Node.js into my windows phone 8 application?

I am developing an app which requires transfer of data over socket. I have to use standard http protocol to send and receive data over sockets. So can I use Node.js into my windows phone 8 application for creating and parsing Http Requests and responses respectively?
I am writing code in c# .NET.
Thanks in advance.
Regards,
Vijay
Sadly you cannot create Windows Phone applications using HTML5+JavaScript, so you won't be able to use this library in your app.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206940(v=vs.105).aspx
HTML-based phone apps aren’t a supported app model in Windows Phone 8.
However, a developer can create a managed app with a XAML front end
that uses an embedded browser control to display local HTML content,
and it’s possible to access phone APIs by using the InvokeScript
method and ScriptNotify events. Also, in Windows Phone 8, the phone’s
browser has been upgraded to Internet Explorer Mobile 10, with a host
of new features such as a robust HTML5/CSS3 implementation, Scalable
Vector Graphics (SVG), ES5, IndexedDB, gesture events, and the
addition of the high-performance scripting engine, creating new,
interesting possibilities for Windows Phone 8 HTML developers.
But if you just want to use sockets in your WIndows Phone app, you can use them directly in C#:
Sockets for Windows Phone
I'm not sure about node.js but if your goal is to serve static files, such as html, you could look into the Katana Project here: https://katanaproject.codeplex.com/releases/view/113281
As for dynamic data on your static files you could leverage Owin and self host a SignalR endpoint on the phone: http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-signalr-20-self-host
With SignalR, and C# you could expose much of the phone's functionality and sensor data on your phone.
To avoid creating a lot of unneeded boilerplate code, you could bind the data to your static html with mv* frameworks such as KnockoutJs or AngularJs. For cool looking graphs, you could leverage D3.js