Migrate Android Application API to 28+

Google has updated their target Api’s from August 2019 and new applications must target 28+ and existing applications can use API level 26 up to November 2019.
as they have shared here inĀ Link.

Now the problem is how to update existing application to the latest API.

here is my research, may be it can help you.

  1. add
    android:usesCleartextTraffic="true" inside Android Manifest application tag
  2. It won’t allow you to start foreground service untill you start a notification on topbar which indicates that app is running in background.
    Solution: Add permission in AndroidManifest.xml in Application tag.

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
  3. For the notifications of Service follow this link of stack overflow .
  4. Go to build.gradle and change your
    compileSdkVersion = 28
    
    and
    targetSdkVersion = 28
  5. Update google related apis like support API to 28.0.0
  6. Add following code for Http Legacy in your AndroidManifest.xml application tag.
    <uses-library
        android:name="org.apache.http.legacy"
        android:required="false" />

 

got any issues in Android ? approach me andtechies@gmail.com