Android Question 3rd party library using SLC

Rui Cardoso

New Member
Licensed User
I am trying to create a wrapper for 3rd party library using SLC.

I am getting this error:

Starting step: Compiling Java code.
javac 1.8.0_161
C:\Users\Rui.C\Desktop\Nouveau dossier\b372lib\src\com\example\B372Lib.java:3: error: cannot find symbol
import android.os.ToolManager;
^
symbol: class ToolManager
location: package android.os
1 error
Error.


This is the java file:

package com.ieimoblie.b372lib;

import android.os.ToolManager;

public class B372Lib
{
private ToolManager mTool;
private final android.content.Context mContext;
private static String TOOL_SERVICE = "toolservice";

public B372Lib(android.content.Context context) {
mContext = context;
mTool = ((ToolManager)mContext.getSystemService(TOOL_SERVICE));
}

public void setStatusBarExpendEnable(boolean value) {
if (value) {
mTool.setStatusBarExpend(value);
} else {
mTool.setStatusBarExpend(value);
}
}

public void setShutdown()
{
mTool.UserSetShutdown(true);
}

private void setReboot()
{
mTool.UserSetReboot(true);
}

public void setWakeUp() {
mTool.setUiWakeUp(true);
}

public void setNavigationBarHide(boolean value) {
if (value) {
mTool.setNavbarDisableOption(true);
} else {
mTool.setNavbarDisableOption(false);
}
}

public boolean getNavigationBarHideInfo()
{
if (!mTool.getNavbarDisableOption()) {
return false;
}
return true;
}

public void setUsbDebugEnable(boolean value)
{
if (value) {
mTool.setUsbDebugEnable(true);
} else {
mTool.setUsbDebugEnable(false);
}
}
}


Any help is welcome.
 

monic

Active Member
Licensed User
Longtime User
Do you have the third party jar in your libs folder and better if you format your question with code tags.

Is this not better posted in the library developer section?

I had a look inside of the android.jar and couldn't find that class.
 
Last edited:
Upvote 0

Rui Cardoso

New Member
Licensed User
Hi Jamie8763,
Thanks for your reply.

I posted here because I do not intend to develop the library, but only access it from B4A.
Yes, I've the third party files in libs folder (not sure in the right folders).
I got this library from the device manufacturer.
It was included in a example (not B4A).
 
Upvote 0

monic

Active Member
Licensed User
Longtime User
I searched for this and it must be a hidden api can you give any information on the examples.
 
Upvote 0

Rui Cardoso

New Member
Licensed User
In the demo files I didn't find any reference to "ToolManager".

I try to upload the entire demo but it's too large.

You can "decompile" the apk: http://www.javadecompilers.com/

I came from .net, java (similar to c#) and VB are not a problem, I just started with android last week.
 

Attachments

  • NavigationBarDemo.apk
    312.9 KB · Views: 314
  • b372lib.jar
    1.2 KB · Views: 292
  • B372Lib.java
    1.4 KB · Views: 323
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…