I have an application that I just would like to use in portrait mode, so I have defined
android:screenOrientation="portrait" in the manifest xml. This works ok for the htc magic phone.
But I have a problem with the HTC G1 phone as i open the hardware qwerty keyboard (not the virtual keyboard). My activity stays in portrait mode, but se...
I need to my current location using GPS programmatically. How do I do that?
...
How can I edit an SQLite database after it has been created and stored on my phone together with the corresponding app? I want to add a new column to the database but I can't figure out how. Is it possible to do this via the adb shell or maybe eclipse? Or in code?
I tried to just update my db-adapter class, but then the app fails at com...
Hi,
I created a broadcast receiver in the main activity and the background service which is sending broadcast intents. The application crashes each time I try to run it and the Log displays the following error message:
10-04 13:30:43.218:
ERROR/AndroidRuntime(695):
java.lang.RuntimeException: Error
receiving broadcast Intent {...
I have a small application which can be used to set reminders for future events. The app uses an AlarmManager to set the time for when the user should be reminded. When the alarm goes off, a BroadcastReceiver registers this and in turn starts a service to notify the user via a toast and a notification in the status bar.
In order to disp...
I've been looking everywhere to see if there is a standard way of achieving this but I find a different solution everytime. Basically, I am trying to build a Custom ListView with an image and two-three lines of text besides it. In order to optimize it, I understand that the following have to be used:
convertView: Basically if the view ...
I'd like to use python scripts as plugins for an app I'm developing. This seems to be possible by interacting with android-scripting-environment (ASE), as is done by Locale, but I haven't found any documentation about this. How you execute ASE scripts from your own app?
...
Hi,
I never designed UIs (more of a middleware guy) before so I apologize if the question is stupid. I am designing a UI to look something like the following:
ImageView ImageView
TabHost
Tab 0 ------ Tab 1 ------ Tab 2
-----INSIDE EACH TAB-----
TextView
ListView
- Consists of ImageV...
I am not able to detect when outgoing call has been answered, I have registered BroadcastReceiver for PHONE_STATE broadcast, but onReceive() gets called only when number is dialed and when call has ended.
Edit: If it is not possible with current API (1.5 or 1.6) please enlighten me ?
...
In google's Calendar app for Android OS, you will encounter this line in the onCreate method of CalendarActivity.
// Eliminate extra GCs during startup by setting the initial heap size to 4MB.
VMRuntime.getRuntime().setMinimumHeapSize(INITIAL_HEAP_SIZE)
Can someone explain why setting it to 4MB will eliminate GCs ? Thanks
...
I have Implemented a custom ListView by extending LinearLayout for every row. Every row has a small thumbnail, a text and a check box. The list view is deployed properly and I can scroll and fling through it without any problems.
But The ListView doesn't seem to respond to the setOnItemClickListener() at all, So I had to find a workaro...
I need to randomly shuffle the following Array in Android :
int[] solutionArray = {1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1};
Is there any function in the SDK to do that ?
Txs.
...
I'm trying to run the Webkit Layout Tests on the Android emulator using the command line shell in Ubuntu 9.04.
adb -s emulator-5554 shell am instrument -w \
com.android.dumprendertree/com.android.dumprendertree.LayoutTestsAutoRunner
I get this error:
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInf...
I want to make a pause between two lines of code, Let me explain a bit :
-> the user clicks a button (a card in fact) and I show it by changing the background of this button :
thisbutton.setBackgroundResource(R.drawable.icon);
-> after let's say 1 second, I need to go back to the previous stade of the button by changing back its ba...
Hi,
I am developing an application which is communicating with the server. Tha application can perform log-in and get different parameters from server.
The application consists of a RESTful client (custom class for making requests), Communication Service (the service which runs in the background) and the main activity.
For now I crea...
Hi
Im wondering if there is a way to call gc from code, hopefully to free some memory...
...
Does anybody have any advice, experience, suggestions? I'm pretty
comfortable with Google plugin - what would make me change to MOTODEV?
Needless to say - I will download and play with it but I'm also
interested in fellow developer's feedback.
...
I'd like to change the color of a standard Android button slightly in order to better match a client's branding. For example, see the "Find a Table" button for the OpenTable application:
The best way I've found to do this so far is to change the Button's drawable to the following drawable located in res/drawable/red_button.xml:
<?xm...
Hi,
How can i launch an android activity via a specified class name of an activity?
Thank you.
...
Can any one tell me how to make page turn effect in android?If u can pls provide me some code snippet.
regards,
s.kumaran.
...