Launch/execute generic actions in Windows Phone, like Intents on Android - windows-phone-7

The Android framework allows for generic actions to be completed by any installed application that registers to handle the action. You can qualify the actions with additional data, mime types, etc.
Does Windows Phone have a similar mechanism? Is there a generic way to "launch a browser with this url", "select a file of type .xyz", "share/send this file of type .xyz", etc?

This capability does not exist to define "Intents" as it does for Android in the current v1 release of the Windows Phone SDK.
There are however a number of built in "Tasks" that behave in much the same way, including launching a Web Browser. Details here.
How to: Use Launchers for Windows Phone
How to: Use Choosers for Windows Phone

Related

What is the Idiom type for Xbox?

I have a UWP app created using Xamarin.Forms and I uploaded it on Microsoft Store, I enabled Microsoft to decide which platforms can I support, Xbox was automatically selected by Microsoft. I cant unfortunately test it since I dont have Xbox or any emulator available. But I am seeing that there are some downloads and Microsoft Developer Console shows the type as "Console"...
Now my question is on Xamarin.Forms doesnt have that idiom as Console, it is defined here as phone, tablet, desktop, tv, Unsupported... how to check for Xbox?
This is not built into Xamarin.Forms, so you will have to use Windows-specific API to recognize if the app is running on Xbox. You can implement a custom Dependency service that will have an interface which you will implement in UWP project. The documentation will tell you how to do it.
Then to check which type of device the app is actually running on you can check the value of:
Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily
This property contains a value depending on which type of hardware the app is currently open:
"Windows.Xbox"
"Windows.Mobile"
"Windows.Desktop"
"Windows.Team"
"Windows.IoT"
"Windows.Holographic"

Xamarin Forms - What is the current device/system type?

I was working by debug my app with a Microsoft Phone 10 when I realized "UWP is a cross windows logic", so now I'm working with my computer.
However, a question comes up in my mind :
How can you know/get information about what type of system your app is running on?
I mean by this question, by example, does my app is currently running on a phone or on a computer?
Thank for your help !
In PCL or SAP
The static Device class includes several properties and methods that allow your code to deal with device differences at run time in a very simple and straightforward manner:
The Device.OS property returns a member of the TargetPlatform
enumeration: iOS, Android, WinPhone, or Other. The WinPhone member
refers to all the Windows and Windows Phone platforms.
The Device.Idiom property returns a member of the TargetIdiom
enumeration: Phone, Tablet, Desktop, or Unsupported.
You can use these two properties in if and else statements, or a switch and case block, to execute code specific to a particular platform.
Device

Windows app store download permissions

I developed an app for Windows phone. Now I want to deploy it on Windows app store and wants to put restriction.I want only specific people will able to install it. How can I do that. Any suggestion will be appropriated.
Thanks,
Well that depends on who these specific people are. You can set age restrictions and region restrictions, and that's about it.
If you mean you want to hand-pick users that can use your app, then provide a login screen where you manually authorize your registered users.
If you mean that only users you choose can download the app, then you can't use the Store; you'll need to use sideloading.
You can control distribution in the Distribution and Visibility section of your app submission on the developer dashboard.
There are three basic options (for Windows 10 - two for Windows Phone 8.x):
Hide this app and prevent acquisition. Customers with a promotional code can still download it on Windows 10 devices
Give codes to the people you want to be able to use the app. This is Windows 10 only.
Hide this app in the Store. Customers with a direct link to the app’s listing can still download it, except on Windows 8 and Windows
8.1
Send links to the people you want to use the app. This will work on Windows Phone 8.1 as well as Windows 10. Anybody with a link can download it though, so it won't truly limit to just the people you want to use the app.
Hide this app and make it available only to the people you specify below, who can download this app on Windows Phone 8.x devices. A
promotional code may be used to download this app on Windows 10
devices
This is the classic beta-mode for Windows Phone 8.x. You can specify which Microsoft Accounts have access to the app.

Can we perform navigation between Windows Phone Silverlight 8.1 project page and a Windows Phone 8.1 project page under same solution?

I am working in Windows Phone application in which I have two projects one is Windows Phone Silverlight 8.1 and another is Windows Phone 8.1. I want to navigate from a xaml page in Windows Phone Silverlight 8.1 project to Windows Phone 8.1 Project on a button click and then return back to the page. Is there any possible way to do that?
Thanks,
Ekta
Regardless of their types, there is no way to directly navigate to a page in another app on Windows Phone. Your best option is to declare a URI association in the target app that the source app can launch with - see here for details.
As for returning to the source app, you should try to leverage the system back key if at all possible. However, if it's not going to be obvious to the user that she should hit the back key, you have two options:
Use Application.Current.Exit() to close the target app, which will
return the user to the last session in the back stack, which should
be the source app (unless the user task-switched in the interim).
Register a URI association in the source app and navigate back to
that from the target. Note that the process of registering and
handling invocation of URI association activation is different in WP
Silverlight apps - see here.
The difference between the two approaches is that if you Exit, the target app will be terminated and removed from the back stack whereas launching a URI association results in a new forward navigation and will leave the target app in the back stack.

Listing installed applications in WP7

In my application I need to share an item through various way (like facebook, twitter, linkedin etc). So I need to list the application installed in my phone show that I can share via any one appplication. So can anybody help me out?
It is not possible to know what other applciations are installed on a phone. Having access to this information would be a potential data privacy issue.
Windows Phone 7 has builtin support for this kind of actions with the launchers / choosers. Within the list of launchers you will find the ShareStatusTask which is opening the builtin 'share your status' control. This control checks your phone device for the profiles/networks to which you have connected. By using the Status property of the Task you can than fill in the message you want to share. In the opened control you can than choose on which networks you want to share your message.
See below code sample on how to use this task:
ShareStatusTask shareStatusTask = new ShareStatusTask();
shareStatusTask.Status = "Share my status on different networks";
shareStatusTask.Show();
NOTE: If you start a launcher from your app, your app will be deactived. Normally after completing the taks your app will be reactivated. For the overview of Launchers / choosers you can have a look at Launchers and Choosers Overview for Windows Phone

Resources