title: Why Android's allowBackup is not working?
body: <p>I have in my application Android manifest:</p>
  
  <pre><code>android:allowBackup="true"
  </code></pre>
  
  <p>But in spite of using an Android 8 device the backup does not work until I manually put in the console:</p>
  
  <pre><code>adb shell bmgr backup @pm@ &amp;&amp; adb shell bmgr run
  </code></pre>
  
  <p>and...</p>
  
  <pre><code>adb shell bmgr fullbackup &lt;PACKAGE&gt;
  </code></pre>
  
  <p>as says the Android developers guide to test a backup. </p>
  
  <p>I have tested so many devices and when I put this in console it starts to work fine and I can uninstall and install the application from Google Play without losing the SharedPreferences. But if I don't write this in my Android Studio console with the device connected, the backup doesn't work.</p>
  
  <p>It's strange because many other applications restore their data, so I think that the device settings are ok and I am missing something in the code. </p>
  
  <p>This are my build.gradle sdk specifications</p>
  
  <pre><code>def valueMinSdkVersion = 15
  def valueTargetSdkVersion = 28
  </code></pre>
  
  <p>Thank you so much.</p>
  
  <p>Mauricio Güell</p>