android

Using date functions in android application?

Hi there, I am displaying some event data based on the todays event and a list of events in a week. Currently I am displaying all the events in form of list from the file, As the file contains out dated events as well but I want to display on the basis of today's date events and a week events then week after. In short I want to restrict...

What is the E-mail Attachment limitation in android?

Hi all... I wanted to know what is the maximum size of the file that we can attach with e-mail in android? Or is the attachment limit completely dependent on E-mail that we have configured ??? With regards Santhosh Kumar H.E ...

Android Socket connection refused

I am trying to open a Socket on Android but everytime I try I keep getting connection refused error no matter what way I try. The error happens on the following line of code where I try to create the connection. Socket socket = new Socket(getLocalIpAddressString(), 8008); The following is the method I use to get the local ip addr...

What's the best way to add scripting to an Android app?

I have an XML based file format that I'm using to store and load instances of objects. I'm interested in adding some scripting support to those objects so that they can respond to events. That said, I also don't want to cripple performance. Are there any well known scripting options for Android - maybe even ones where while loading, I...

How to put Custom View above built in views in Android?

Hi All, I am developing a small app for Android. I am creating my own view. I am planning to design the layout to be: <LinearLayout> <MyView> <Button><Button> </LinearLayout> But when I run my program, my custom view will cover the whole screen. Is there anyway to avoid this? I have already tried to add android:layout_width, ...

Robust way to save/load objects with dependencies?

I'm writing an Android game in Java and I need a robust way to save and load application state quickly. The question seems to apply to most OO languages. To understand what I need to save: I'm using a Strategy pattern to control my game entities. The idea is I have a very general Entity class which e.g. stores the location of a bullet/p...

what is Regex pattern for html tag in java or android ?

i have this tag as input tag: <a href="controller.jsp?sid=127490C88DB5&R=35144" class="11-link-dkred-bold"><b>Mr. John Q. Anderson&nbsp;&nbsp;&nbsp;MBA 1977 E</a> in this i want get the value Mr. John Q. Anderson   MBA 1977 E wat is patten value for this in regex? ...

quick check on use of map api (android)

When you use the Google map api, it is not part of the Android SDK, and you have to mention it in your manifest xml file. Do you have to do anything to access the jar file containing the map api code? Or is that automatically present on the device or emulator, the way the SDK code is? Do you need put the map api jar file in your class...

Widget host app with custom view - onClick is not triggered in the app widget.

I'm writing an app that will host widgets. The app has custom view (which probably is the source of issue). I obtain AppWidgetHostView like this private AppWidgetHostView widget; ... AppWidgetProviderInfo appWidgetInfo = mAppWidgetManager.getAppWidgetInfo(appWidgetId); widget = mAppWidgetHost.createView(this, appWidgetId, appWidgetInfo)...

Setting a background drawable for a dialog?

Hi, Tried posting this at android dev, wanted to go here too in case anyone knows. I'm trying to supply a custom background drawable for a dialog. I've created the following in my styles.xml file: <style name="CustomDlg" parent="@android:style/Theme.Dialog"> <item name="android:windowBackground">@drawable/my_background</item> </...

Finding out all about Android Uri class - use and purpose

Does anyone have some helpful links to find out about Android Uri's? For example, you get a Uri back from a "take a picture" Intent. What does a URI look like and how do you use it. Why are they used instead of filenames or file handles? The Dev documentation on the Uri class is practically worthless. http://developer.android.com/r...

Switching Android SensorManager speed. What's a good practice?

Hello stackoverflow! I'm interested to switch between different sensor orientation speeds over time to optimize the program ie.. battery life. The routine may be called very often. I'm looking for the right practice. sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); sensorManager.registerListener(s...

Android ListView item highlight programmatically

Hi all, I know it's been asked around but I haven't found quite the answer yet (new to Android so sorry about the ignorance) my app's launch Activity has an EditText (called searchbox) , a ListView (designations) and a Spinner (types) I use the EditText as a searchbox, I have to pass the string through a custom editing to make searchi...

Android - Eclipse setup missing Google APIs

Hi, I just finished setting up my Eclipse with the Android plug-in. (i.e https://dl-ssl.google.com/android/eclipse/) Now when I do the following 1. Eclipse > Preferences > Android, I see a lot of "Target Name" like Android 1.1 - Android 2.1 However, in the book that I'm reading, I'm also supposed to see a "Target Name" called "Google ...

Easiest way to implement RSS reader on Google Android?

Hi guys, This is my first time on stack overflow, so I apologize if this question has been asked before, but is there an easy way to implement an RSS reader on the Google Android (API 1.5)? I'm searched far and wide with the code sources I know of, and I've only found one implementation which takes 6 different classes and doesn't seem ...

Kubuntu 9.10 Android device not properly detected

I've used this official tutorial to setup my machine so it could detect my Android devices. But from some reason ADB doesn't detects any of my devices properly(Hero and Magic), ie it doesn't show device's IMEI or Firmware version but a bunch of question marks: ????????????? I've tried googling for a solution but I've found nothing...

trying to get the most accurate device location from GPS or Network in Android

I am trying to determine the most accurate location of a device, in the shortest time possible. I am storing the data as a geopoint, and have it displayed on a mapview. The last time I activated the GPS on my device and let it get a location lock, i was approx 80 miles from where I am now. I have a location manager setup and a locatio...

What's the recommended way of create Android libraries for use in apps?

I have an app, say MyApp Free. I want to create MyApp Pro which I can charge for that has some additional functionality. The obvious way is to have a library that contains almost all my app code, then two Android app projects for the Free and Pro versions which reference that library. Suggestions? ...

android listview

Hi guys i was looking at this code but im struggling to understand what the super keyword does , now i know it would call the superclass constructor but in this example there doesnt appear to be a super class so im confused. So theres the customArray constructor and then its calling super but on what? public class customArray extends ...

retrieving image from sd card in android

How can I retrieve the last image in the SDcard - Last one captured - plz, give me a sample code thanks ...