android

Android Drop Shadow on View

I have done some extensive searching for code examples on this but cannot find anything. In particular, I am looking to add a shadow to a png drawable I am using in an ImageView. This png drawable is a rounded rect with transparent corners. Can somebody please provide a code example of how to add a decent drop shadow to a view either...

Marker icon not showing up but is clickable

I've got the following code which gets information from a database and plots it on a map. The information is there and clickable but the actual icon androidmarker is not visable. Why? How do I fix this? public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tweet...

How to catch that map panning and zoom are really finished?

Hello. I am trying to write an application that will dynamically load data to map while user pans or zooms it. So I need to track when map finished to change its view state (stops panning or zooming) and then load a new portion of data for creating markers. But in fact Google Maps API doesn't have any events to handle this. There are ...

Extended ContentProvider not behaving properly

I'm trying to implement a ContentProvider wrapped around an SQLite database. I've followed the tutorial here in building my ContentProvider: tutorial I want to test what I have; so I'm attempting to instantiate my new ContentProvider, retrieve a Cursor from the query handler, and attach it to my CursorAdapter. Currently, I'm doing th...

Adding a View Programmatically

I'm completely stumped on the use of ViewGroup and adding views programmatically. I've got an overrided ViewGroup class that I want to add a view to. I do it like this in the constructor: public TestView(Context context) { super(context); textView = new TextView(context); textView.setText("This is a test."); textView.setId(1); ...

Correct HEX code for Android Recommended Palette

In the Dev guide's Icon Design Guidelines, there is a recommended color palette given for the Launcher icon. If you look at the HEX color codes in the bottom row, the green and the orange are given the same code (#FF6600). This is the correct code for the orange, so what is the correct code for the green? ...

Android: When to use Service vs Singleton?

I'm quite new to Android development. When is it a good idea to create an Android Service instead of just using a simple Singleton class? Take, for example, the data layer downloading information feeds from the internet. Using a Service seems too much for some cases but sometimes I might need access to a Context so I'm a little unsure...

Android SlidingDrawer default state?

I'm currently having trouble with a SlidingDrawer. I want it to be closed when the application starts so it doesn't get in the way. However, it is determined that it will be open, despite putting slide.close() in the onCreate() of my activity. It seems to be closed if i use slide.animateClose() instead, but this slows my application down...

Android SectionIndexer Does not Show Alphabetic Preview beyond "A"

I have implemented the SectionIndexer on my Adapter and the FastScroll as well. The fast scroll appears, but the alphabetic indexer is always "A" as I scroll The list is about 1000 items long. Here's my implementation of the SectionIndexer. @Override public int getPositionForSection(int section) { return alphaIndexer.g...

Query noise level in Android

I want to develop a small Android app to measure the current noise level (probablyin dB). But I have no idea what to look for in the libs. I don't want to record the noise. Can someone give me a pointer what classes to look at? ...

Displaying PNG files in android (images being resized)

Im dragging my images into the drawable-hdpi folder in Eclipse and when I load them in the program they are 2/3rd the original size. (my 500x150 .png is being loaded as a 333x100 .png) Any advice on how I should be creating/loading images for android? private Bitmap mGrass; BitmapFactory.Options options = new BitmapFactory.Options(); op...

Facebook android sdk send request

Is there any way that we can send a request invitation to user/friend from facebook android sdk? Thank you very much. Best Regards, Eve ...

Android: how to open an apk file after downloading for auto-update?

I have an application that I'd like to add auto-update functionality (its not in the marketplace). I have all the code in place that would check to see if there is an update available and then i call something like this: Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse(Configuration.APK_URL)); c.startActivity(intent); which ...

R.menu cannot be resolved

So i am going through the Android development tutorial and i have run into an early problem when creating menus. I created a folder under res called menu and put in game_menu.xml as i was told. But the line inflater.inflate(R.menu.game_menu, menu); is telling me that R.menu cannot be resolved. As i cannot/probably shouldnt edit R.java b...

Android onSaveInstance State not working (for me)

Hi people. I have an application that acts like a clapperboard, in which I use a variable i going to i++ every millisecond (I need milliseconds to display frames per second, and the chronometer updates only once per second), then I display it in the format HH:MM:SS:FF. I also have a quit button which goes by if (item.getTitle() == "Quit...

Use a persistent notification to allow the user to return to running Android app

I am developing an app with numerous Activities. I would like to create a persistent notification that (more or less) says, "AppName - Return to AppName" that will be present whenever my background services are running. Creating and disposing of the notification was no problem. Now, the user could be on any of several screens/Activiti...

Android notification

Hy there do you know any way to make instead of a notification a list with notifications in the notification bar ? ...

Common scripting language that can be used on Android and iPhone

I've got an iphone app and I'm looking to port some of the data-layer objective-c code to a scripting language which can also run on an android phone. Any suggestions on what to use? I'd also like to be able to push new scripts to the app for bug fixes. Not sure if this is against the iphone SDK agreement or not. ...

Android authenticating with Kerberos

Hi Everyone, I am trying to create a Android application that uses an existing web service. However, the existing web service uses Kerberos for authentication and I am having trouble getting Android using the android-xmlrpc library to authenticate with the service. If anyone has any experience with this, please respond. I am completely...

Reference a jar or compile it with Dalvik?

I have a jar that I need to reference from my Android project. I also have the src of the jar, so I could include it in the project itself. I was wondering if referencing a jar vs. compiling it in with the project using Dalvik makes any difference in terms of final Dalvik package size that gets generated. ...