I created an App for windows phone. I want to include the feature of Native share option in Windows Phone 8 (while press and holding an app. it shows 1.Pin to Start 2. Rate&review 3. Uninstall and i want to include Share option.)
Is that anyone tell me how to do this?
As far as I know, it is Not possible to add new item in system context menu.
var marketplaceDetailTask = new MarketplaceDetailTask
{
ContentIdentifier = "App ID",
ContentType = MarketplaceContentType.Applications
};
marketplaceDetailTask.Show();
Try this Link.
Not Possible. There is no Such Exposed API/Method That Can Do For You.
Related
I am building an Electron app featuring a custom Notification feature where html5 divs appear and disappear as needed on a frameless, transparent, always-on-top window.
It works great, but: I still like the Windows notification center itself, and would like to have the option to see the past notifications there, without actually displaying them on screen with the HTML5 api.
I have tried:
Looking into the HTML5 api for an option to not show a notification, or to .hide() it right away: no luck. The only method that comes close is .close(), and it removes the notification from the center as well.
Looking into packages like node-notifier, but none of the used notification dependencies offer a way to completely hide a notification.
While I mentioned Node, I will also accept any lower-level API/binding that would allow me to do this.
Thanks in advance.
With the help of #treckstar in comments, I have found a way to do what I wanted using:
NodeRT
The ToastNotification.SuppressPopup attribute
Despite a handful of troubles building NodeRT and using electron-rebuild, here's a working PoC:
const { XmlDocument } = require('#nodert-win10-rs4/windows.data.xml.dom');
const {
ToastNotification,
ToastNotificationManager
} = require('#nodert-win10-rs4/windows.ui.notifications');
const localImage = path.join(__dirname, 'icon.png');
const template = `
<toast launch="app-defined-string">
<visual>
<binding template="ToastGeneric">
<image id="1" placement="appLogoOverride" hint-crop="circle" src="${localImage}"/>
</binding>
</visual>
</toast>
`;
const xml = new XmlDocument();
xml.loadXml(template);
const toast = new ToastNotification(xml);
const notifier = ToastNotificationManager.createToastNotifier("com.myapp.testnotif");
toast.suppressPopup = true;
notifier.show(toast);
May this help whoever comes across the same highly-specific problem.
In addition to what #MadWard shows in the PoC, the suppressPopup key is really the main player of the solution.
As I was going through tons of examples and electron code I kept hitting roadblocks due to random SDK versions and libraries of things I had installed. For example, the package electron-windows-notifications, which uses NodeRT was failing to load my preload.js because the Windows 10 SDK I had installed (build 15063) needed nodert-win10-cu instead of what was being used in most solutions by default nodert-wind10-au.
SDK
Known As
Windows Version
npm Scope
Windows 10, Build 17134
April 2018 Update (Redstone 4)
1803
npmjs.com/org/nodert-win10-rs4
Windows 10, Build 16299
Fall Creators Update (Redstone 3)
1709
npmjs.com/org/nodert-win10-rs3
Windows 10, Build 15063
Creators Update (Redstone 2)
1703
npmjs.com/org/nodert-win10-cu
Windows 10, Build 14393
Anniversary Update (Redstone 1)
1607
npmjs.com/org/nodert-win10-au
Windows 10, Build 10586
Threshold 2
1511
npmjs.com/~nodert-win10
EDIT: I forgot to include the more specific steps I took getting electron-windows-notifications dependency files on this GitHub issue here. Basically everything from Python, broken node-gyp, and missing .winmd files.
Lastly Electron 14+ and NodeRT have an issue where you will need to make sure to have app.allowRendererProcessReuse = false and like the readme file says, to make sure this is running in the main.js file.
Hopefully this helps someone along the way, as I had never used Electron before until today and had learned a ton thanks to other peoples help.
in my windows phone 8 application i am using custom uri association to launch another application through my phone.
i.e
await Windows.System.Launcher.LaunchUriAsync(new Uri("sixtag:"));
but my app is not able to get certified for store because of this. the testing team tells that you app terminates unexpectedly while executing this.
now, i don't know how to deal with this.
is there any way to throw exception if the app which i am launching is not installed on phone ?
or i should try something else so my task gets accomplished and app gets certified for store as well.
You do not need to wrap your launch in try/catch or check for success as described in the other answers. As soon as you call LaunchUriAsync, the platform takes over and will automatically handle the possibility of no app being installed by asking the user if she wishes to search in the store.
A couple of things to double-check:
1) Ensure that you can successfully back into your app following the navigation to sixtag.
2) Ensure that your call to LaunchUriAsync is the direct result of a user action (eg. tapping a button)
try
{
await Windows.System.Launcher.LaunchUriAsync(new Uri("sixtag:"));
}
catch
{
MessageBox.Show("please install Sixtag from the app store","AppMissing", MessageBoxButton.OK);
}
you can perhaps display another button and on clicking directly navigate to the app store. See if this solves your problem. Do vote it up if it does :)
You are needed to handle that as shown here . Also Read out Remarks given there.
Does anybody know how can I recognize when is the app first launched? I need to show message dialog only at the first start after install. Thanks...
You can use IsolatedStorageSettings and check for a flag.
var settings = IsolatedStorageSettings.ApplicationSettings;
if (!settings.Contains("WasLaunched")) {
MessageBox.Show("First time to launch");
settings.Add("WasLaunched", true);
}
Note that re-deploying your app will reset the flag since its just a file saved in Isolated Storage but this should work if you launch your app from within emulator/actual device.
I am using the following code
Geolocator myGeolocator = new Geolocator
{
DesiredAccuracy = PositionAccuracy.High
};
Geoposition myGeoposition = await myGeolocator.GetGeopositionAsync();
Geocoordinate myGeocoordinate = myGeoposition.Coordinate;
while running the simulator each time i get the location as Redmond, is this a bug, if yes then how can we get rid out of it?
There is location sensor simulator available for Windows Phone emulator (both 7.5 and 8): How to test apps that use location data for Windows Phone.
It looks like that:
You can set current phone location to anything you want using that tool. IT also allows you to record paths and playing recorded paths.
To open it click Additional Tools button - the last one within emulator toolbar. It's hovered to yellow on photo below.
Anybody knows what is the URL to send the user to the list of my developer apps on:
Windows 8 store ?
WP8 store ?
Thanks !
For Windows 8 apps, you can use below Uri to launch your apps:
ms-windows-store:Publisher?name=[your publisher display name]
Any spaces in your publisher name should be rendered as %20.
On WP8:
http://msdn.microsoft.com/en-us/library/hh394001(v=VS.92).aspx
Use your publisher name as search term.
MarketplaceSearchTask marketplaceSearchTask = new MarketplaceSearchTask();
marketplaceSearchTask.ContentType = MarketplaceContentType.Apps;
marketplaceSearchTask.SearchTerms = "*publisher name*";
marketplaceSearchTask.Show();
For the Windows 8 store there does not appear to be an equivalent to MarketplaceSearchTask. Check out this SO Question for more info.