Do you have a detailed tutorial?
Do you have a detailed tutorial? I didn't find a detailed tutorial on the official website.
Unfortunately not. This is an area we'd like to improve;
At present, the best sources of learning material I can point you at are:
- the test suite for Rubicon-Java (in this repo) - by it's nature, a test suite contains lots of examples of usage
- The codebase for the Android backend for Toga. This is the primary user of Rubicon at present; the Andoid Java libraries are wrapped in the libs module, and then used in the various widgets and app classes.
I agree this isn't ideal; writing a more comprehensive tutorial (like the one that we have for Rubicon-ObjC) is on our TODO list.
Unfortunately not. This is an area we'd like to improve;
At present, the best sources of learning material I can point you at are:
- the test suite for Rubicon-Java (in this repo) - by it's nature, a test suite contains lots of examples of usage
- The codebase for the Android backend for Toga. This is the primary user of Rubicon at present; the Andoid Java libraries are wrapped in the libs module, and then used in the various widgets and app classes.
I agree this isn't ideal; writing a more comprehensive tutorial (like the one that we have for Rubicon-ObjC) is on our TODO list.
Can I ask you a question by the way? How can I access 'context' or 'activity' in Python code? When accessing with javaclass ('android / content / context '), an error will be reported.
Unfortunately not. This is an area we'd like to improve;
At present, the best sources of learning material I can point you at are:
- the test suite for Rubicon-Java (in this repo) - by it's nature, a test suite contains lots of examples of usage
- The codebase for the Android backend for Toga. This is the primary user of Rubicon at present; the Andoid Java libraries are wrapped in the libs module, and then used in the various widgets and app classes.
I agree this isn't ideal; writing a more comprehensive tutorial (like the one that we have for Rubicon-ObjC) is on our TODO list.
Because I want to use Python to access some functions of Android, such as locating, taking pictures, and getting the address book. Do you have any examples? Thanks for your help!
On toga-android, the App implementation has a native attribute that is the Activity. This is cached on every widget as _native_activity. Activity is a subclass of Context.
The only examples of usage I can point you at is the usage in the Toga Android backend.
On toga-android, the App implementation has a
nativeattribute that is the Activity. This is cached on every widget as_native_activity. Activity is a subclass of Context.The only examples of usage I can point you at is the usage in the Toga Android backend.
I have another problem. Can you help me?Thank you very much!How can I transfer Java language 'null' to Python when I call java function? I tried to replace it with None, but I would report a NoneType error. And there is no array in Python, so I have no way to pass array parameters.