android

Android - Switching between Multiple Views in a ViewFlipper

I have an application using ListView inside Tabs, and i'd like to switch to a separate View(data collection widget) on clicking an item in the List. I'm adding each List's row's children to a ViewFlipper and the items are added at runtime so there is no definite number of views. As such, i would want to navigate/switch to a particular Vi...

Android animation.

hi.. i m really very fed up coding translate animation. actually my image is moving from one position to another but it is coming back to its actual position. can any body here provide me the code to move image from one position to another position without coming back. plssssssssssssssssssssssss provide me the sollution. thanks in ad...

Android: Can the Global Application Object Bind to Remote Services and Launch Activities?

Can the global Android Application object, which is obtained via getApplication(), implement an AIDL callback interface and communicate with remote services? Also, can it launch Activities and send intents? From my understanding, the operations above are typically reserved for Android app components: activities, services, and content pr...

file not found exception while uploading file to web server?

I am using following tutorial to upload image file to webserver. and getting file not found exception here. try { File uploadFile = new File(uriString); // file path i receive **content:/media/external/images/media/2** FileInputStream fis = this.openFileInput(uploadFile.getName()); // **ERRoR HERE** HttpF...

How to display the vaule(dependent value) when we select one item form the list of values in Android SDK?

Hi, Am new to this Android SDK platform,so could you people help me out to solve my issue. so lets discuss brief about my issue, am developing small application in which am using sppiner to list all country states and zip codes so my question is when i select one country state in a list it should automatically populate and dis...

Local service or remote service?

I have a background Service which must run permanently. The service just has to interact with my Activity. How to i check on activity resume if the service is still running? Is there a better possibility than a static variable in the service class? Is it of advantage to use a remote service in a separate process(to extend service life...

Android Bundle in properties

(I'm Coming from a C# background writing iPhone apps with MonoTouch) I have a simple app that needs to save button color. I have this code in a Settings class that is a singleton. Is this the way it 'should' be done? I usually like having a single Setting instance that is accessed around the app in my C# iPhone apps. private static ...

My App doesn't show up on the market

I've found today that my recently published app on the Android Market, is not showing up on this device Market: Samsung Apollo. I've already followed this tutorial to make my app accesible to almost all devices configurations and it still don't show on that device's Market. What am I doing wrong? ...

How to add an Android widget to my app?

I want to put the Android's Analog Clock in my app, is there a way? --update Studying android developers page. It says that "App Widgets are miniature application views that can be embedded in other applications (such as the Home screen)" so, looks like there is a way. --update Still nothing, read all details of the abov...

Framework for catching Android/iPhone touch actions? - Javascript

Hi folks, any good framework I can use to listen for touch, swipes and pinch actions? Ideas would be awesome! =) ...

Android PreferenceManager without visual component?

I am trying to get a SharedPreferences object from the PreferenceManager but don't want to pass in the Context to the class. Can I get a "global" context from inside my class? SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(Some Global Context); ...

android open dialogue activity without opening main activity behind it

Im writing a program that offers a quick reply dialog upon receipt of an SMS. However, I am getting an unexpected result. When I receieve an SMS, the appropriate dialog activity comes up displaying the correct phone number and message, however there is a second activity behind it that is the 'default' activity in my program (it is what ...

Camera Preview on Galaxy S

I have an app which uses the Camera, sending the preview to a SurfaceHolder. Everything works fine on the HTC Desire that I have been developing on, but when I run it on a Samsung Galaxy S the image from the preview is rotated 90 degrees. The code attempts to match the best Size returned from the parameters.getSupportedPreviewSizes(), ...

Android - picture taken different from preview

I have a camera app, in it's simplest state it's nothing more then the cameraPreview example with some 'takePicture' code. The link to the example online is for 2.0, and i'm developping against 1.5 (API lvl 3), but still, here it is: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPrevi...

Add floating point value to android resources/values

I'm trying to add a little space between lines to my TextViews using android:lineSpacingMultiplier from the documentation: Extra spacing between lines of text, as a multiplier. Must be a floating point value, such as "1.2". As I'm using this in a few different TextViews I would like to add a global dimension/value to my r...

Question about the rotation of X axis on Android

I want to detect the correct rotations around X axis with Android sensors. After googling, I find this code: public void onSensorChanged(SensorEvent event) { Sensor sensor = event.sensor; switch(sensor.getType()) { case Sensor.TYPE_ACCELEROMETER: mAcc = event.values.clone(); break; case Sensor.TYPE_MAGNETIC_FIELD:...

Question about the rotation of X axis on Android

Possible Duplicate: Question about the rotation of X axis on Android I want to detect the correct rotations around X axis with Android sensors. After googling, I find this code: public void onSensorChanged(SensorEvent event) { Sensor sensor = event.sensor; switch(sensor.getType()) { case Sensor.TYPE_AC...

Activity being fired off too many times...

Hi everyone! Have another issue here. Our app starts out with a tab activity. But, before the user can get into the tab activity to do work, we have to check to see if they're logged in. This login is required for all activities within the tab activity. So, instead of having this security check within all the activities, we created o...

Calling external methods from within openGL class

Hey Guys, I'm attempting to call a method which is outside the class I'm working in from an openGL thread but I'm getting a Can't create handler inside thread that has not called Looper.prepare() runtime exception. Does anyone know of a way around this without putting the method in the same class? Pr...

Android test code coverage, Eclipse

Is there a way to run unit tests for Android from Eclipse in a way that will instrument the code and measure test code coverage? I'm looking for a simple way to find out which parts of my application aren't tested yet, fix the test cases and see if that helped. ...