使用SPen SDK 2.3我尝试从raw-folder加载手势库。我在SDK-example-App中创建了库。我的代码目前是
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'
}
如果文件应该包含在应用程序中,如何从“文件”加载我自己的GestureLibrary?目前我将其放入/res/raw/gesturelibrary.txt
- 但loadUserSPenGestureData
的返回值始终为“false”。如何将我的gestureLibrary打包到我的应用程序并在编译/运行时加载它?
提前致谢!