Top

Test still connected

Answered

Comments

2 comments

  • Pascal BORSCHNECK

    Hi Alexandre,

     

    I'll ask the Android team to have a look.

     

    Best regards,
    Pascal

    0
    Comment actions Permalink
  • Pascal BORSCHNECK

    Hi,

    I got a reply.

    For the moment, before allowing partners/dev to add needed certificates for PUSH for the company/appId on prod server, the only way is to not go in DOZE mode.

    Here is a part of code:

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
    {
        String packageName = getPackageName();
        PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
        if (!pm.isIgnoringBatteryOptimizations(packageName))
        {
            Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
            intent.setData(Uri.parse("package:" + packageName));

            if (!getPackageManager().queryIntentActivities(intent, 0).isEmpty())
                startActivity(intent);
        }
    }

    Please stay tuned for updates by subscribing to the newsletter from the Rainbow API Hub Web site https://hub.openrainbow.com (click on « Subscribe to the Rainbow API HUB Newsletter »).

    Best regards,
    Pascal

    0
    Comment actions Permalink

Please sign in to leave a comment.

  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message