How to use GestureRecognizer on Windows Phone 8.1 Silverlight? - windows-phone-8.1

The problem is, that in order to generate manipulations, GestureRecognizer requires to call its methods "ProcessXXX" (e.g. "ProcessDownEvent").
These methods require "PointerPoint" object.
On winrt I got this point directly from "PointerXXX" event args (e.g. "args.GetCurrentPoint"). However, I don't have this in Windows Phone.
So, my question is: how I can make GestureRecognizer to work on Windows Phone 8.1 Silverlight?
Thanks

Thanks to Rob Caplan from Microsoft, I have a solution.
CoreWindow is available for Windows Phone, and it has PointerXXX events, which can be used for GestureRecognizer.

Related

How do I remote into Windows Phone 8 using WinRT?

I found this link (Project My Screen).
However, I really want to control a Windows Phone from another Windows 8 or Windows 10 device.
Can I do this?
If not then how can I?
There are no APIs that allow for this. WinRT doesn't have them, and it would require very low-level access to make this happen.

CurrentApp.ReportConsumableFulfillmentAsync vs CurrentApp.ReportProductFulfillment

I have to implement "in-app purchase" both for Windows 8.1 and Windows Phone 8 app. The API looks the same for both platforms, besides one method: "CurrentApp.ReportProductFulfillment" (only WP has it). However, both platforms have "CurrentApp.ReportConsumableFulfillmentAsync".
My preference is to write fully reusable code (same code) for both platforms, if possible. MSDN documentation is not clear enough, so I want to understand:
Can I use ReportConsumableFulfillmentAsync on WP instead of ReportProductFulfillment? Are they have the same functionality? (maybe they left ReportProductFulfillment for backward compatibility).
Do I have to call ReportConsumableFulfillmentAsync after buying consumable only, or after every store purchase?
Thanks!
According to MSDN ReportConsumableFulfillmentAsync is Windows Phone 8.1 API, so you cannot use it when creating Windows Phone 8 apps. Stick with ReportProductFulfillment and Windows Phone 8 apps for now, it will take some time for Windows Phone 8.1 to get on the market
Only for consumables
If your are looking or a nice in-app wrapper, take a look at this https://github.com/igorkulman/Kulman.WP8/blob/master/Kulman.WP8/Services/WindowsPhoneStoreService.cs

Starting with audio in Windows Phone 8

I recently started doing some development in the Windows Phone 8 OS I'm pretty new on this. I was doing some searching about the fact to create an app who play any audio for some specific events/actions.
I was reading the Windows Phone API reference from Windows Phone Dev Center http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626516%28v=vs.105%29.aspx#BKMK_Win32andCOMAPIforWindowsPhone
But it seems a little confusing to me at first glance and I have the doubt of which one of the following should I use to accomplish my task.
The .Net API for Windows Phone
Win 32 and COM API
... or the Windows Phone Runtime API
Any help would be very appreciate
It really depends what you're trying to do. If you're writing a native application or are interested in cross-compatability with Windows 8 then XAudio2 or the WinRT APIs are definitely the way to go. If you just want to play some infrequent sounds (say, when you pop up a warning dialog) from within a XAML app then I have seen a number of approaches, teh easiest of which is probably just having a MediaElement in your XAML that you use to play the audio.

Porting Windows 8 Metro App to Windows 8 phone App- identify API that are not implemented

I am porting a Windows 8 Metro application to a Windows 8 Phone app.
While the Win 8 phone app compiles, there are many API's which throw the API not implemented exception at runtime.
Is there a way to identify all the API's that are not implemented in an existing source?
The only way I can think of doing is to identify all API's being used in my app and then check if that API is supported or not.
Thanks,
Avinash
MSDN will specify if a given API is not implemented.
It will have a section like this: (for example see this page which is a common example).
Remarks
Windows Phone 8
This API is not implemented and will throw an exception if called.
It's quite confusing as lower down the page says...
Minimum supported phone Windows Phone 8
... but that's misleading as you have found already.
I think tooltips from Intellisense may help you as well from within Visual Studio.

Windows Phone 8 - Simulate touchscreen events

What would be the best approach to simulate a user tapping on a touchscreen of a Windows Phone 8 device?
One approach I could imagine is to use native code to call the Win32 API functions which control the mouse events. This would assume that touchscreen events are more or less the same as mouse events, and that these API functions are accessible. Does anyone know if this is the case on WP8?
Another approach would be to have something like the Android ADB for the Windows Phone. On Android, one can use ADB to control the device from the PC and also simulate touch screen events (e.g. via Monkeyrunner). I haven't found any information if there is a tool like ADB for Windows Phone 8.
The purpose of finding a solution for this is the integration of Windows Phone 8 devices in an automated testing process.
I found out that there is a DLL file named InputInjection.dll in the System32 folder of the Windows Phone 8 (at least in the simulator image I mounted).
This library contains the following functions:
ApiInjectInitialize
ApiInjectTouchEvent
ApiInjectButtonEvent
ApiInjectEnableExclusive
ApiInjectUninitialize
Doing some research, I found out that there are official ways to simulate touch input for Windows 8 development:
http://social.technet.microsoft.com/wiki/contents/articles/6460.simulating-touch-input-in-windows-8-preview-versions-using-touch-injection-api-en-us.aspx
http://msdn.microsoft.com/library/windows/desktop/hh802896(v=vs.85).aspx
However, the functions used for Windows 8 development are not available on Windows Phone 8. But the functions are named similarly to the ones I found in InputInjection.dll:
InitializeTouchInjection similar to ApiInjectInitialize
InjectTouchInput similar to ApiInjectTouchEvent
(...)
I wasn't able to find any documentation on InputInjection.dll and its functions. These functions also don't appear in the header files of the SDK. Maybe Microsoft uses these functions internally for their own tests during Windows Phone development.
The question is: Is it possible to access this library and call these functions somehow? This would be similar to using "Private APIs" on iOS, I guess. I tried several ways to achieve this with a Windows Phone 8 app using native C++ code, but I had no luck so far (the basic reason is that the apps run sandboxed on Windows Phone). Is there any way to get a binary running on Windows Phone (maybe via a debug bridge or something)?
You can access all those API's From Win32 Service/ Kernel Driver. Include the header file to your source code and Library of injection method it will work