Posts

Finding Lost Windows Product Key Using Command Prompt Or PowerShell

Image
In this article we will go through some different methods by which we can find our lost Retail Product Key of our Windows 10/8.1 using command prompt or PowerShell from BIOS/Registry. When we activate our windows copy using a product key, the information will be stored inside the Windows Registry. It is to be noted that the manufactures had stopped pasting their Certificate of Authenticity (COA) sticker, which shows the Windows Product Key on the machine. Now this Product Key is stored in the BIOS/UEFI. As per the  Microsoft Windows Desktop licensing terms and conditions , the Retail Product License will be given to the person whereas the OEM Product Key is attached to the machine. Let's get started with Command prompt. Run the Command Prompt as Administrator, type the following code snippet and hit Enter. wmic path softwarelicensingservice  get  OA3xOriginalProductKey     Let's try the same with Windows PowerShell. R...

Authentication by Xamarin.Auth in Xamarin.Forms

Image
We always encounter the need for authentication in most of our applications. It's a struggling process to authenticate the user by interacting with services like Twitter, Facebook and so on. Here I'm creating a simple method of authentication using  Xamarin.Auth.  The Xamarin.Auth component is a great time saver for authentication. The authentication cardinals are given for authentication. Authenticators are responsible for managing the user interface and communicating with authentication services. Authenticators take a variety of parameters, like the Client ID, its authorization scope, the authorization URL, redirect URL and so on, since it varies depending on the authenticators. var  auth  =  new  OAuth2Authenticator   (   clientId: "", // your OAuth2 client id   scope: "", // the scopes for the particular API y...

Remove Android Action Bar Icon in Xamarin.Forms

Image
In this article we are creating a custom control renderer for Xamarin.Forms allowing developers to override the default native rendering of a Xamarin.Forms control with their own platform-specific code. We have seen many Xamarin related forums having a strong discussion about removing the action bar icon from an Android project in Xamarin.Forms. Many of them suggest making the application icon as transparent by altering the MainActivity.cs in Android project somewhat like the following: [Activity (Label = "Sample Application", Icon = "@android:color/transparent", MainLauncher = true] In this condition no one notices that by altering like this they are making the application icon to be transparent. As a result the application will not show an icon when it is installed on a device. Today we are showing a way to render your page so that you will be able to remove the unwanted action bar icon depending on your needs. Here I'm going to render the Navigat...

Barcode Scanner Using Xamarin.Forms

Image
For creating a Barcode Scanner, I will use the NuGet package  Arc.BarCodes , a cross-platform creator built on top of ZXing.Net.Mobile to allow for easy cross-platform access from Shared/PCL core libraries. Now we can set some permissions for Android and Windows to get access to the camera. This is for taking the clear picture of the barcode that we want to scan. For Android open the  AndroidManifest.xml  and select  CAMERA  from the  Required Permissions . Now open  WMAppManifest.xml  for setting permissions to Windows Phone then select ID_CAP_ISV_CAMERA  from  Capabilities . Now we want to initialize the corresponding NuGet package in each platform-specific startup classes. For example, AppDelegate.cs for iOS, MainActivity.cs for Android and MainPage.xaml.cs for Windows Phone by calling  global::Acr.BarCodes.BarCodes.Init();  before calling  LoadApplication();  Now create a button on the page for the...

Interacting With Local Database in Xamarin.Forms

Image
It's very common for a mobile application to use a local SQLite database. The combination of Sqlite.net and Xamarin.Forms makes this very easy. One of the reasons that we choose SQLite as our mobile database is that it's a single file and easily works across platforms. iOS and Android both have the SQLite database engine built in and access to the data is simplified by Xamarin's platform that comes with the SQLite Data Provider . Here I'm showing how to create a small project to store my notes into the local database. In this app we can save data, view the saved data and also we can update and delete the saved data. Before beginning to use it we must add the SQLite.Net-PCL NuGet package to the solution. Add SQLite Net PCL NuGet package There is one more important task to do before coding, that is to add SQLite for Windows Phone . For that right-click on References in the Windows Phone project and select Add references . Add References ...

Code to Launch the Phone Dialer in Xamarin.Forms

Image
When we code to start a voice call, we must be aware of  Dependency Service  in Xamarin.Forms. DependencyService in Xamarin.Forms provides access to the native functionality and some platform-specific implementations of the iOS, Android and Windows Phone SDKs from your PCL or Shared Project. To start a voice call there are some platform-specific implementations and permissions. 1.  The following is the procedure to implement the voice call in Xamarin.Forms. Let's create a ContentPage with an entry and a button as  HomePage.cs. 2.  Create an interface  IPhoneCall.cs  in the shared code that shows the functionality that we intend to implement. 3.  The Interface must be implemented in each platform-specific application project. Android implementation:  Before implementing the interface in Android don't forget to set some permissions in  AndroidManifest.xml . These permissions are necessary for invoking a voice call in Andr...