android

Using Android AccountManager to get authtoken for gdata

So I am trying to sync to google docs, without having to ask the user for his credentials. I use this code to get an auth-token: AccountManager mgr = AccountManager.get(activity); authToken = mgr.blockingGetAuthToken(account, DocsService.DOCS_SERVICE, true); This returns a auth-token that looks well-formated. So on my DocsService I ru...

Cursor value null..

hi i am developing an app which get outgoing sms content through content resolver but it is giving some problem plz help me. package com.company.cellSafetyZone.model; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.database.Cursor; import and...

Method for cuting video when ACTION_GET_CONTENT Intent calls.

I know, iPhone has method for set max length of video picked from gallery(and video will be cut automatically). But on android i can't find same method. Anybody knows solution for taking video from gallery and cut it? Something like Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null); intent.setType("video/*"); // i hope somethi...

Clear listview content?

I have a little problem with listview. How do i clear a listview content, knowing that it has a custom adapter? edit : the custom adapter class extends BaseAdapter, it looks like this : import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGrou...

[Android] How to implement a little static map preview as list icon?

I built a ListActivity and now I want to add Map Previews as the List Icons. I dont want to extend MapView because: 1st I just need a little static preview and 2nd I already extended to ListView. I already looked into using the static map api, however that also doesnt look quite good in that small dimensions: http://maps.google.com/m...

How to place Relative layout at bottom of screen(or linear layout).?

I have following in xml I wanna put the second linear layout at the bottom of the screen. How will i do? I have set the property of second Relative layout to bottom but still not showing at bottom.. ** <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" and...

Is execution of ARM assembly in iPhone Simulator or Android Simulator possible?

Can anybody tell me if it is possible to execute programs using arm assembly language in the simulators? ...

Generate heat on an android phone (from code, of course)

I need to heat up an android phone (don't ask...) So far I tried running a max priority thread with a while loop which ROL-s an integer around, but that generates too little heat, even though the phone comes down almost to a halt. I tried doing complex math in the loop, but the results were same. I tried with more threads, but as expect...

How do I disabled (dim) an option in onItemLongClick from a ListView in Android?

When an item in my ListView is clicked, I have several options pop up in a dialog for the user to choose. However, there are varying scenarios where I'd like to disable one or more options so the user cannot choose them. Here's some code. public class MyApp extends ListActivity implements OnItemClickListener, OnItemLongClickListener { ...

What changes are made in the mass storage API between Android 1.5 and Android 1.6

I wrote some code to save images on the SD Card a while back. Now I added the targetSDKVersion to my manifest and now my file saving code ceased to work. I can reproduce it through removing the targetSdkVersion from my manifest from that on my App won't write anything to the SD Card. Is there an API change between Android 1.5 and 1.6 ...

Will TelephonyManger.getDeviceId() return device id for Tablets like Galaxy Tab...???

I want to get the device id that will be unique for each Android device. I am presently developing for a Tablet device. Want to get unique device id and store the corresponding values... So, i want to know whether Tablet devices will return a value if i use TelephonyManager.getDeviceId()...???Or is there any other value that is unique ...

TextSwitcher bug

Hello, i have a problem with the TextSwitcher. In my app i have 3 Textswitcher with wrap_content (width and higth) inside an LinearLayout! Each TextSwitcher is declared with an in and outAnimation. My problem: When the text is switch the first time, i have spaces between the elements! like: 1.23 45 678 but it has to: 1.2345678 witho...

How to read image file stored in internal memory ?

Hello, In my android application I an storing an image file in internal memory using below code- FileOutputStream fos = con.openFileOutput(fileName, con.MODE_PRIVATE); fos.write(baf.toByteArray()); // baf - ByteArrayBuffer fos.close(); Can any one please help me to read this image file from internal display it in an activty? ...

How to remove the selected tab in Android?

What should I do to remove only the selected tab in android? Is there anything like remove tab or anything that helps me to remove a tab in the TabWidget class or in another class of the Android API? ...

BitmapFactory.decodeStream always returns null and skia decoder shows decode returned false

test image here: http://images.plurk.com/tn_4134189_bf54fe8e270ce41240d534b5133884ee.gif I've tried several solutions found on the internet but there is no working solution. I'm using the following snippet code: Url imageUrl = new Url("http://images.plurk.com/tn_4134189_bf54fe8e270ce41240d534b5133884ee.gif"); Bitmap image = BitmapFact...

Android Services

Hello , i am having some problems with services in android , here is the structure of Activities which i am loading in my app . FirstActivity--->MusicPlayer---->ServiceToPlayMusic when i navigate back from MusicPlayer Activity to firstActivity . FirstActivity <------MusicPlayer. Service runs in background but the activity on whic...

Problem opening page with javascript pop ups in android webview

I am very new to both Android WebKit and JavaScript. I have a web page with 3 links (say A,B,C). When I open that page on my PC browser(Chrome) and click on the links, A opens in the same browser window, whereas B and C pops up a new window. In my android application I am loading the original URL in a WebView. I have implemented my WebV...

public boolean onKey() called twice??

Hi i am using following code public boolean onKey(View v, int keyCode, KeyEvent event) { msg = (EditText)findViewById(R.id.msg); String message = msg.getText().toString(); if(keyCode == 66) { //Its hitting here twice. } return false; };</code> Can anyone please tell me why...

audio Filtering android

Hello, is there a way to filter audio in android system? I am interested to get only the audio of a fixed frequency. ...

Two or More Activities in android

Hi friends.. I am using Button in main Activity. When i clicked this button it will go for another Activity. My question is.. when i clicked the Button it should not display another Activity window..For example..in my case when i clicked the button it will start another activity and in that Activity i have added functionality of Receivi...