Monday 8 February 2016

iOs style Badge Icon in android App using Xamarin


Here I'm going to describe how can you add badge icon on application's icon in android device using Xamarin.

Though there is no universal way of implement in all device is available, still some manufacturers support adding a badge on applications icon. And there are a lot of ways available for implementing that is android.

But here I wanted to achieve that by using Xamarin so I have rewrite the android code in C# and here I'm going to share that information.

So following are steps for it.

1.)  So here first step is to add permission in AndroidMenifest file in Droid project. Since different merchants has different permission for the badge implementation, here I'm going to add all the available permission.



2.) Second Step is to create a abstract class,



3.) The next step is to implement the previously created abstract classes that will actually check if launchers are appropriate and update badge on application's icon. Here is sample for Samsung Device.


I have attached all possible implementation for other devices and attached a file for it.

4.) Next step is to to create a method to get supported launcher and for that we need to find supported launcher in device and compare with all implemented launchers.


5.) And then actually call "executeBadge" with count that you want to set,

Here I have attached the file where you can download demo application.
https://drive.google.com/file/d/0B0dJLMU9SXZHemx5bzlPLTlPbXVoX0ZYQ0xtOVdiMVZfT1Nv/view?usp=sharing


Let me know if you find any issue in it or want to rectify any information.

References :
http://vardhan-justlikethat.blogspot.in/2014/07/android-ios-style-badge-app-icon-for.html
https://github.com/leolin310148/ShortcutBadger

(Solved) Maximum Request length Exceed error in .Net Application

When working with file in .net which has large uploads it gives error “Maximum Request length Exceed” because default upload file size is 4MB. So if we want to upload file size greater than 4MB we need to increase size of file upload size in web.config file.
So to increase size of upload file we need to add following blocks to web.config file
  1. MaxRequestLength is given in KB and is the max size of request supported by ASP.NET
  2. MaxAllowedContentLength is given in bytes and is max length of content in a request supported by IIS.
  3. Here, Both values MaxRequestLenth and MaxAllowedContentLength properties has same value 1 GB in KB and bytes respectively
  4. If in an application both value is specified, then smaller from both value gets the priority.
For more detail you can refer,
http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded

Monday 28 December 2015

Integrate Twitter Bootstrap Slider using Angular Js

We have been working to integrate responsive slider in angular js. So we used the following bootstrap css and converted it into angular js.


Bootstrap Css Version : v3.0.0
Angular Js Version : v1.2.0-rc.3
Plugin Used for Slider : http://extremecss.com/demos/bs_carousel/


The plugin is simple slider using bootstrap classes
  • Below code shows the main image code for slider.


    We need to provide “active” class to the start image which is done using ng:class property

  • Below code shows the indicator code for slider.


  • We have added method setCurrentSlideIndex method to slide to the current slide inspite of using bootstrap’s data-to-slide property using carousel method which is shown below:


  • Below, methods shows the next and previous functionality of the slider.