android

Access Google Health Record in Android

I want to include personal health record of the users in our app and need to connect to google health. I have looked at the version-2 of the alpha release for gdata java client code but the example shown for picasa is not so helpful for google health. Thats because the Picasa class has a authentication token but Health class does not. ...

JavaScript libraries for touch screen devices

I know there are a number of frameworks to help make web applications on Mobile Safari/Webkit look and behave like native applications (eg, jQTouch), but are there any more light-weight libraries that help out at a slightly lower-level? eg, I might want to add some animations on certain touch events to reproduce an iPhone style swipe. ...

overlay two images in android to set an imageview

I am trying to overlay two images in my app, but they seem to crash at my canvas.setbitmap line. what am I doing wrong? private void test() { Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.t); Bitmap mBitmap2 = BitmapFactory.decodeResource(getResources(), R.drawable.tt); Bitmap bmOverlay =...

image decoding problem in android

Some of the images are not being displayed in the web browser in android while they work fine on all other machines and mobile devices. this is an example of one of those images http://s3.amazonaws.com/itriage/logos/19/iphone_list.jpg?1261515055 So I tried to pull the image to see it if it works from code. This is what I did URL url =...

Radio Button selection Changes Toast on Android

I was writing a simple test application. There are two radio buttons within the app. There id's are "radio_red" and "radio_blue". I wanted to create an onClickListener event that read the text associated to the button and then returned a basic "Right" or "Wrong" toast. Here is a sample of the code: private OnClickListener radio_listene...

How to create named pipe (mkfifo) in Android?

I am having trouble in creating named pipe in Android and the example below illustrates my dilemma: res = mkfifo("/sdcard/fifo9000", S_IRWXO); if (res != 0) { LOG("Error while creating a pipe (return:%d, errno:%d)", res, errno); } The code always prints: Error while creating a pipe (return:-1, errno:1) I can't figure out exactl...

How to highlight clicks in app widget?

Hi everyone, I have an app widget which runs neatly. However, I am unable to highlight a click on a linked item. I've seen it in the standard app widgets like 'Music' and 'Power Control', for instance. Moreover, I've also been studying the Music app widget's source at album_appwidget.xml. The only thing I could think of is the LinearLay...

How to make Java and C programs communicate together

I have written a command line interface program in the C language. This kind of programs (as you know) waits for user commands typed in the terminal and reacts on depend of them. In fact, the program implements a callback function which parses the command and invokes the appropriate function in order to respond to the user. Now, I have...

About sqlite use.

Hi, There are some things my application needs to do on first start up(first startup after update) . These actions could be described in a .txt file and then when it is the case read the file and do according to it ,or on the other hand (I lean to use this option) a sqlite database could be used to store the information . The apk file ...

I've downloaded and built the Android source... now what?

I've built an Android app in the past (on a Windows machine using Eclipse), but having downloaded Ubuntu, the Android source and built it successfully (whew), I'm not sure how to tie it all together. How do I load my app into the Android that I've built? ...

HTTPS with Self-Signed SSL Certificate Issues... Solution or better way?

All I need to do is download some basic text-based and image files from a web server that has a self-signed SSL certificate. I have been trying to figure out how to use HttpClient to do this, but getting the SSL to work is a nightmare that seems to be way too much trouble for such a simple task. Is there a better way to perform these f...

android java memory management

how are static method calls handled by the JVM? does it still allocate memory when a call is made? if yes, how does garbage collection treat this allocation after the method call? ...

Android: What is a difference between 'orientation' and 'screenLayout'?

There are 2 different constants that have same description (http://developer.android.com/intl/de/reference/android/R.attr.html#configChanges) orientation 0x0080 The screen orientation has changed, that is the user has rotated the device. screenLayout 0x0100 The screen orientation has changed, that is the user has rotated the device...

Get the distance between two geo points

Hi, I want to make a apps that check what's the nearest place from where the user is. I can easily get the location of the user and I have a list of places with latitude and longitude. What would be the best way to know the nearest place of the list against the current position. I could not find anything in the google APIs. I am w...

HttpClient POST fails to submit the form + resulting string is cut-off (incomplete)

Hi, I'm writing an app to check for the bus timetable's. Therefor I need to post some data to a html page, submit it, and parse the resulting page with htmlparser. Though it may be asked a lot, can some one help me identify if 1) this page does support post/get (I think it does) 2) which fields I need to use? 3) How to make the actual...

launch activities from different package

I have activity A in package one, and I want to run an intent which will up an activity B which is in package two. How can I do this? Any samples will be welcome. this is what ive done, and the error i get: first activity ("MainActivity") in a package: com.abelski.currencyclient and second activity("SecondActivity" in a diffrent pack...

ANDROID: inside Service class, executing a method for Toast (or Status Bar notification) from scheduled TimerTask

I am trying to execute a {public void} method in Service, from scheduled TimerTask which is periodically executing. This TimerTask periodically checks a condition. If it's true, it calls method via {className}.{methodName}; However, as Java requires, the method needs to be {pubic static} method, if I want to use {className} with {.dot}...

Android: HTTPClient

Hi, I was trying http-cleint tutorials from svn.apache.org. While running the application I am getting the following error in console. [2010-04-30 09:26:36 - HalloAndroid] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x100000...

How to set webview scroll position within it on initial launch ?

I have an issue with Webview to set the initial scroll position within it when first launched. By default it is left , I want it to scroll and show the view from center. Or is it possible to resize the view to fit the screen width initially, instead of scroll bars. I need this since the left part of the page I am loading is blank making...

Moseycode Install Failure

I am trying to install the moseycode-0.2.1.apk on the emulator. I get the following error with both moseycode-0.2.0 and moseycode-0.2.1. 733 KB/s (410936 bytes in 0.546s) pkg: /data/local/tmp/moseycode-0.2.1.apk Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED] I tried on emulators(avd) with Google api 7, android 2.1, Google A...