2

using the SPen SDK 2.3 I try to load a gesture-library from the raw-folder. I created the library in the SDK-example-App. My code at the moment is

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.setContentView(R.layout.activity_main);

    this._sPenGestureLibrary = new SPenGestureLibrary(MainActivity.this);

    final boolean loaded = this._sPenGestureLibrary.openSPenGestureEngine();

    final String resName = this.getResources().getResourceName(R.raw.gesturelibrary);
    Boolean loaded = this._sPenGestureLibrary.loadUserSPenGestureData(resName);
    // loaded is always 'false'
}

How can I load my own GestureLibrary from "File" if the file should be included in the App? At the moment I put it in /res/raw/gesturelibrary.txt - but the return-value of loadUserSPenGestureData is always 'false'. How can I package my gestureLibrary with my app and load it at compile/runtime?

Thanks in advance!

basti
  • 2,649
  • 3
  • 31
  • 46

0 Answers0