android

change background color of the layout in Android

Hello, I have a simple Android application, with 3 buttons. When i click on the 1st button, i wanna change the background color of the layout (which is now white... i wanna change in other color, when i press the button). How can i do this? On that button, i have a myClickHndler event public void myClickHandler(View view) { sw...

debugging native code (C++) using gdb on android with Eclipse. Is it possible?

Hi, I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this. Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applicatio...

In android how to close TabWidget when a tab is selected.

In android how to close TabWidget when a tab is selected. As the title, I want close the TabWidget where some tab is selected. ...

Specifiy package path for Androd:entries

Hi. I am using following code in preferences page in android to show a list of items. The list and values are located in a file at location "app/res/xml/time.xml" <ListPreference android:title="Time unit list" android:summary="Select the time unit" android:dependency="Main_Option" android:ke...

how to install my app on Motorola Android

Hi I'd like to install my app on Motorola Android as a testing. how to? Please share me any step by step link ...

file explorer in android

Hi I am new to android. I need to list available files in device or SDCard in the android emulator 1.5.Thanks in advance. ...

Storing data on SD Card in Android

Using the guide at Android Developers (http://developer.android.com/guide/topics/data/data-storage.html) I've tried to store some data to the SD-Card. This is my code: // Path to write files to String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/"+ctxt.getString(R.string....

Common bottom layout in all the tabs of TabHost in Android?

Hi, I have a TabHost with 4-5 tabs. I want to have a similar bottom for all the tabs. Is there any way we can add a bottom to all the tabs? Or do I need to place the xml code in every layout file. Please let me know if any one has the solution. Regards Sunil ...

New to Android I want to know more about it

Well,Hello Everyone.I'am just 14 years old.I want to be a part of Android's Development. But were do I start.What should I learn? What are necessary Qualification to be a Part of Android's Development. Things what I know Basic PHP, HTML, PhotoShop, Video Editing, Basic Security and Fraud related matters, Some Microsoft Office Tools, Ma...

Calling background service from BroadcastReceiver

I am trying to call a push notification background service from BroadcastReceiver class, but my application crashes. The code is given below: public class AlarmReceiver extends BroadcastReceiver { static int count=1; @Override public void onReceive(Context context, Intent intent) { Intent myIntent=new Intent(cont...

Merge two bytes in java/android

Hi, I have a frame of 22 bytes. The frame is the input stream from an accelerometer via bluetooth. The acceleromter readings are a 16 bit number split over two bytes. When i try to merge the bytes with buffer[1] + buffer[2], rather than adding the bytes, it just puts the results side by side. so 1+2 = 12. Could someone tell me how to ...

findViewById undefined

Eclipse is marking findViewById(int) as undefined; it was doing the same thing for getResources(), but I was able to get around that by calling context.getResources() instead (as seen below) and can't seem to find a similar workaround for findViewById. Here is the code: package com.myapp.android.MyWidget; import android.appwidget.AppW...

handling broadcast reciver

Hi, I have an app which has MainActivity(without gui.. please just flow with it:) ) now this MainActivity running a service, this service using sendBroadcast() in order to comunnicate with the MainActivity.. now ofcourse i need to registerReceiver in the onResume() of the MainActivity. but i also need to add unregisterReceiver(receiver...

How to pass data to another droid device when the other device isn't expecting it

I am working on an application and one feature that would make it really useful is the ability to share some information, but the other device may not be expecting the data to be sent. For example, if I am reading a really good book, and I realize that a friend may like it, I could use an application to send the data to him, so he could...

Obtaining data from Android sensors without Listeners

I have following code: public class readSensorsData extends Activity implements SensorListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); sm = (SensorManager) getSystemService(SENSOR_SERVICE); } @Override public voi...

how to rename filename in sdcard with android application?

In my Android application, I want to rename the file name at runtime. How can I do it? This is my code: String[] command = {" mv", "sun moon.jpg"," sun_moon,jpg"}; try { Process process = Runtime.getRuntime().exec(command); } catch (IOException e) { Toast.makeText(this, ""+e, Toast.LENGTH_LONG).show(); } I also used renameTo...

Streaming audio to mobile phones, what technology to use ?

I'm planning on building an application where audio media is going to be streamed to the mobile phone for the user to listen. The targets are smartphones: iPhone/Blackberry/Android/(J2ME ?). I see that streaming on iPhone has to be done with HTTP Live streaming, but I don't see it supported by other platforms. Should I broadcast the s...

Creating a new Intent results in a error

when i do the fallowing i get screamed on : Button newGameButton = (Button) this.findViewById(R.id.newGameButton); newGameButton.setOnClickListener(new OnClickListener() { public void onClick(View view) { startActivity(new Intent(this,gameScreen.class)); } }); apparently my this is not the one nee...

Android: Frame rate drops in landscape mode

I am trying out the (latest) Android SDK, and noticed some strange behavior. I've written a skeletal SurfaceView app: Activity, SurfaceView and a rendering thread. It doesn't actually do any painting, and only writes out the framerate to logcat once a second. When it runs in portrait mode, I get around 60 fps. However, when I flip it to...

Listview...how to conditionally replace a value with a string

Hi, my ANDROID app presents a listview, from a database cursor and XML, that needs to replace the values in a column with various words based on the integer value contained in the cursor. For example, if the value is -1, replace it with the word "Invalid", but if the value is >= 0 then just display the value. I was under the impression...