android

Anroid ratingbar set style from code

I don't see any method like setStyle for class RatingBar, how can i set rating style from code ...

Android: Image displayed at Webview from Url with high quality loss

I want to display an image from an url with an Webview at Android. With Android phones with Version 1.5 and 1.6 there is no problem. but the same pic and the same code on an AndroidPhone with Version 2.0 and the pic is totaly pixelated. Like Android is resizing the image first to a smaller one and then resizing it back to "normal" size...

how to hook key event.

I'd like to limit the text length of EditText widget, And if user type more charactes than the limited length, I want to show a kind of warning popup, however I can't show popup. The problem is that we can't show popup while typing, Probably, many people think a way of utilizing OnKeyListener or OnKeyDown. But, when the word is composin...

How to Record piano voice in Android

Hi, I want to make piano application in Android phone, I want to record piano voice, How i record own phone voice. ...

How to use OnKeyboardActionListener?

Simply say, is there any example about 'OnKeyboardActionListener'? I want to call my method, whenever user type any character on keyboard. OnKeyListener or OnKeyDown is not called when the word is composing. <- it's a problem. So, I'm trying to use 'OnKeyboardActionListener' to solve the problem above. ...

How can I bring an activity to the front from a background service

Hi, First of all, I am aware my issue is against the philosophy of Android, but I have no choice, this application will run on a embedded car gps and I need to bring an activity to prevent from car accident, for example, when it's happen around the user. I have to put other activity on the back and bring my alert pop up without user man...

how to set MaxLenght in android TextView Programmatically?

friends, i want to set MaxLenght of TextView Through programming i cannot see Set function related to MaxLenght can any one guide me how to achieve this? i dont want hard code in layout. any help would be appriciated. ...

Closing several android activities simultaneously

In my application you can navigate through several Activities until the Activity stack is quite deep. We'd like a button on every Activity that will take you straight back to the main menu - i.e. pop all Activities from the stack except the first one. I've put the button in a View that I can easily put on every Activity in the applicat...

Automated testing in Android development

I have an ordinary project with JUnit tests that are connected to the classes in my Android Project. I want my server to run some JUnit tests in my testproject everytime I commit my code from my Android Project. Is there a best practise to do this? So far I only managed to run the tests when they are a part of a while the JUnit tests a...

Multiple shapes on Android

Hi Hi I'm trying to build a layout where some shapes will popup every 2 seconds. If the user will click one of these shapes, they have to disappear. What is the correct way of doing this? I thought about a thread, but i missed out. Here's my code at the moment (is not working): public void onCreate(Bundle savedInstanceState) { ...

Android: How can i access email addresses in android

I have the following code through which i am able to retrieve phone numbers. Somehow , i am not able to retrieve email addresses by using android.provider.Contacts.People API. Any ideas? import android.app.AlertDialog; import android.app.ExpandableListActivity; import android.content.ContentUris; import android.content.Context; import a...

Problem with TextViews running into each other in RelativeLayout

I have a problem with two Textviews on the same height in a RelativeLayout running into each other. I use the following Layout. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:...

How to have Android Service communicate with Activity

I'm writing my first Android application and trying to get my head around communication between services and activities. I have a Service that will run in the background and do some gps and time based logging. I will have an Activity that will be used to start and stop the Service. So first, I need to be able to figure out if the Servi...

android stop notification service problem

when my application start i am starting the notification service by calling the notificaiton service class for every one minute it is updating the values to notification service for that i taken timer.scheduleAtFixedRate but when i come out of my application onDestory method i am stoping the service but it won't stop what's the proble...

Stopping GPS on back button press

Hi, My application uses GPS updates while it is running and I would like that to stop when the user back out of the app as I assume it will continue wasting a lot of battery power. I've tried intercepting the back button press but it doesn't seem to work. I'm not sure if this is because it's not executing the code or I'm using the wron...

Email Accounts Issue

Is there any way that i can access the email accounts that are saved in the default email client of android. Basically i want to access the inbox and display their mails without asking for username and password. Does AccountManager class thats available in android version 2 answer my query? and if yes then is there any alternative for ...

Android: How to Add Static row in list view

Android: How to Add Static row in list view I have a requirement where i need to add the Static row as first row in list view Thanks in advance for help.. ...

Question about debugger security

Can an attacker attach a debugger to my app after installing it to the market, or does the app have to be marked as debuggable first? How secure is this? Are there ways to get around it? ...

access virtual host(name based) in android

hii i have set up virtual host in apache and and added relevent information in windows host file. it works fine for desktop browsers but i am not able to access this from android simulator's browser. as a example a i created a virtual host "testweb" i added this information in widows hosts file also so in desktop browser it wor...

Java Encryption issue

I am using PBE encryption to encrypt and decrypt some text on an Android application but I get the BadPaddingException: with the "pad block corrupted" message when I use the wrong private key to decrypt the text. My question, since I am not well versed with encryption in Java, is if this is the normal behavior of the encryption API, be...