android

Can Android's WebView automatically resize huge images?

In some web browsers, huge images are automatically resized to fit the screen. Is it possible to do the same in an Android WebView? The web page just contains the image, maybe adding some JavaScript could do the trick? Anybody has already done this? Note: I don't know the size of the image in advance. ...

how to modify the the height of status bar?

hello,can I modify the the height of status bar? if yes,how? thank you. 'notification bar' i means,i am sorry. ...

Navigating to the home page

When running an application, when the home key is pressed the mobile home page comes to the front. How can i do the same on click of a button named exit ? ...

Tabcontrol on android

I want to make an Tab control on android. But the tab control is displayed on top, wherein i want it to be displayed the bottom line Can anybody help with that ...

install apk on sdcard

adb install [-l] [-r] [-s] - push this package file to the device and i nstall it ('-l' means forward-lock the app) ('-r' means reinstall the app, keeping its data ) ('-s' means install on SD card instead of inter nal storage) how to use ...

Access an handler in service from extern activity

Hi all, Ive set an in a running service a handler which does operation every X time. Now after certain time i wanna start an activity from that service, and in onCreate of the activity i wanna access that handler of the service(which started the acitivty) and stop it's schedualed operation (mHandler.removeCallbacks(someTask)); an...

How to check whether the response returned from server is image or not in Android?

In my Android app I am calling a URL for fetching images and that URL is also fetched dynamically. Sometimes what happened is that the server returns the path of the image but actually there is no image so can we put some kind of validation. ...

Image rotation problm about a fix point using bitmap

Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.arw2); int w = bmp.getWidth(); int h = bmp.getHeight(); float px = 160,py = 215; Matrix mtx = new Matrix(); mtx.setRotate(rAngle, px, py); Bitmap rotatedBMP = Bitmap.createBitmap(bmp, 0, 0, w, h, mtx, true); BitmapDrawable bmd = new BitmapDrawable(ro...

Getting java.lang.nullPointerException using SharedPreferences

I am trying to save the date of file parsing, so that when next time user, opens the application, the date can be checked against the last parsing date. I am using shared preference to save the data and retrieve it, but getting error. here is the code : SharedPreferences settings = getPreferences(0); String today = new Date(System.cur...

Having problems generating a keystore (Java)

I am trying to publish my first Android application, and therefore need to sign the app with a keystore. At first everything goes well. I type the following into the command prompt: keytool –genkey –v –keystore testKeystore.keystore –alias testKeystore –keyalg RSA –validity 10000 I answer the several questions that follow, but after...

Android - How to scan for Wlan values several times in one process?

Hi! I'm writing an app where at one point I have to scan for Wlan values(ssid, rss, mac) several times at once (I need to make the mean value of several rss values I received during the scans). This happens when the user presses a button. After the button having been pressed, the scanning process starts, takes 10 scans, calculates the me...

Android Records a Video into SDCard

Hi, I am trying to record a video into sdCard. But everytime I click on the Button to record, it shows "stopped unexpectedly" error. Not too sure where went wrong. I am not sure if setOutputFile's path is how I should indicate. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R...

Android contact query

Hey, I have a problem in querying phonebook contacts. What I need to do is get a list of contacts that have both phone and email entered or are of a specific type. Basically like this: public static final String SELECTION = "("+ContactsContract.Contacts.HAS_PHONE_NUMBER +"='1') OR " + RawContacts.ACCOUNT_TYPE + "='" + Constants.AC...

starting text to speech engine from a service?

i have a service from where i am trying to start a TextToSpeech engine ,but it seems that it's not working , so is it possible to start tts from a service? here's what i've tried: package com.example.TextSpeaker; import java.util.Locale; import android.app.Service; import android.content.Intent; import android.os.IBinder; import andr...

Add datas (phone number, notes etc...) to an existing contact (ANDROID 2.1)

Hello everybody, I've I'm faced to a big issue : I can't add datas to an existing contact :( I'm developping an application wich manage contacts, I can add, delete or edit contacts. The creation is ok, because I create all types of datas (even if they are empty) for the contact (this is NOT a good way, I will change this later). So whe...

changing CharSequence first letter to upper case in android

it may seem simple but it posses lots of bugs I tried this way: String s = gameList[0].toString(); s.replaceFirst(String.valueOf(s.charAt(0)),String.valueOf(Character.toUpperCase(s.charAt(0))) ); and it throws an exception another try i had was : String s = gameList[0].toString(); char c = Character.toUpperCase(gameList[0].charA...

gsm call / sms send doesn't work from emulator/ddms perspective

hi all, i have problems simulating call or sms since telnet or ddms perspective on eclipse. I'm connected to the device and some commands works (window scale,...) If i try to simulate a gsm call then everything seems ok but i haven't anything on my emulator (nor incoming call nor notification) then if i launch an "gsm list" command my i...

I want soft key board when mobile is in landscape

Hi ,In my application i want soft keyboard when emulator is in landscape mode only.if mobile is in portrait mode i want to use keyboard which was designed by me, give me some suggestions for this.Thanks in advance ...

Android SDK add-on

Can anyone share some details of devloping new SDK add-on like the one Google map API? I do not find any detials on how to build new sdk add-on? Is that good approach to have sdk add-on for connecting to twitter, facebook, youtube applications? I mean the library would contain the methods to access the developer APIs supported by the so...

android image gallery start moving or slowing down and stopped moving.

i am using android gallery is there any listener or way i can know which get fired when user start motion, stop motion, slowing down or moving ? i see you can overide the following method @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return super.onFling(e1, e2, velocit...