android

Best way to scale a bitmap in a view?

Greets, I have a custom view which is drawing some bitmaps on screen. I want to scale the bitmaps depending on some sensor data. Can anyone suggest to me the best way (performance wise) to scale the bitmaps. Right now I'm creating the bitmaps in the constructor of the view but if I start to scale it in the onDraw method I believe I'l...

apply zooming in android device

Hi i want to zoom in and out during capturing image i open camera by using Camera class how i can apply zoom before capture the image thanks in advance sunny ...

Android - Using PreferenceScreen to display and save settings to/from ContentProvider

I have my own custom Content Provider that loads a database which contains the settings information for my application. I load the settings from the ContentProvider on the creation of my Settings activity. My Settings activity is made up of a PreferenceScreen and Dialog based EditText's. The following code shows how I use the preferen...

Open source VideoPlayer / AudioPlayer / MediaPlayer GUI / UI resource available?

Hi, I'm looking for a user interface for a MediaPlayer which should be able to play video as well as audio files. Furthermore it needs the following things (nothing fancy): TextView for playing time Progress Bar for progress visulization Play/Pause/Stop buttons NO playlist functionality required, the player will only play a single i...

Get notified/receive explicit intents when an activity starts

Hi, I am developing an application than gets notified when an activity chosen by a user is started. For this to work, the best approach would be to register a broadcastreceiver for ACTION_MAIN explicit intents, which as far as I know doesn't work (because these intents have specific targets). Another, probably less efficient approach, i...

Android: Add view onclick after the view itself

I have a LinearLayout View with a OnClickhandler and I want to add a View after the LinearLayout programatically when the OnClick event is fired. public void onClick(View view) { LayoutInflater li = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); LinearLayout info = (LinearLayout) li.inflate(R.layout.infolaye...

Stop objects from wrapping in Android

How do I prevent a TextView, or any visual object, from wrapping to the screen and instead have them chopped off the sides? Is there some XML attribute or code to do this or is it impossible to have anything overflow from the screen? For example, you have this: But you really want this: Any ideas? ...

how to pick a image from gallery (SD Card) for my app in android?

i am working on photos options in my app. i have a button and imageview on my activity. when i click the button it will redirect to gallery and i would like to select an image. the selected image will appear in my image view. how to do that? any idea? ...

How can I find the current position of a View when it's being translated by a tweening animation?

I have a View in an Android application, which is used to show a graphic. This View is being animated by a translation animation, specified in an XML file. In my case, the translation is moving the View from right to left across the screen. I'd like to be able to tell where on the screen the View is when a touch event occurs, but I can'...

Does Android keep the .apk files? if so where?

After android installs an application from the Marketplace, does it keep the .apk file? Is there a standard location where Android would keep such files? ...

How should I deal with persisting an Android WebView if my activity gets destroyed while showing another one?

Hi, I'm building an Android application that's based around an enhanced WebView (based on PhoneGap). I've enhanced the WebView so that from JavaScript running inside you can invoke the native contact picker to choose a phone number (which may be supplied by Facebook for example). The problem I have is that the native contact picker ru...

How do I perform this MutliArray setup in Java?

I come from a PHP background and I'm just getting my teeth into some Java. I was wondering how I could implement the following in Java as simply as possible, just echoing the results to a terminal via the usual "System.out.print()" method. <?php $Results[0]['title'] = "No Country for Old Men"; $Results[0]['run_time'] = "122 mins"; $Resu...

Can i use jmonkeyengine on android?

Hi, i', trying to make a simple 3d game for android, and i want to use jmonkeyengine, Can i do this? How can i do it? Someboy can show me an example? thanks!!! ...

cannot display progress bar at the time of loading another Activity in Android

hi group This may be a simple question but i am a beginner ,i need your suggestion on this. i have two Activities A1 and A2 .When i click the image on A1 screen i have to display progress bar until A2 screen appears(A2 activity has huge task to do).I tried image.setOnClickListener(new ImageView.OnClickListener() { publi...

How to know that satellite is already found or searching on android?

I just want to show text "please wait" while app is searching for satellite and show "ready" when we found and connected to satellite. How can I do it? ...

Android - Pack resources into apk

Is it possible to pack resources in a way that they get distributed with apk? I know it's impossible to use subfolders in res's directories (drawable, raw, etc)... so I was wondering if I can create folder (data) and somehow tell compiler to include all resources from that folder - and later access them with InputStream (without using R....

OMA DM features supported in ANDROID APIs??

I would like to know if OMA DM features are supported in Android APIs; well, I have seen that reading certain values from Settings.Secure is possible, but writing is not. I am interested in changing the email,APN,WAP,and mms Settings remotely without displaying the interference to users... Any APIs are available for removing ,listing,and...

How to insert the latest row_id of a table into a different table using Android and SQLite

I understand the title may sound confusing, but the goal is very clear: I am building an application that requires two tables: tracks and waypoints. A user enters the track name via a textfield and the table generates an ID under track_id. in the waypoints table there is a column called track_id_fk. When the OnLocationChanged() metho...

Android activity won't fill WVGA screen

Hi, I'm developing an Activity with a simple LinearLayout with a button. When I try the activity on my hardware (WVGA 480x800 screen) the activity only fills the standard size (480x320) while the OS itself fills the whole screen. What could be the issue. Thanks, <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="...

android todo list application question

hi. i am a newbie trying to learn android by doing a todo application. so far i have: list all todos create a todo(insert into database) i need help adding a delete feature my xml structure for todo list is that i have a TableLayout. and to display my todo list, i put my todo in a textview and i put that textview into a tablerow and ...