Windows Phone 7 ShareStatusTask - Is it possible to customize it further? - c#

ShareStatusTask statusTask = new ShareStatusTask();
statusTask.Status = "Blogging";
statusTask.Show();
There is a ShareStatusTask available in Windows Phone 7 which meets most of my needs. But I need to further customize it. Meaning, I have individual Facebook, Twitter, Live icons. When an user hits them, I should be able to popup the share status task with either Facebook or Twitter or Live pre-selected.
If they are not configured, I would show an error message probably to configure it in their device (under settings -> accounts).
Is there any code or inbuilt functionality available in Mango to access these ?

Unfortunately there is no way available to further customize it.
When you use ShareStatusTask (or some other similar tasks like ShareLinkTask), the control completely goes to the Operating System and we have nothing to do with.
If we really want to customize, we have to go for our own implementations using some third party libraries like Hammock or Twitterizer for Twitter and Facebook c# SDK for facebook.
Even with a little disadvantage, I would suggest to use ShareStatusTask for simple implementations, unless you need some picture sharing etc.

Related

List launcher apps from Office365

We are looking to create our own "My apps" From Office365 to create a launcher.
We currently use microsoft.graph for other functionalities (like authorization) but I don't see a way to get my tenants available apps.
Using getSubscribedSkus and the users's assignedPlans / assignedLicenses we can figure it out, but that shows nothing about pinned tiles, images, urls etc.
Is there another way to get this done?
Thanks!
There is an Applications API in preview under /beta: https://graph.microsoft.com/beta/applications. The API is documented here: https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/application
We currently use microsoft.graph for other functionalities (like authorization) but I don't see a way to get my tenants available apps.
As far as I know, there is no API to achieve this so far. You may consider submitting a User Voice on https://officespdev.uservoice.com.

Search for installed Map apps on Windows Phone 8.1

Is it possible to get a list of the installed apps which provide Map functionality?
In the maps settings menu, you can select which app should be the default one for voice navigation - in that list, my phone displays HereDrive+ and Windows Phone Maps.
How is it possible to search for apps like this? Is such API open or that list result was acquired using a restricted API?
Not a correct answer, but maybe the way you should use this is by using the ms-drive-to or ms-walk-to Uri scheme! When you use those, the phone itself will launch HERE drive if it is present, otherwise Bing maps!
My guess, in the future the user will be able so set this as an option, that he can indicate what default map app he wants to use in general. But for now it's default Bing or HERE if that is installed when using the given URI scheme.
Get the needed example code and usage on MSDN here: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj710324(v=vs.105).aspx
There is no public API to list apps like this. The referenced settings menu is part of the OS not an exertion point for apps.
Apps are blocked from setting information like this from other apps or the OS.

Facebook login via application or webview if app is not installed in Windows phone 8

Basically I want to achieve the same fucntionality which you normally see in android or ios devices. So if I click on login it should open facebook application(not webview) if facebook is installed but in case app is not installed it should open webview.
Currently it shows me a message do you want to search on store which I don't want.
Any help will be highly appreciated.
Thanks
Vinod
Windows Phone SDK only has the API to launch an app from another app which wouldn't work in your case since you would not be able to share session tokens.
Your best approach to achieving this would be to try out the third party Facebook SDK for .NET. Take a look at the Login API which seems to provide the ability to invoke the facebook application on the app and if not available would take the user to the store (LoginBehaviorApplicationOnly - Windows Phone 8.1).
I understand you would like to bring up the WebView if app isn't available but this SDK doesn't seem to have that functionality. You could contribute to the project or request a feature addition.
Hope this gives you a good start?

How can I get a UX similar to the Windows Store app for Live account login when the user has a linked Windows/Microsoft account?

I’m working on getting data sync happening for my Win8/WP8 app - written in XAML/C#. Periodically / or at app start up / suspend, I want to sync data files with the user’s OneDrive. To do that I need to get them to login to their Microsoft Live Account. I was looking to use Live SDK (v5.6) to do that.
Problem:
For users who have local Windows 8 accounts, the Live SDK lets me sign then in with a built-in credential prompt. This is working.
For users who have linked their Microsoft account with their Windows 8 account (and are logged in to Windows using their Microsoft account) the Live SDK lets me use single sign-on - and I have this working.
But I can’t call sign out, in order to sign in with a different Microsoft account.
1b is my problem. The built-in Windows Store app, lets users have a UX where they can use the MS account linked to their Windows account - OR - choose to use a different MS account. In effect: a ‘sign in as different user’ option. (See attached). It doesn’t look like it is technically single-sign-on in the built-in Windows store app, but that’s the UX I want - I don’t care so much for single sign-on, its a nice to have, but sign-in as a different user is a very important requirement.
What I’ve tried:
Lots of searching around. Found a bunch of people on the interwebs asking for the same thing. There are unanswered questions and even some ‘accepted’ answers on SO that don’t really work:
Sign in to multiple Microsoft account in Windows Store app
Windows Live SDK doesn't LogOut()
(incorrect answer)
Can the Windows 8 Live SDK use another Microsoft Account other than the current user? (incorrect answer)
I’ve forked the LiveSDK on Github (https://github.com/krishna-nadiminti/LiveSDK-for-Windows/commit/2cdb5408c0d8482c026cd96da6b99e4633677081) and tested it out - with and without requesting the ‘wl.signin’ scope - no good. It doesn’t have an option to change user.
Looked through the docs for WinRT - OnlineIdAuthenticator class, there is an option to always show CredentialPrompt when signing in users - but it does not allow the user to change the username if signed in via a linked account.
I looked through the built-in WinStore app’s js code and it uses some internal (native?) call to a ‘OMStub’ - which has methods to auth the user. This doesn’t seem to be part of the public JavaScript Live SDK
Question(s):
Are there Win32 / WinRT APIs that I could use to show credential prompts in a XAML app?
Can I use a WebView and auth users that way?
Should I just fall back to using the REST API and roll my own auth flow + UI for this?
How does the WinStore app do it?
Workarounds / Store certification:
For now, I’m a bit worried I only have the last option: roll my own .NET client over the Live connect REST API, and add my own UI for the credential prompt, and a user consent dialog which look exactly like the ones that the Windows Runtime provides. What will happen to store certification in that case? I can run it past WACK first - but the store app cert guidelines don’t talk about this: so unsure whether it will pass certification.
There is no mention of Microsoft account that I could find in the app certification guidelines.
The docs for Live SDK on MSDN explicitly mention that we’re not meant to create our own login UI: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh968445.aspx
However, the store app seems to violate this - may be because it doesn’t use the Live SDK at all.
There is also a MSDN article that says when the user signs in to Windows with a Microsoft account, sign out is just not possible from inside an app:
http://msdn.microsoft.com/en-us/library/windows/apps/jj193591.aspx#adding_user-authentication_functionality_to_your_windows_store_apps and that the only way is for the user to dissociate the Windows/Microsoft account or switch to a different user account.
Again - clearly this is not the case. The store app provides users a way to use a different account.
Help please?
You might want to look into the Web Authentication Broker: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn448945.aspx
It will invoke the actual Microsoft Account login flow but still give you the flexibility to sign out and back in as another user.

How to subscribe to get ShareLinkTask notifications in Windows Phone Mango?

In windows Phone Mango there is ShareLinkTask that allows users to share URL over email or with some application (Twitter client etc).
I cannot find phone API to subscribe my application to be able to receive URLs like that.
I would like my application to be on the list off apps to which user can share URL when he wants for example with long press on link in Internet Explorer and be able to get URL info when user shares that link with my app.
There are only Pictures Extensibility and Search Extensibility exists for Windows Phone 7
All extensions are declared in WMAppManifest.xml in extensions scope, so you can check yourself that there are no more extensions at that moment
If you decompile the Microsoft.Phone assembly and look at the class in question, you can see that this API call is hard coded to invoke the Me application via interop and does not utilize any kind of a registered application lookup. It certainly seems like it would be easy enough for MS to implement however.
This is not possible at the moment.

Categories