My class extends View and I need to get continuous touch events on it.
If I use:
public boolean onTouchEvent(MotionEvent me) {
if(me.getAction()==MotionEvent.ACTION_DOWN) {
myAction();
}
return true;
}
... the touch event is captured once.
What if I need to get continuous touches without moving the finger?
Pleas...
I resolved this issue myself. It turns out that the activation framework requires some libraries that aren't native to android, myjava.awt.datatransfer, org.apache.harmony.awt.*, and org.apache.harmony.misc. Once i added those libraries everything worked fine.
I'm trying to use the gdata java
client library on android and have
...
The standard getUrlContent works welll when there is no firewall. But I got exceptions when I try to do it behind a firewall.
I've tried to set "http proxy server" in AVD manager, but it didn't work. Any idea how to correctly set it up?
and btw: from android documentation "You can use the -verbose-proxy option to diagnose proxy connec...
Hi
Does anybody knows when there will be more updated information than the following info provided by google a couple of month ago?
http://developer.android.com/intl/zh-CN/resources/dashboard/platform-versions.html
maybe another source for more up to date information?
Thanks
...
I started my emulator with ./emulator -trace profile -avd emulator_15. I then tracked down the trace files to ~/.android/avd/rodgers_emulator_15.avd/traces/profile, where there are six files: qtrace.bb, qtrace.exc, qtrace.insn, qtrace.method, qtrace.pid, qtrace.static. I can't figure out what to do with these files. I've tried both d...
hi all,
i still have a problem to develop a convenient app to the user. because i am struggling using the activities, intent and intent filters. www.developer.android.com/reference not fit for me to understand these things. can you suggest me a fine example code or tutorial to understand how these things are getting worked.
...
Notification and NotificationManager are used to create icons to be placed on the top-left position of the screen. A Notification also need to have an entry on the status bar pull-down.
However, icons on the right side such as the battery, signal strength, wireless indicators do not need any entry on the status bar.
How do I make such...
I am currently trying to send some data from and Android application to a php server (both are controlled by me).
There is alot of data collected on a form in the app, this is written to the database. This all works.
In my main code, firstly I create a JSONObject (I have cut it down here for this example):
JSONObject j = new JSONObje...
Hello,
I am trying to calculate the distance between the first GPS point stored in a SQLite database and the last GPs point stored.
My code so far is this:
private double Distance()
{
SQLiteDatabase db1 = waypoints.getWritableDatabase();
Cursor cursor = db1.query(TABLE_NAME, FROM, null, null, null, null,ORDER_BY);
Cursor cursor1 = ...
I'm writing unit tests for a ListActivity in Android that uses a handler to update a ListAdapter. While my activity works in the Android emulator, running the same code in a unit test doesn't update my adapter: calls to sendEmptyMessage do not call handleMessage in my activity's Handler.
How do I get my ActivityUnitTestCase to sync with...
I've been curious as to all the optimizations that go into the building of an .apk. I'm curious because of two things I've tried in the past to bring down the size of my .apk:
I have had a few large json assets in projects before, as well as a static sqlite database. I tried bringing down the size of the apk by gzipping them before t...
Hey Everyone,
I am brainstorming possible ways to implement something for an Android application. I am working on an application for a bus system in which I thought it would be neat to try and find a way to find the fastest bus to your destination. Any suggestions on how I could use a starting position and ending position to find the c...
Hi,
I just downloaded DroidEx but doesn't seem to allow me to run it (i.e NoClassDefError)
I'm on mac snow leopard and here is what I've done:
1. download droidex from http://github.com/commonsguy/droidex
2. download droidex.jar from http://cloud.github.com/downloads/commonsguy/droidex/DroidEx.jar and put it in my DroidEx_HOME/bin
3. ...
Currently I have a TabHost implemented with 3 tabs each containing a separate activity. My question is how do I switch between tabs from within one of the activities that is located inside the tab host. I've looked everywhere and have been unsuccessful in finding a real answer to this problem.
...
Is there anywhere a summary of Build.MODEL strings for different Android handset models? Something like:
"Hero" - HTC Hero
"ERA G2 Touch" - branded HTC Hero
"T-Mobile myTouch 3G" - branded HTC Magic
"GT-I5700" - Samsung Galaxy
... and so on
I'm curious what is the percent of rooted devices among my app users, but sometimes is hard to...
I'm creating a notification with something similar to the following:
Intent ni = new Intent(this, SomeActivity.class);
ni.putExtra("somestring", "somedata");
PendingIntent contentIntent =
PendingIntent.getActivity(this, 0, ni,
PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_ONE_SHOT);
Conte...
Hi,
My android application has 1 main activity. And it launches some sub-activity (which I wrote) and that also launches some sub-activity (which I wrote). I do this:
Intent i = new Intent("my intent1");
startActivity(i);
My question is how can each of my sub-activity and sub-sub-activity get back to the Parent activity?
Thank yo...
I have an application that calls a number stored by the user. Everything works okay unless the number contains commas or hash signs, in which case the Uri gets truncated after the digits. I have read that you need to encode the hash sign but even doing that, or without a hash sign, the commas never get passed through. However, they do ge...
Hi,
I am using a ListView. But the top-most and botom-most horizontal bar does not show up. Any idea why? I am using this:
android:divider="@android:drawable/divider_horizontal_bright"
...
Ok I know everyone is going to tell me not to use RegEx for parsing HTML, but I'm programming on Android and don't have ready access to an HTML parser (that I'm aware of). Besides, this is server generated HTML which should be more consistent than user-generated HTML.
The regex looks like this:
Pattern patternMP3 = Pattern.compile(
...