Difference between revisions of "Android Development"
(→Code fragments that might be helpful) |
(→Connect devices to Linux boxes) |
||
Line 30: | Line 30: | ||
LABEL="xoom_usb_end" | LABEL="xoom_usb_end" | ||
LABEL="xoom_rules_end" | LABEL="xoom_rules_end" | ||
+ | </source> | ||
+ | |||
+ | To let Samsung Galaxy S2 be recognised by the debugger add these lines to 92-samsung.rules in /etc/udev/rules.d | ||
+ | |||
+ | <source lang="bash"> | ||
+ | SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", | ||
+ | ATTRS{idProduct}=="6640", MODE="0660", OWNER="root", | ||
+ | GROUP="androiddev", SYMLINK+="android%n" | ||
+ | SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666" | ||
</source> | </source> | ||
Revision as of 12:50, 18 June 2011
Contents
Android tips and trix.
Code styles
Use File:Klaus java format.xml to format your Java code - it will then look most like the AU-HIH standard for C/C++. The your code would look like Android Example Code
Code fragments that might be helpful
How to move your app to SD card
Solving Quirks
On Linux (at least Fedoras) the Pop-up dialogs used to set all kind of properties does not work by just clicking on them with your mouse. Instead first issue Alt+F12 before clicking on the elipsis (...). When finished hit ESC
Connect devices to Linux boxes
To connect your HTC android to your Fedora linux follw the instructions given on Google Developers site
To have your Motorola Xoom connected to your Linux box add a file in /etc/udev/rules.d called 92-motorola-xoom.rules with this content:
ACTION!="add", GOTO="xoom_rules_end" SUBSYSTEM!="usb|usb_device", GOTO="xoom_usb_end" ATTRS{idVendor}=="22b8", ATTRS{idProduct}=="70a8", MODE="0666" SYMLINK+="xoom" ATTRS{idVendor}=="22b8", ATTRS{idProduct}=="70a9", MODE="0666" SYMLINK+="xoom" LABEL="xoom_usb_end" LABEL="xoom_rules_end"
To let Samsung Galaxy S2 be recognised by the debugger add these lines to 92-samsung.rules in /etc/udev/rules.d
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6640", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n" SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
Utilities
Screencast your phone on the PC with this
List of phones with technical information can be found here
Logcat tool for the phone: Logcat
Books
Professional Android Application Development Programmer
Tutorials - on-line examples
Examples at Android.com
Guides at Android.com
API demo's: API demo
Icons for Android: Icons
Source of knowledge StackOverFlow