android

pass value from one class to another

I have 3 classes. Class AddText(extends Activity), Grafitti(extends MapActivity) and MarkerOverlay. Grafitti calls AddText, and AddText opens a new Activity that gets an input from user (EditText), then when that is successful Grafitti calls MarkerOverlay. The problem is I can't access the input in AddText. I need to use that input in...

How do I bind this service in Android?

This is the code in my Activity. Initiate an Intent, then a Connection, right? hello_service = new Intent(this, HelloService.class); hello_service_conn = new HelloServiceConnection(); bindService( hello_service, hello_service_conn, Context.BIND_AUTO_CREATE); But my question is...what goes inside the Connection? class HelloServiceC...

Downloadmanager Concept

Hi there, cause the android build in downloadmanager is not reachable by sdk applications i have to implement one by myself. Before starting i want to get feedback how to make it the best way. So here we go: Requirements: basic: Listview with one download per row button to cancel active downloads progress view of the downloads (and so...

Inform Activity from a BroadcastReceiver ONLY if it is in the foreground

Hi there! Maybe it's easy, but I couldn't really figure this out right so far... I got a BroadcastReceiver waiting to get triggered by the AlarmMangager - this works fine. Now: because the event, if it occurs, needs to refresh some elements on screen of the main Activity, I would like to send an Intent from that background BroadcastRec...

MapActivity class in android?

hi all, when i extends the MapActivity class it shows an error. error is: cant resolved datatype. why? how to add a maps.jar in my project? thanks. ...

bionic (andorid libc) mutex variants

Hello Which types of mutex does bionic libc support? recursive timed adaptive errorchecking ...

Is it possible to record phone calls via an Android App?

I'm a developer looking to create an Android application to record phone calls. This spawned out of my own personal need to record phone calls for my own purposes and for my records. Is it possible to do this? Is it possible to get access to the microphone and what's coming through the speaker? I'm kind of new to Android development,...

How can I find out how many characters are displayed in TextView

Hi, If I call setLines(3), how can I find out how many characters in the text (pass to TextView via setText()) are being displayed? Thank you. ...

shared libray missing in android ? how ???

hiall, 02-18 00:02:08.432: ERROR/PackageManager(57): Package com.example.brown requires unavailable shared library com.google.android.maps; failing! i got this exception in logcat. any idea??? ...

android image button

How can i create a button with no text and an image centered horizontally ? I don't want to use an ImageButton because I want to define a different backgound image ...

Can the android JVM run on a PC also?

Can the Android JVM run on a PC also? or is it limited to working on a mobile device only? From what I understand, when you develop using eclipse it is emulated, not running the actual jvm correct? ...

how to add map.jar into myproject in android?

hi all, i am working on mapactivity. map.jar file in sdk\add-ons path. how to add it in my project?? thanks.. ...

How do I build my own android for the samsung galaxy

Is it possible for me to build my own version of android and put it on my samsung galaxy spica lite? I would suspect that Samsung needs to put their drivers into open source since android is open source? ...

Service stopping another Service

Hi, i have a question about Services in Android. I have a application with two Services A and B. Is it possible that Service A can stop Service B? I dont want to do it through a Activity, cause the Application will be in Background. If some special Event happen in Service A, then it should tell Service B to stop. How can i do that? ...

Using the deprecated AbsoluteLayout class in Android?

Hi all, The AbsoluteLayout class is deprecated but still can write it in code and it works. Will there be any problems if I use this class? Will the application work correctly after I deploy it on a phone? Thanks ...

How can I place an background image to a the left upper corner of TextView in android

Hi, Can you please tell me how can I place an background image to a the left upper corner of TextView in android? I would like the image not to be scaled by android. I have tried Resources res = getResources(); setCompoundDrawables(res.getDrawable(R.drawable.icon48x48_1), null, null, null); Nothing is shown. And I have tried setBa...

Android: how to properly wait on service process completion

Here's scenario: I have 2 activities and one service First activity is a landing view/search page. Second activity displays search results Search is always executed against internal SQLite db Periodically (say daily) db needs to be updated from the remote source which is a long process If user performs the search during the update I wa...

How can i find the orientation of a picture taken with Intent MediaStore.ACTION_IMAGE_CAPTURE?

When I take a picture with Androids camera app, it detects the phone's orientation and saves the pic accordingly. So if i take a picture of a building, the roof will be on the topside, whether I hold the phone in landscape position or portrait. However, when i use Intent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTU...

Layout buttons so each divides up the space equally.

Im using a LinearLayout to put two buttons horizontally side-by-side, but I want to each button to size itself to use 50% of the horizontal space. I thought layout_weight of "1" for each button would do the trick, but maybe my layout_width needs to be changed? ...

Android bindService problem

Hi, i have a problem with bindService. In my Activity i have the following code: private ServiceConnection mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { mService = IPrimary.Stub.asInterface(service); } public void onServiceDisconnec...