Android Question dosnt work in the version android 10

Discussion in 'Android Questions' started by HAH, Nov 30, 2019.

  1. HAH

    HAH Active Member Licensed User

    Hello all
    I built Android application the following manifest file code,
    The application doesn't work and it shows message attached with this thread and the other at the image shows the version my clients updated to
    Code:
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "4" android:targetSdkVersion="21"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    SetApplicationAttribute(android:supportsRtl, 
    "true")
    'End of default text.

    SetApplicationAttribute(android:theme, 
    "@style/MyAppTheme")
    SetApplicationAttribute(android:
    label"$LABEL$")
     

    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
    CreateResource(values, themes.xml,
    <resources>
        <style name=
    "MyAppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <item name=
    "colorPrimary">#FF9800</item>
            <item name=
    "colorPrimaryDark">#F57C00</item>
            <item name=
    "colorAccent">#FFA726</item>
            <item name=
    "windowNoTitle">true</item>
            <item name=
    "windowActionBar">false</item>
            <item name=
    "windowActionModeOverlay">true</item>
        </style>
    </resources>
    )
    '************ Google Play Services Base ************
    AddApplicationText(
       <
    activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
      android:theme=
    "@android:style/Theme.Translucent.NoTitleBar"
      android:exported=
    "false"/>
        <meta-data
      android:name=
    "com.google.android.gms.version"
      android:value=
    "@integer/google_play_services_version" />
    )
    '************ Google Play Services Base (end) ************

    '************ Firebase Base ************
    CreateResourceFromFile("google-services""google-services.json")
    AddPermission(android.permission.ACCESS_NETWORK_STATE)
    AddPermission(android.permission.INTERNET)
    AddPermission(android.permission.WAKE_LOCK)
    AddPermission(com.google.android.c2dm.permission.RECEIVE)
    AddPermission(${applicationId
    }.permission.C2D_MESSAGE)
    AddPermission(com.majeur.launcher.permission.UPDATE_BADGE)
    AddPermission(com.anddoes.launcher.permission.UPDATE_COUNT)
    AddPermission(com.sonyericsson.home.permission.BROADCAST_BADGE)
    AddPermission(com.htc.launcher.permission.READ_SETTINGS)
    AddPermission(com.htc.launcher.permission.UPDATE_SHORTCUT)
    AddPermission(com.sec.android.provider.badge.permission.READ)
    AddPermission(com.sec.android.provider.badge.permission.WRITE)
    AddManifestText( <permission android:name="$
    {applicationId}.permission.C2D_MESSAGE"
      android:protectionLevel="signature" />)
    AddApplicationText(
    <receiver
      android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
      android:enabled="true">
      <intent-filter>
      <action android:name="com.google.android.gms.measurement.UPLOAD"/>
      </intent-filter>
      </receiver>

      <service
      android:name="com.google.android.gms.measurement.AppMeasurementService"
      android:enabled="true"
      android:exported="false"/>
       <provider
      android:authorities="$
    {applicationId}.firebaseinitprovider"
      android:name="com.google.firebase.provider.FirebaseInitProvider"
      android:exported="false"
      android:initOrder="100" />
        <receiver
      android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
      android:enabled="true">
      <intent-filter>
      <action android:name="com.google.android.gms.measurement.UPLOAD"/>
      </intent-filter>
      </receiver>

      <service
      android:name="com.google.android.gms.measurement.AppMeasurementService"
      android:enabled="true"
      android:exported="false"/>
       <receiver
      android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
      android:exported="true"
      android:permission="com.google.android.c2dm.permission.SEND" >
      <intent-filter>
      <action android:name="com.google.android.c2dm.intent.RECEIVE" />
      <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
      <category android:name="$
    {applicationId}" />
      </intent-filter>
      </receiver>
        <receiver
      android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
      android:exported="false" />


      <service
      android:name="com.google.firebase.iid.FirebaseInstanceIdService"
      android:exported="true">
      <intent-filter android:priority="-500">
      <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
      </intent-filter>
      </service>
    )
    '************ Firebase Base (end) ************

    '************ Firebase Notifications ************
    AddApplicationText(
        <service
      android:name="com.google.firebase.messaging.FirebaseMessagingService"
      android:exported="true">
      <intent-filter android:priority="-500">
      <action android:name="com.google.firebase.MESSAGING_EVENT" />
      </intent-filter>
      </service>
       <service android:name="anywheresoftware.b4a.objects.FirebaseNotificationsService">
         <intent-filter>
      <action android:name="com.google.firebase.MESSAGING_EVENT"/>
         </intent-filter>
       </service>
    )
    '************ Firebase Notifications (end)************

    '************ Firebase Analytics ************
    AddApplicationText(
      <receiver
      android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
      android:enabled="true">
      <intent-filter>
      <action android:name="com.google.android.gms.measurement.UPLOAD"/>
      </intent-filter>
      </receiver>

      <service
      android:name="com.google.android.gms.measurement.AppMeasurementService"
      android:enabled="true"
      android:exported="false"/>

      <service android:name="com.google.firebase.crash.internal.service.FirebaseCrashReceiverService"
      android:process=":background_crash"/>

      <service android:name="com.google.firebase.crash.internal.service.FirebaseCrashSenderService"
      android:process=":background_crash"/>
    )
    AddManifestText(<uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="18" />
    )


    AddPermission(android.permission.RECEIVE_SMS)
    AddReceiverText(serviceforsms,
    <intent-filter>
      <action android:name="android.provider.Telephony.SMS_RECEIVED" />
    </intent-filter>)
    I hope to find answer I
    and will be thankful
     

    Attached Files:

  2. Brandsum

    Brandsum Well-Known Member Licensed User

    change the target sdk to 26 or above
     
    Sagenut likes this.
  3. Pendrush

    Pendrush Well-Known Member Licensed User

    Current minimum for google play is android:targetSdkVersion="28"
     
    Sagenut likes this.
  4. Erel

    Erel Administrator Staff Member Licensed User

    DonManfred likes this.
  5. HAH

    HAH Active Member Licensed User

    may i update the SDK using the SDKmanager.bat in b4a IDE ,may it updates the (android.jar) file
    note:when i open the SDKmanager message saies that (avdmanager.bat) is missing.
     
  6. DonManfred

    DonManfred Expert Licensed User

    Last edited: Dec 3, 2019
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice