•   over 8 years ago

Problem with SettingView

Hello,

I would like to make use of the Samsung Galaxy Note S-Pen SDK, however I receive a NullPointerException when I construct the SettingView.
I'm using Basic4Android, a powerfull IDE that compiles BASIC code to java. It has support for external libraries and views, and i'm one of the few who contributes libraries to that program.
Some people asked for a wrapper of the Galaxy Note SPen SDK and i'm struggling with the code.

This is the error i receive:

SettingView.Initialize("SettingView1")

java.lang.NullPointerException
at android.graphics.drawable.InsetDrawable.getChangin gConfigurations(InsetDrawable.java:169)
at android.graphics.drawable.LayerDrawable.(Lay erDrawable.java:86)
at android.graphics.drawable.LayerDrawable.(Lay erDrawable.java:67)
at com.samsung.sdraw.bv.n(SourceFile:376)
at com.samsung.sdraw.bv.m(SourceFile:325)
at com.samsung.sdraw.bv.g(SourceFile:166)

Some more information is available here:
http://www.basic4ppc.com/forum/libraries-developers-questions/16245-need-help-samsung-galaxy-note-spen-sdk.html#post92805

I'd really appreciate it if you could help me out, and so we can create our app before the competition deadline closes.

Kind regards,
Tomas

  • 4 comments

  •   •   over 8 years ago

    Hello,

    We were unable to reproduce the problem. Can you send us more code that causes the problem?

    Thanks,
    SamsungJohn

  •   •   over 8 years ago

    Hi Tomas,

    I'm not sure why you would be calling Initialize on a SettingView. Is this something that happens in compiling from BASIC?

    Best,
    Hod Greeley
    Samsung Developers

  •   •   over 8 years ago

    The initialize method in Basic4Android is a method to initialize a view, object, etc. In B4A, this method is like the following :

    public class SettingViewWrapper extends ViewWrapper {

    /**
    * Initializes the SettingView
    * EventName - Name of Subs that will handle the events.
    */
    public void Initialize(final BA ba, String EventName) {
    setObject(new SettingView(ba.activity));
    super.Initialize(ba, EventName);
    final String eventName = EventName.toLowerCase(BA.cul);

    }

    ViewWrapper makes a view accesible on B4A in the form of a library. But it's that initialize that gives us the null pointer. (in forming the constructor of the SettingView)

    The creator has found out that the Samsung SPen library references the resources mapped in the internal R file. As we are actually using the resources after they are taken out from the library, the mapping gets changed (when there is a new resource).

    They hope to get it fixed in the next version of Basic4Android, but then it would be to late to join the app challenge :(

    Maybe you guys have a solution?

    Kind regards,
    Tomas

  •   •   over 8 years ago

    Hi Tomas,

    I'm sorry, I think it's too late for us to consider supporting this. I wish we could help.

    Best,
    Hod Greeley
    Samsung Developers

Comments are closed.