Saving user preferences in iOS using Xamarin

Introduction:
Xamarin provides a number of ways to save data in iOS using Local Storage. User preferences are generally stored in Library/Preferences/.
Xamarin iOs provides its built in mechanism i.e. instead of creating files directly in the directory it is suggested to use NSUserDefaults class to save data.

Description:
NSUserDefaults class provides its own built in mechanisms to save float, double, integers, Boolean and URL data. To save a custom object it should be converted to NSData object using NSUserDefaults.
Continue reading

Advertisements

GPS Location Tracker using Xamarin

Mobile devices are smart enough to provide the geo-location coordinates by consuming the GPS API embedded inside.
Let’s get the geo-coordinates and a street address which is close to the location using Xamarin. In the below example I have demonstrated the same in Android environment.

Following are few steps

Step #1
After creating a new Xamarin Android app add some common permission in AssemblyInfo.cs

[assembly: UsesPermission(Manifest.Permission.Internet)]
[assembly: UsesPermission(Manifest.Permission.AccessFineLocation)]
[assembly: UsesPermission(Manifest.Permission.AccessCoarseLocation)]

Step #2 Continue reading

Scrollview as TableView with Titanium

Introduction :
With multiple view added vertically on a scrollview looks as a tableview on a screen. By adding views one after another to scrollview, we can change that scrollview as a tableview with Titanium.

Summary :
Referring to the above video, it describe the use of scrollview as tableview using Alloy in Titanium.

THAT’S IT

Presented By: Raju Mahato, Software Developer, Mindfire Solutions

Searching on Table with Titanium on CrossPlatfrom App

Introduction
Generally we use table-view to display data in different rows with table format in an application and adding search functionality on those table data is very common. So let me demonstrate the ways to search data among the table rows.

Description
To display data in row format Titanium provides API called Table-View. So lets use table-view to display data on screen and then will add search functionality. Suppose we have a window called home where we will have our table.

Continue reading

Tableview in Cross-Platform App using Alloy in Titanium

Introduction :
Its a very common functionality or requirement to display data in rows format. In order to do so Titanium provides API like ‘TableView’ which can be used to make table format with different rows. Below is a description on how to use the table view with Alloy in Titanium. Alloy supports the most popular design pattern i.e. MVC, which generally have model, view and controller structures. We will follow the same pattern in Titanium.

Description :
Using Alloy, we will have a view which will hold all the UI components to be displayed on screen and will have a controller for this corresponding view. Currently we will not go for building any model as we don’t need it.

Continue reading