Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Unity - Android - Background Service and Remote Config

Discussion in 'Scripting' started by kl3in3rhack3r, Mar 9, 2021.

  1. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    Hello,

    I am try to read values from Remote Config from an Android Background Service.
    Why? I want to notify the user via Android Notification if a Remote Config Value was changed (like a "news" property).

    What is the best way to read Remote Config values from an Android Background Service?

    THX :)
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,768
    Do you mean from the Unity service? There's more info here:

    https://unity.com/remote-config

    Otherwise it's just some kind of REST call, probably with UnityWebReqest to whatever "android background service" you are talking about.
     
  3. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    Sorry, I need a solution to do this from an Android Background Service that must write in Java. I cannot access the Unity scripting solutions to do this.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,768
    If it has to be Java, I guess break out the Android docs and Android Studio... I haven't done any Android Service stuff myself and that is far outside of the Unity context, but you can use these handy Unity classes to interoperate with Android OS from within a Unity program:

    https://docs.unity3d.com/ScriptReference/AndroidJavaClass.html
     
  5. kl3in3rhack3r

    kl3in3rhack3r

    Joined:
    Nov 22, 2018
    Posts:
    15
    That is not my point of interest. I need a solution to get the Remote Config values from Java Code. I now how to write a native Android App and a native Android Service. But I must get the Remote Config values from this service.

    Sorry.