title: There is limitation in the use of Windows Azure Mobile with Android service that start at boot?
body: <p>I wrote an Android application that communicates with Windows Azure Mobile Services typically sends data between the device and the android Azure database, but when I inserted the same code a service that starts automatically on boot does not run.
  I have no problems with Android services started at boot.
  I have no problems with Windows Azure Services Android services.</p>
  
  <p>But when one both (service started at boot Android + Windows Azure Services) does not run.</p>
  
  <p>I need help please!</p>
  
  <p>ItemReceiver.java</p>
  
  <pre><code>package com.example.itemreceiver;
  
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  
  public class ItemReceiver extends BroadcastReceiver {   
  
      @Override
      public void onReceive(Context context, Intent intent) {
        Intent myIntent = new Intent(context, ItemService.class);
        context.startService(myIntent);
      }
  }
  </code></pre>
  
  <p>ItemService.Java</p>
  
  <pre><code>package com.example.itemreceiver;
  
  import java.net.MalformedURLException;
  import com.microsoft.windowsazure.mobileservices.*;
  import android.util.Log;
  import android.app.Service;
  import android.content.Intent;
  import android.os.IBinder;
  
  public class ItemService extends Service  {
      private static final String TAG = "++Service++";
      private MobileServiceClient mClient;
  
      @Override
      public IBinder onBind(Intent arg0) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public void onStart(Intent intent, int startId) {
  
          // TODO Auto-generated method stub
           try {
               mClient = new MobileServiceClient( 
                       "https://bn7.azure-mobile.net/",
                        "nFdklchhdEhCuUsmSZVsxgYLPeaOLo64",
                      this 
                      );
              Item item = new Item(); 
  
              // Phone Number
              item.IdPhone = "005511964271485";
  
              // IMEI
              item.IdImei =  "351597055788723";
  
              item.DateTimePhone = "2013-05-03 14:00:00"; 
  
              item.Active = false; 
              mClient.getTable(Item.class).insert(item, new TableOperationCallback&lt;Item&gt;() {
              @Override 
              public void onCompleted(Item entity, Exception exception, ServiceFilterResponse response)               { 
              if (exception == null) { 
                           // Insert succeeded
                          Log.d(TAG, " Insert Sucess");
                                              } else { 
                           // Insert failed
                          Log.d(TAG, " Insert failed");
                          Log.d(TAG, " toString = " + exception.toString());
                          Log.d(TAG, " getCause = " + exception.getCause());
                          Log.d(TAG, " getStackTrace = " + exception.getStackTrace());
                      } 
                   } 
                  });
         } catch (MalformedURLException e) {
             Log.d(TAG, " MalformedURLException " + e.toString());
         }
         this.stopSelf();
      }
  
        @Override
          public void onDestroy() {
              // TODO Auto-generated method stub
              super.onDestroy();
              Log.d(TAG, "FirstService destroyed");
          }
  }
  </code></pre>
  
  <p>Manifest</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.bn7.rotareceiver"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="17" /&gt;
          &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
          &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
          &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
  
          &lt;receiver android:name=".RotaReceiver" android:enabled="true" android:exported="false"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED"/&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
  
          &lt;service android:name=".ServiceRota"  android:process=":Service_Rota"&gt;&lt;/service&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Error
  Exception.toString = com.microsoft.windowsazure.mobileservices.MobileServiceException: Error while processing request.
  Exception.getCause = java.net.UnknownHostException: bn7.azure-mobile.net
  Exception.getStackTrace = [Ljava.lang.StackTraceElement;@40519770</p>