Mar 12
4
Eclipse is known for being slow and lagging, if you don’t have enough RAM in your computer. But I first realized how big an issue this was, when I upgraded my computer from 4 to 16GB RAM. After tweaking my eclipse.ini, it was really running smoothly, all the way through. Well, it still takes a little time to start it up, and initialize the various plugins, but when it is started, there is no more lag at all.
Upgrading the computer wasn’t all. I had to tweak the Eclipse configuration as well, to use more memory. I did that by assigning 2048MB RAM to Eclipse, instead of the default 384MB. My eclipse.ini memory settings then looks like this:
So, as RAM prices are very low these days, it certainly pays back to invest in an upgrade. Eclipse has never been so nice to work with as now.
You can read more about the eclipse.ini file at http://wiki.eclipse.org/Eclipse.ini
A problem I came across was that when I have an EditText control as the last element of a ListView, it would hide behind the soft keyboard. Not the first time the EditText is activated, but when hiding the keyboard by pressing the Back button, and clicking the EditText again, it would be hidden behind the keyboard.
This was only a problem if windowSoftInputMode was set to adjustPan. Setting this to adjustResize would display the EditText correctly every time.
I fixed this by subclassing EditText, and clearing focus when back-button is pressed.
This is a problem that very often occurs, when you connect a new device and try debugging or running your applications one the device. For most devices, this works perfectly. For others, mostly new devices, Eclipse will show a lot of questionmarks instead of the device name.
The problem is (at least on Linux) that your user does not have access to the device. When you connect your phone or tablet to your computer, a special “file” is created in /dev. In order to debug your applications on the device, ADT will use this file for communicating with Android – uploading app, and so on. But if your system does not know this device, and is not configured to let your user access this device, it will only show up as “?????????????” and not let you use it for debugging.
There is more than one way to fix this. Below you will see two ways. The easy hack, and the right way. This works for Linux (Ubuntu, Debian and others like these). If you are running Windows, the problem is probably a missing USB driver. You can download the driver from here, where you will also find instructions on how to install it.
A very easy quick-fix (read: hack) is to restart adb (the Android Device Bridge) as root. This is not the best way to do it, but if you’re in a hurry, it will work.
Navigate to your Android SDK directory, and in to the platform-tools dir. In here, you will find adb. To restart it as root, type the following.
Now Eclipse and ADT should be able to see your device.
The right way to do it, is a little more complicated, as it is dependent on which device you have in your hand. But here we go…!
in a console. You will see some lines, describing the currently connected USB devices. Among those, there will be a line like
This is my HTC Flyer, and is has a “vendor ID” of 0bb4. Write down (or remember) this number.
#Acer
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
#Dell
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
#LG
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
#Pantech
SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"
#Samsung
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
#ZTE
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
One thing that can certainly speed up your development tasks when doing Android projects, is to reuse your Android source code. To do that, it is important to make sure that your Android source code is well organized and easy to find and reuse when you need it. Many of us are forgetting this, when things go fast, and we have to make deadlines. But if you take a little time to find some routines and methods that suits you, it can actually help you reach your deadlines in a lot more comfortable way. If you have ever found yourself writing code, feeling some kind of deja-vu, this post is for you.
A quick guide to get data from a web service, or HTTP service in general. This could be a RESTful web service, with POST, GET, PUT, DELETE and other methods.
I know that this has been explained a lot of other places around the net, just to make it clear yet another time (and for my self to remember
). To convert an InputStream, which for instance could be a response from a HttpRequest, use the following method:
For the first time since Android Market opened up, in October 2008, Google has added new countries in which you can buy and sell applications.
The following countries are open for selling applications as per September 30, 2010:
Argentina, Australia, Belgium, Brazil, Canada, Denmark, Finland, Hong Kong, Ireland, Israel, Mexico, New Zealand, Norway, Portugal, Russia, Singapore, South Korea, Sweden, Switzerland and Taiwan.
For buying applications, the following countries will open over the next two weeks:
Argentina, Belgium, Brazil, Czech Republic, Denmark, Finland, Hong Kong, India, Ireland, Israel, Mexico, Norway, Poland, Portugal, Russia, Singapore, Sweden, and Taiwan.
Great news, Google!
Read more at the Android Developer’s Blog
Sep 10
21
Seth Priebatsch has made this Ted talk, about how “the next thing” will be the game layer, on top of the world. Especially on top of the social networks, which in it selfs was the big thing in last decade. Not that social networks is old fashion, but as the world evolves, new things has to come in to the picture, and we need to figure out new ways to use it.
Watch it, it’s a great point of view for thinking mobile applications for the next decade
Sep 10
14
iPhone development is closed, you can’t do the things you want to, everything has to be the way Mr. Jobs wants it. Android on the other hand is fragmented, old-school-java, and Google lets you create applications that empties peoples bank accounts.
This is some of the comments I have heard and read, around the internet. To some extends, some of the arguments might be somehow correct, depending on your own view on it.