matthew womersley
Sep 29, 2015
9:40 pm

setPowerSavingMode(int mode). No such method

Hi I'm trying to toggle power saving mode on my Samsung S4 mini.

I've integrated Knox Customization 2.4.1 into my project.

I call the folowing code:

try {
    knoxmanager.setPowerSavingMode(KnoxCustomManager.POWER_SAVING_ON);
} catch(Exception e) {
    Log.w(TAG, "Exception:" + e);
}

 

and i get the folloing Exception:

09-29 22:34:41.388  30339-30537/devreach.co.uk.devreach E/AndroidRuntime﹕ FATAL EXCEPTION: IntentService[ExecutePushCommandIntentService]
    Process: devreach.co.uk.devreach, PID: 30339
    java.lang.NoSuchMethodError: android.app.enterprise.knoxcustom.KnoxCustomManager.setPowerSavingMode
            at devreach.co.uk.devreach.ExecutePushCommandIntentService.onHandleIntent(ExecutePushCommandIntentService.java:192)
            at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.os.HandlerThread.run(HandlerThread.java:61)

 

i have the following permissions in the manifest

<uses-permission android:name="com.sec.enterprise.knox.permission.CUSTOM_SETTING" />
<uses-permission android:name="com.sec.enterprise.knox.permission.CUSTOM_SYSTEM" />
<uses-permission android:name="com.sec.enterprise.knox.permission.CUSTOM_SEALEDMODE" />

I'm not why this method can't be resolved when it's clearly in the sdk that i have integrated.

 

Thanks

 

Matt

Similar topics

No similar topics found.
Brienne Choi
Sep 30, 2015
6:52 am

Hi Matthew,

 

It look like device firmware does not support Knox Customization 2.4.1 API. Could you let me know the infon as follows? You can find it in Settings>About device.

- Android version

- Build number

- Customization SDK version in KNOX version

 

Regards,

SEAP Tech Support

Comments

Hi Brienne

The Android version is 4.4.2, the build is KOT 49H.l9195XXUC0E3 and i can't seem to find anything Knox on the About device screen.

I maybe able to use a different phone to test on which is a Samsung galaxy Core Prime. It's running 4.4.4, not sure of the build but i can find that out and i remember seeing a version of Knox on it.

Would the prime be suitable? So far on the S4 mini i have certain functionality working like toggling MobileDate, WIFI,GPS etc, but i would power mode as well. Along with other functionality like lock and wipe and sealed mode.

 

Can you please confirm that either the S4mini or core prime is capable of this functionality?

 

Thanks for your help

 

Matt

matthew womersleySep 30, 2015 at 1:09 pm
Brienne Choi
Oct 06, 2015
7:01 am

Hi Matt,

Sorry for keep you waiting. I have been check it with R&D and let you know soon.