android

Exception - Illegal Block size during decryption(Android)

I am writing an application which encrypts and decrypts the user notes based on the user set password. i used the following algorithms for encryption/decryption 1. PBEWithSHA256And256BitAES-CBC-BC 2. PBEWithMD5And128BitAES-CBC-OpenSSL e_Cipher = Cipher.getInstance(PBEWithSHA256And256BitAES-CBC-BC); d_Cipher = Cipher.getInstance(...

Transparently storing class state without exposing implementation

I have a model (MVC) class whose internal state (which basically contains of private int fields) I want to store. The program is running on Android (for now) so I need to store the in a Bundle, but I'll be using the same class later in a desktop application where I'll have to store the state some other way, so I can't reference Bundle ...

Adding to LinearLayout another Layout and handle this Layout in separate Activity

I have an Activity which uses a layout with a LinearLayout in it. Now I want to create in runtime a subactivity which loads some other layout and add this layout as item of my LinearLatout. How to do this? Please provide me with code example. ...

Android WebView zoom controls are not moved after resize

I use a Webview to display an image with zooming and scrolling enabled. The WebView is set to wrap_content for the height and width and the zoomcontrols are enabled. If the image is smaller then the screen the webview will show just the image and there is lots of space left on the screen. The moment the user zooms the WebView will grow...

Default Media Player in Android phones

I understand that all Android phones will have the WebKit browser Application. Is there a default Media Player that can perform RTSP stream in all Android phones? It seems OpenCore supoprts RTSP streaming - but is there a Media Player Application by default? ...

OpenGL-ES: Change (multiply) color when using color arrays?

Following the ideas in OpenGL ES iPhone - drawing anti aliased lines, I am trying to draw stroked anti-aliased lines and I am successful so far. After line is draw by the finger, I wish to fade the path, that is I need to change the opacity (color) of the entire path. I have computed a large array of vertex positions, vertex colors, te...

Android - Adding to a ROM and upgrading - Questions

** Not sure if this is entirely relevant to SO, it is programming related in nature but if its more suitable to a different forum please let me know and I will remove it ** I have a couple of questions for any Rom developers/experts on here regarding things that can be done with Android ROM's. 1) Is a parser Rom upgrade possible? So is...

How can i do the same thing with Gallery in Android

I am navigating images with the clicks of next and previous buttons.Here is my code: package com.myapps.imagegallery; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; public class ...

Android - Refresh Activities from broadcast receiver

Hi, I'm currntly struggling with an Android problem whose answer is maybe simple. (I'm new in Android developing) I have a main activity that builds a TabHost with two Tabs (each represents another Activity): public class Main extends TabActivity { private TabHost mTabHost; public void onCreate(Bundle savedInstanceState) ...

Reg: Remote Service

Can any one provide sample Remote service example. I want it like two different application. One application should contain service. Another application should use that service. Thanks in adv.... ...

Android Position reset after Restart? -> Serious Problem

Hey mates, is it possible, that android cleares the last known location after a restart? Yesterday my code worked very fine, but today after rebooting my phone (AND emulator) it seems that the .getLastKnownLocation (see below) returns null, which leads to a nullPointerException... Can you confirm that? How can I avoid this problem? I'm d...

Connecting PC via Bluetooth SNP

Hi, I have a widcomm example BluChat "WIDCOMM SDK RFComm Service" running on my PC with an USB dongle (BT-2400P). I would like to connect this chat from my HTC Desire. So I stared with the Java example http://developer.android.com/resources/samples/BluetoothChat/index.html. This is also using BT RFComm. If I'm using my HTC as a server i...

Background Image Placement

Hi, I'm trying to set my root LinearLayout element (which is set to fill_parent in both dimensions) to have a background image which is always located in the lower left corner of the screen no matter the orientation of the device. It would be excellent if there were some way to set the background image position such as that which you ca...

Available languages for speech recognition

From what I've read, speech recognition is available for 3 languages: English (UK, US, Au ..), Japanese and Chinese (Mandarin). Does anyone know more details about how to switch between these languages? Is there a way to know (programatically) which language is active for speech recognition on a certain device? (maybe in Japan the only ...

Android Service unable to do HTTP connections until an Activity does HTTP connections

Here is my post: I'm trying to make myself as clear as possible: Description of the classes in my application Description of the code architecture (by the Service and by the Activity) Description of what should happen Description of what actually happens Logcat Source code Description of the application classes I have in my app...

deviation in gps coördinates android emulator

I was wondering if there is any deviation or bug in de android 1.6 emulator on GPS coordinates. when I search by Google maps on the GPS coordinates 51.501563,-0.12534 then I get "Canon Row" in London, but when i put this coordinates in the emulator(geo fix -0.12534 51.501563) the the emulator shows in Google maps(on the emulator) a diff...

ListView and undeterminate ProgressBar

Sorry for the question it might sounds stupid, But: how do you activate a ProgressBar according to the cell you just cliked on ? I have a list view, with a menu that shows after a long press. When I click on one of my option I would like to display the ProgressBar in the listView according to the cell I clicked on. It is currently al...

How to change default focusable color(Orange) of ExpandableListView in android

Hi, Anyone have any idea please share. Thanks and regards. Mintu ...

Need guidance for my first Android application: how many activities should I use?

Hi, I'm starting Android doing an application for searching restaurants, and some guidance would be welcome! On the first screen I'd like to have a search field with a submit button (I get the data from a web service), and below a list with the results of the search. When clicking on one of the items of the list it will show a screen wi...

Debugging android application on HTC Hero

Is it possible to connect the ADB with an HTC Hero? I tried following the instructions for the Win USB driver but when I try to install the driver I just get a generic message saying that there was a problem installing the driver. Looking at the supported devices, the HTC Hero isn't listed. Is this even possible? As a note, I've trie...