android

How to know when activity is laid out?

I've got a mapview that I want to put some markers on top of. I'll retrieve these from a webservice when I start the activity, so I need to know the minimum and maximum lat/lng pairs for the current viewport. I'm calling mMapView.getWidth() mMapView.getHeight() But they both return 0 while the activity is starting. I tried putting it...

Is Map directions supported in Android SDK?

Hi Friends, Is there any way to find the direction between two locations in Android? ...

Query if Adroid DB exists!

Hello all, I have created a database for my android app which contains static data and does not require update/delete functionality thus when the app starts, I want to check if the db exists and if not then execute my dbAdapter class. I know its a simple if statement but I was just wondering the most efficient way to query whether the d...

Android java app works on one version but not the next

I'm very new to android, in fact only started yesterday. I managed to get an application setup with tabs. It works fine on a 2.2 virtual avd (i think it is called). But the version my HTC has is 2.0.1 I'm posting snippets of the code below as well as debug info. Logcat shows the following error 08-02 09:56:05.946: WARN/dalvikvm(414): t...

Android Webview - how to capture a word being clicked?

I am loading a webpage in WebView and am required to recognize a word (any word from the page, not just URL) being clicked by user. Is it possible? how? Thanks a lot. ...

Enabling scrolling for particular layout.

I have facing problem in scrolling webview in verticlly, actually i have scroll view with in the layout have defined webview in layout so when i scroll the webview vertically it scroll whole layout,so i want to enable scroll for webview, anybody help me solve this. ...

Is it possible to put layout xml's in subdirectories under /res/layout?

Hi, My layout files are growing and growing. So I came up with an idea of putting them in subdirectories. Is it possible? Simple code: <include android:id="@+id/mLayout" layout="@layout/subdirectory/blahblah"> seem not to work. ...

Creating an intent in application without Activity

I am quite new to Android I use Instrumentation and adb shell commands to launch tests from my apk file on target. I wish to create an intent from Command Line and make some operation in code on target upon it. I know that I need to add an intent filter within my Manifest.xml file but can I add it if I have no activity in manifest. ...

How to read excel file using JXL 2.6.12 jar

When I am adding jxl.jar in my eclipse project, it saw convertion error to dalvik format into the console. Error display in console: [2010-08-02 19:11:22 - TestApp] trouble writing output: shouldn't happen [2010-08-02 19:11:22 - TestApp] Conversion to Dalvik format failed with error 2 Code is ok Below is my code: import java.io.Fil...

Service without Activity. how?

I am new to android.. just started writing service using activity.. i want to know if there are any other ways to trigger a service without the use of activity? like when a new message arrives, the service need to start running.. if so, how? Thank you.. ...

Incoming call dynamically override default ringtone

My app allows you to specify a different ringtone for different incoming events. EG: incoming call, incoming sms etc etc. What I am trying to accomplish is when I receive for example an incoming call, I check my apps database if a specific option is selected and if there is a ringtone option set play that ringtone. However the problem ...

How to edit videos in Android Emulator?

Hi, I want to load one Video and edit some part of the video to store it as a separate video file in the SD Card. Is it possible to do it in Android? If anybody knows please help me. Thanks and Regards, Rajapandian ...

how to remove widget when the app is uninstalled in android ?

Hi, In android, I have created a widget for my application. When I uninstall the app, widget shows "problem loading widget" error in home screen. I need a scenario where widget should be removed by the developer through code (and not by the drag and drop to the trash) when i uninstall the app. Is it possible. If so, what changes we need...

Android draw a path on a mapView from a large amount of longitude/latitude points

I am writing a application that needs to draw a "route" comprised of lots of GPS points (long+lat). The points are close together and don't follow roads, simply drawing a line between each point is ideal. The current implementation I have is very slow as I am looping over all the GPS coordinates and creating a new Point and overlayitem ...

Android Spinner

How to get a selected item from a spinner in android?Please help ...

How to add zoom controls for image view

I have to scroll the webview content vertically with in scrollview surrounded tag ,in the sense that webview hided initially and when touch event occured the webview contained have to visible the scroll control in both directions but its not scrolling vertically,anybody help me to solve it... here xml code ...

picking object not working?

I've got the following method that is called when the user clicks a position on the screen: public void setup(int xi, int yi){ int f = 0; PerspectiveCamera camera = new PerspectiveCamera(); camera.setViewport(320, 508); camera.update(); Ray touch = camera.getPickRay(xi, yi); while(f < GLCamTest.array.l...

Android - Using custom View in Widget

Hi, i made a extended a View, overwrote the 3 View Contructors and tried to insert it on my xml of a widget. The Exception is: java.lang.ClassNotFoundException: com.mypackage.myView in loader dalvik.system.PathClassLoader@4001e710 is it possible to use custom views in Widgets? ...

how to enable vertical scroling of web view layout with in scrollview tag.

I have problem in scrolling of webview vertically when it's scrolled along vertically,where this webview is with in scrollview tag,how can i enable the scrolling for webview and to disable the scrolling of whole layout when its on webview contained layout. ...

Android Airplane mode setting

Hi, I have modified onAirplaneModeChanged() in AirplaneModeEnabler.java. The method now reads the status of airplane mode directly from the database. When i enter the wireless settings screen, the checkbox is checked/unchecked as expected. But when I switch the airplane mode to ON, the airplane mode checkbox gets checked instantly. But...