Turn on GPS by code in Unity - c#

I'm creating an application that use Location services, and want to give the possibility to the user to get to Location services in his android device by a simple click in the application. How must i proceed ?

On 4.4 an earlier version there was a bug which let people enable GPS programmatically. So for Android 5 and later there is no way to do that.
In Unity accessing such features can only be done using Java Plug-in.
Here is the Java code which will show a pop-up that ask the user to choose if they want let you use the GPS or not.
startActivity(context, new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
I don't know if you know how to write Java Plug-in for Unity so here is the link where you can find a comprehensive guide.
Go to this link Here you'll find how to convert your project to library after build your file will be here "build/output/aar/..."

Related

iPhone text/iMessage history

Can someone give us a pointer or two on how to access text messages and iMessages on an iPhone? We are using Visual Studio 2019, C#, and any .net framework. Our Google searches are clearly not using the right nomenclature.
We have a phone. We have the access code. We want to download the messages, read them, and archive them offline for legal purposes.
It would be lovely to get to other things, but our first priority is the text messages.
We aren't trying to develop an iOS app per se, just get to the data on the phone.
Thanks!
You won't be able to access them with an app on the phone, best you can do is back them up via iTunes or iMazing and then view them from the backup.
https://imazing.com/transfer-iphone-text-messages-to-computer

How to share the post to internet from game in unity3d?

I want to share the score from my game to social network like FB, Twitter, dll,,
and i use Native Android Plugin.
In the tutorial they said we can share it with just using this function
AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share");
when i use it, theres no error, but when i call it nothing happen too..
is there someone know where's the problem?
or is there any other way?
I had some problems with native android plugin.
Check weather android menifest merging is needed with other plugins.
Merging Adnroid Native Plugin 1
Merging Android Native Plugin 2
Use this links
Also Check in the logcat what the debug messages say for plugin if there is any error while you can get it there. Remember to use logcat for plugins as most errors unity wont be able to show.

Hide/Disable Start Button in Windows 8.1

I've searched a lot these days to find a way to programmatically hide or disable the start button in Windows 8.1, but could not find any useful information
Is there any way to do this? Either with C# or with some registry-keys...
A short explanation why I need to hide the button:
We have a .NET Desktop Application which runs on WinXP, Vista and 7 in a self-made kiosk mode. Now we have to get it running in Win8 (8.1) but as expected, the new Start-Menu (Metro, Modern UI, whatever you call it) is always there.
I already managed to disable the Hot Corners, but the Start Button in the left corner still appears when you move you mouse over it, and it also starts the Metro - what we don't want.
Any help would be appreciated!
It seems that there is no such way...
But you could use a third party tool like one of these http://lifehacker.com/how-can-i-hide-the-start-button-in-windows-8-1-1478012124.
This question belongs on SuperUser, since it's not code related, but I'll have a go at it.. You should create a system account with an assigned access. Here, read these two articles: first second
According to these articles, it shouldn't take you more than 5 minutes to achieve what you want.
... find a way to programmatically hide or disable the start button in Windows 8.1...
See Registry Key Controlling Start Button in Windows 8.1? on SuperUser. According to one commentor, there is no simple fix like a registry key. Tools like 7+ Taskbar Tweaker inject a DLL into explorer hook/subclass/redirect some of its methods.
If you are going to write your own DLL and inject it into Explorer, then you might want to take a look at Microsoft's Detours Library. I've used it in the past and its actually easy to use. The description from the website: Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments to any Win32 binary.

Is there an easy way to detect shake motions on Windows Phone 8?

I need to detect a shake movement on a Windows Phone 8 device, in order to launch a specific action. How can I do that ?
I found several mentions of a "ShakeGesture.dll" library made by Microsoft for WinPhone7, but the only place where it was available (AppHub) was replaced by the Dev Center website...
Thanks for your help!
That's odd. Looks like the AppHub to DevCenter rename broke the download links.
I've uploaded the library to my domain in the meanwhile until those links get fixed # http://JustinAngel.net/Storage/ShakeGestures.zip
Here's an example on how to use the Shake Gesture Library:
http://blogs.microsoft.co.il/blogs/arik/archive/2011/04/01/shake-gestures-library-a-windows-phone-recipe.aspx
You should be able to add a reference to the ShakeGestures.dll assembly to get started. If you're using the Windows Phone 8 SDK, I believe this library is included - you'll just need to add the reference.
UPDATE:
You should be able to download it with this link:
http://go.microsoft.com/fwlink/?LinkId=219094
I found that here. If you scroll down to "Locations and Sensors" about 2/3 of the way down, there's a link to download the gesture library as well as an example.
UPDATE 2:
Hmm. It appears that download link was the sample project. The ShakeGestures.dll doesn't seem to be in it either. I don't have VS2012 on my computer here at work, but if you do, you could open up the sample solution and see if it is referencing that DLL somehow, and maybe see where it points? It seems like it has to be using it...I just can't open it in VS2010.
Download ShakeGestureLibraryCS from Windows Phone Developer Samples:
http://code.msdn.microsoft.com/wpapps/Shake-Gesture-Library-04c82d5f
Download C# project and Build (for Release) to create the 'ShakeGestures.dll'
Add Reference to your WindowsPhone project.

finger print reader for .net windows forms / WPF or silverlight client

We are designing a solution that will be used on an internal network.
One of the requirements is to have an extra level of security beyond a simple user name and password.
Does anyone have information about how to implement a finger print reader in a .net application?
We have Thinkpads with a finger print reader.
you need an sdk (software development kit) to go with your hardware. Add that to your project references and you can communicate with the device.
It has to come from the hardware vendor.
I'm not sure which reader the Thinkpad has, so I can't give you specific information.
Have a look at the BioApi. They have a c# wrapper and if your device is BioApi compliant, you should be able to get it running. (Note, I had to modify the wrapper, but it is a fine base.)
The API can be found here: API
Also one can be found here: Not sure on compatibility

Categories