android

GZip in android

Hi all, How to compress and decompress a file in android using GZip. please provide with some reference , so that it would a great help for me. Thanks in advance ...

Android: Managing long text in TextView

How to best view a long text ~ 600k. I tried to use TextView, but didn't find how to quick positioning in the right place in the text. Or I do not understand how to do it. ...

Setting the text of a TextView when the desired input is larger than ~4000 in String length()

I am trying to setText(string) on a TextView component and I am not seeing the text I set. The input String is larger than 4000 in length(). I find that if I reduce the text size, the text will display. How can I setText(string) on a TextView with all of the input String visible without changing the text size of the TextView? Do I ha...

ClickEvent on animated ImageView fires only at the start position

Android: I have an animated ImageView with an onClickEvent registered. I want the ImageView to move around the screen and then click on the ImageView. But when I click on the moving imageView, nothing happens. When I click at the position of the screen, where the imageView was at the beginning, the clickEvent is fired. So the real posit...

Save state of an android application when the back button is pressed

hi i have noticed while working in the emulator that whenever i get out of my app via any method other than pressing the back button, my toggle button (if pressed) will have its state saved and return to that state when i return to the app. im guessing its because its value gets saved in a bundle and reloaded when i return. when i leave...

Android development for Samsung Epic

My application include Text Viewer that grabs a file and shows it. For some reason this file is trancuated on Samsung Epic. My questions are: 1. Why is happening only on the Epic. 2. Is there an Emulator to test on Epic (since I can't reproduce this on the 2.1 or 2.2 emulator) Ohad ...

Android: Group notification in status bar but not in notifications list

Does anyone know if there is a way to group a notification in the status bar but not in the list of notifications? I want to show only one icon in the status bar but when the user drags down the "notifications list" it should be several notifications with different intents. As I understood there is only possible to either group both no...

Problem with notification sounds

I am trying to test a notification. I have created an emulator with audio playback enabled. I am able to get the notification but I am not able to hear sound. What could be the problem? Are there any settings I am missing? NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns); int icon = ...

Override default android messaging application

Hi, I want to override the default android messaging application. If I receive a sms or mms I want to send that to email but i don't want any notification on phone. So basically I want to replace the default messaging application. How can I make my application the default one that receive the sms? ...

Android: Styles, Includes don't take impact on preview?

Is it normal, that styles and includes don't have any effect in preview in Eclipse? The more I get into Layout building the less I can use the preview. Even in the newest SDK Version it's so poorly made. ...

android bluetooth activation error

I am trying to activate bluetooth programatically in android and the application installs fine, but when I click the button to activate BT , it gives exception. I am not able to handle the exception. Any help is greatly appreciated. I am new to this. Here is the code : package com.example.helloandroid2; import java.io.IOException; ...

onReceive never called

I have the following code I want to detect the screen off of the phone But the function onReceive never is never called can anyone give me a solution. Please help. if anyone has anyother working code please help. Thank you package com.pack; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Co...

SecurityException with specific running task

Ok, I have written a task switching application that allows you to see all currently "running" apps and allows you to quickly switch between them. Everything works fine and I have it published on the Android Market as "AppSwipe!" However, there is a running app that always shows up after making a phone call that I can't switch to due t...

Testing android project with db4o (or other referenced lib)

Hi, I'm working on a project for android that uses an external library, db4o. Well, I've created a test project and I was trying to test my PersistenceManager, an object that controls the database life-cycle and exposes part of the ObjectContainer api (ObjectContainer is an object from db4o library). When I started to write the tests, I...

Have the public static fields in android.os.Environment been removed? (Android 2.1)

Looking at the example code in the docs http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir%28java.lang.String%29 File path = getExternalFilesDir(Environment.DIRECTORY_PICTURES); It does not compile on 2.1 The static fields DIRECTORY_PICTURES, DIRECTORY_MUSIC etc. don't seem to be found. Update: U...

Detect touch on irregularly shaped bitmap on Android

So I'm making a simple game with a few irregularly shaped bitmaps drawn to the canvas every frame. The bitmaps move around the canvas via simple motion math. I'd like to detect when the user clicks on the bitmaps. They are PNGs with transparency of somewhat different shapes, and they are rotated via a matrix. Is there a way to capture...

Android activity to show a directory explorer to browse content of sdcard

Hi, In android, is there an activity show a directory explorer to browse content of sdcard ? Like a File explorer in Java, it can show the content of current directory and I can move up to its parent by clicking '..' and move down to a child directory by clicking the name of the child directory? Thank you. ...

How to connect 2 different spinners altogether

Hi guys, I am trying to connect 2 spinners together. Meaning, the items inside 2nd spinner will depend on whatever item is chosen for the 1st spinner. This is the code inside the main java file. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Spinner spinner = (Spin...

Android: Font Rendering Problems with .ttf >3MB

Hello All! My Android Application needs support for various languages (like Chinese etc.). Most of them are in the DroidSansFallback.ttf file from Ascender. See http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=data/fonts;hb=HEAD On some Android Phones, there is DroidSansFallback.ttf, but with many glyphs missing,...

Is it possible to scoll a LinearLayout

Hi stackies, I'm filling programmatically a LinearLayout with some TextViews using the addView() method. Is it even possible to let a LinearLayout scroll? Is there a widget that I could use instead? I tried quite a few but nothing worked. I found a few websites that recommended to use a TextView to create a scrolling area, but a Text...