I am trying to implement a native interface into my app. I began with android. I checked out the native demo and Shai's video tutorial and attempted to implement it. However when I try to create a button with android.widget.Button it tells me that "Package android does not exist" This is my code. Is there some sort of package or jar file I need to import in order to do this?? The NativeDemo has the same thing and that seems to work. I don't know what I am doing wrong. Here is my code:
Native Interface:
package info.nightowl.count19;
import com.codename1.system.NativeInterface;
import com.codename1.ui.PeerComponent;
/**
*
* @author Kyri
*/
public interface MyNative extends NativeInterface {
public String returnId();
}
My Native Interface in the android folder:
package info.nightowl.count19;
public class MyNativeImpl {
public String returnId() {
android.widget.Button b = new android.widget.Button((android.content.Context)NativeDemo.getContext());
return null;
}
public boolean isSupported() {
return true;
}
}
Bare in mind that I do not actually need to create a button. I was just trying out that code because it was in the NativeDemo to see if it would work. The actual class I need is: android.accounts.AccountManager but once again it tells me that package android.accounts does not exist. What am I doing wrong?