Friday, 1 February 2019

Android Activity Lifecycle

When a user navigates through an Android App, a series of events occurs. For example, when a user launches an app, e.g., the Facebook App, it starts and becomes visible on the foreground to the user, onCreate() → onStart() → onResume().
If another activity starts, e.g., a phone call comes in, then the Facebook app will go to the background and the call comes to the foreground. We now have two processes running.
onPause()  --- > onStop()
When the phone call ends, the Facebook app returns to the foreground. Three methods are called.
onRestart() --- > onStart() --- > onResume()



There are 7 lifecycle processes in an Android activity. They include −
  • onCreate − It is called when the activity is first created.
  • onStart − It is called when the activity starts and becomes visible to the user.
  • onResume − It is called when the activity starts interacting with the user. User input takes place at this stage.
  • onPause − It is called when the activity runs in the background but has not yet been killed.
  • onStop − It is called when the activity is no longer visible to the user.
  • onRestart − It is called after the activity has stopped, before starting again. It is normally called when a user goes back to a previous activity that had been stopped.
  • onDestroy − This is the final call before the activity is removed from the memory.


Xamarin ,Native & PhoneGap Difference

Xamarin Comparison with other Cross platform


Xamarin is built for C# coding, so typically attracts fans who appreciate the power of C# on mobile devices. They also check the ability to leverage Visual Studio and the complete lack of JavaScript as pros.Xamain performance is better than other two.

 

Ionic is most popular with Angular developers, who list rapid prototyping and its ability to reuse front end Angular code on mobile as pros.
Phone gap is backed by Adobe; developers call it easy and developer friendly and appreciate that it’s not bound to a specific framework.

Feature Xamarin Native PhoneGap
Code Portability Xamarin developer worked on single PCL project and share among the all platform for development Native Apps developer worked on single platform only.So developer need to worked each platform individually. Phonegap application also developed on the single codebase and that shared across different platform. But, need configuration to work on different platform.
Development Cost Development cost is less as compare to native development. Because single developer can work for the different platform. Development cost is high for the native application. Since, we have to employ developer for each platform to work on. Phonegap application needs a designer and developer for the development.So, its cost far less than the native and more than Xamarin development.
Development Time Development time is far less than the native development in Xamarin. Since, single codebase shared among different platform. Development time for the native application is high as development time vary for different platform. Development cost is less than the native application and more or equal to Xamarin development.
Development Language Development language remain same the each platform. For each Platform, development language differ. Here development language remain same. But, developer needs to work in collaboration with designer for development.
Maintenance Maintenace cost is far less than the native as a single developer can look after the enhancement or maintenance. Maintenance cost for the native is high as we have have deal with different developer for each platform. Maintenance cost is less than the native application. but, it cost more than the xamarin as we have to employ designer and developer for the work.
Code Re-usability Since single codebase is shared among different platform. So, single codebase can work for different platform. No Code Reusability cannot be accomplish in the native application Phonegap application also share the codebase for different platform.
Distribution App store Application distribution is done from App store App Store
Offline Mode Xamarin application also support offline mode through caching. Offline mode is supported in native application Offline Mode is not supported in phonegap application.
Cross Platform Support Yes No Yes
User Interface User interface is more or less same as the native application. Rich user interface is accomplish in native application. Web development technology is employed for development, so, a mobile end Rich UI can't be met in phoneGap.
Device Level Access Device level access is less than the native application. But, it is far more better than the other cross platform development. Device level access is high, as development is done natively for each platform. Device level access is far less than native application.

Conclusion

Xamarin is the best platform to develop the hybrid application. Xamarin is more focus on code sharing, easy to manage the user interface, time saving and cheapest as compared to other cross-platform technology and also Xamarin provides more benefits compare to other hybrid technology like Code re-usability, Maintainability, test-ability etc. That’s why we can say that Xamarin is best Cross-platform technology to develop the hybrid application.

Thursday, 31 January 2019

Xamarin.Forms.GoogleMaps


Maps library for Xamarin. Forms that optimized for Google maps.

Install-Package Xamarin.Forms.GoogleMaps -Version 3.0.4



Following Features are available on this library.

·         Map types
·         Traffic map
·         Map events
·         Panning with animation
·         Panning directly
·         Pins
·         Custom Pins
·         Pin drag & drop
·         Polygons
·         Lines
·         Circles
·         Custom map tiles

Github Link

Wednesday, 30 January 2019

Creating a parallax carousel in Xamarin.Forms

https://www.thewissen.io/creating-a-parallax-carousel-in-xamarin-forms/

Xamarin.Forms goodlooking UI Samples

No matter what you try to achieve the good looks (for example using AppCompat on Android), people are more concerned about the functionality and user experience. If your app has good graphics and very cozy looks but its performance sucks because of the heavy controls or memory leaks or any other reasons, users are going to uninstall the app in minutes.

Okey finally, 8 out of 10 users are happy with the standard UI interface in most of the apps (this applies mainly to iOS users) and they are not very big fan of super cool UI interface (games are exception to this where people love to see cool graphics plus performance and Unity is the way you want to go not Xamarin for sure).



Github Link  

A Xamarin.Forms version of the Runkeeper app to prove you can create goodlooking UI with Xamarin.Forms. Click KickassUI for more details.

Tuesday, 29 January 2019

Change Color of IPhone X top and bottom using Xamarin Forms





protected override void OnAppearing()
        {
            base.OnAppearing();

            var safeAreaInset = On<iOS>().SafeAreaInsets();
            BgStack.Padding = safeAreaInset;
        }

You can put your page inside the stacklayout
 
<StackLayout x:Name="BgStack" BackgroundColor="#FF4D4D"></StackLayout>

Helpful link Link1 ,Link2

Complete Guide: Building a Live Cricket Streaming App for 100M Users

Comprehensive guide to building a scalable live cricket streaming platform for 100M users, covering backend infrastructure, streaming techno...