Android NDK - How to get coordinates from a tap event? - events

I am very new to developing using the Android NDK, and I would like to know, what is the easiest way to get coordinates from a tap event using the Android NDK? I think I have to include the input.h header and use one or more of the AInputEvent methods. Could anyone help me here? I am just getting started, so I don't have any code as of other than the base Java and C++ code required for an NDK project.

Related

Can you cast MaterialTextField as an Entry?

I have successfully followed the instructions to implement a Password AutoFill effect on Xamarin.Forms Entry elements - this is behaving properly on both Android and iOS platforms. However, I am unable to get the effect to work when I use it on the MaterialTextField element from the XF.Material library.
I believe that the issue comes down to the native effect implementation for both iOS and Android, where I cast the xamarin form elements to native platform elements; in Android I need to use an EditText element, while in iOS I need to use a UITextField element. I haven't been able to cast the MaterialTextField to either of these elements.
Is this even possible using the XF.Material library element like this? Any suggestions would be greatly appreciated! Thank you to everyone in this community!

How to enable Xamarin app as share target in Xamarin.Forms?

I have a Xamarin.Forms application that I would like to enable as a text and/or URL share target. I've done this in a Windows UWP app by handling OnShareTargetActivated, but I don't see an equivalent in Xamarin.Forms. I am willing to use compiler directives if needed; I would prefer that to doing iOS/Android/Windows specific things in the corresponding projects themselves. Right now all my code is in the Xamarin.Forms project and I'd like to keep it that way.
Unfortunately Android and Ios do not have a similar share event so there is no equivalent event in xamarin forms.

Appcelerator Make an app that changes phone's time

I want to make an app in Appcelerator that can change the time of your phone, but I dont know the code to let it change because I am new to Appcelerator.
Thanks!
If it’s possible in the underlying phone SDK (iOS I believe has a public API for this) then yes you could achieve this using the new Hyperloop module, currently in beta and released later this month — this would allow you access the underlying SDK directly via JS in your Ti SDK project.

Geofencing Xamarin Android not working

We have a problem in implementing Geo-fencing in Xamarin Android. There is no documentation found for Geo-fencing for monodroid. So we have tried it by simply porting the Android code to Xamarin with the new Geo-fencing API that uses 'LocationServices' from the below link.
https://github.com/googlesamples/android-play-location/tree/master/Geofencing
But this is not working in xamarin. The same native Android code is returning the Geo-fence transition events.
We are using GooglePlayServices version 22.0.0.0 library.
We have also attempted the example given in below link, which is actually a monodroid sample. This implementation is based on the deprecated class 'LocationClient'. For this we have downgraded the 'GooglePlayServices' to version 21.0.0.
https://github.com/xamarin/monodroid-samples/tree/master/wear/Geofencing
But this is also not working. In both implementations the connection callbacks are fired. That is we will get Geo-fence added messages. And the Service is also started. But the transition events such as 'Initial Trigger', 'Transition Enter', 'Transition Exit' not firing. Please advice on this.

How do I get Android Styleguide Switches in Appcelerator?

The on/off switches shown on http://developer.android.com/design/building-blocks/switches.html#switches are awesome. I can't figure out how to get them in Appcelerator
It is not a titanium thing, it is android. If you want to support 2.x, you cant have the 4.x look. You would have to change the manifest to change the SDK level support. Here is a good article that helped me. http://developer.appcelerator.com/doc/mobile/android-custom-androidmanifest

Resources