Posts

Disable ScreenShot in Android - Xamarin.Forms

Image
Taking  ScreenShot  in device is the best way to keep record at time where you don't want to write it down or you may want to have a copy of it. Android device gives us an opportunity to capture the screen content in the form of Image. If you don't want the user to capture the screen content for the purpose of security or for some other reason, you can achieve it in a very easy way. Lets see how to achieve it using  Xamarin.Forms. You have to write a native code for android and iOS. And yes, we have to struggle for iOS, we will see why and how we can overcome it. Xamarin.Android: 1) Open the  MainActivity.cs  file under your  projectName.Droid  project. 2) In the  OnCreate()  method, write the below Line just before the  LoadApplication(new App()) .                            -   Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure); ...

Connect Mobile through Bluetooth Program

Image
Connect Mobile through Bluetooth Program Hello friends, I have searched through out the internet and I found that tutorials on Bluetooth is hardly available. There are tutorials on Bluetooth and that is very hard to understand. This tutorial will help to you to create an android app that can connect to any Mobile device through Bluetooth. And here we go... Follow below steps: 1) In the " MainActivity.cs " file write below code, Include "Bluetooth" header file as " using Android.Bluetooth; " MainActivity.cs file     If you see above code, I have created an abject of class "Receiver". This class is created in the next step.   2) To Listen the Bluetooth connection add " Receiver.cs " file as shown below, Receiver.cs file   3) Now here comes the exciting part of searching the nearby Bluetooth devices and connecting to it. Create another file called " SearchDevice.cs " as shown below, SearchDevice.cs...