title: How to pass the Different datas to webservice according to ScreenSize
body: <p>I need to pass the Different datas to webservice according to ScreenSize
  eg:</p>
  
  <pre><code>if ((getResources().getConfiguration().screenLayout &amp; Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE)
          {  
  
          DeviceType=2;
  
       }
      else if ((getResources().getConfiguration().screenLayout &amp; Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL)
      {     
  
          DeviceType=1;
      } 
      else if ((getResources().getConfiguration().screenLayout &amp; Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_SMALL) 
      {     
              DeviceType=1;
      }
      else
      {
          DeviceType=2;
       }
  </code></pre>
  
  <p>I did this but unfortunately i didn't get correct value, I am getting the DeviceType as 0,
  This happens only when any event fires.... As i need to show the images from webservice very soon when my app is started,Any ideas!!!</p>