android

Using Protege owl ontology on Android

I have a practical seminar this semester, and I want to use ontology on Android application. I choose Protege owl ontology as a ontology API and this tool worked in normal Java project. But when I tried to import this jar files which for the owl ontology API in Android project.It will fail and I haven't found any solutions in the Intern...

android Phone Vibration doesn't stop using cancel method

Hi all, I wrote some code that mute the phone whenever an incoming call is received. When the phone in vibrate mode I use the following code to stop the phone vibration: Vibrator vib = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); vib.cancel(); While it worked on my Nexus One with android 2.1, it seems that it doesn'...

Good UI practice in Android, are there some sample code?

Hello all! I read carefully the good UI practice from the Google Dev Blog; http://android-developers.blogspot.com/2010/05/twitter-for-android-closer-look-at.html and I found that they are right and twitter is an application that I really love for its User Friendly Interface ( like the Google IO app too) As I spend most of my time deve...

How to read a local (res/raw) file line by line?

I have a text file in my res/raw directory. I want to read the file line by line, but FileReader and BufferedReader fail, because of Android's security restriction. How else can I do it? ...

Weird problem on android webview with canvas

I am draw some canvas charts on the android webview, and use javascript to change chart just by hiding and showing, and also change the title by reset its innerHTML. The title is just a normal html tag "<div id='title'></div>", The problem is that the page does not render well when I switch charts, for example. when I choosed to dis...

Vertical content align in Android EditText

Hi, I have a multi-line EditText: <EditText android:layout_gravity="center" android:id="@+id/txtMessage" android:layout_height="wrap_content" android:layout_below="@+id/lblMessage" android:layout_width="wrap_content" android:width="250dip" android:text="" android:maxLength="760" android:lines="4"></EditText> How do I vertically align ...

cant see breakpoints when I want to debug using device

When I'm using the device and click on my debug the application is lunched in my device but I cant see the break points . In the debug window the application whom run is shown for a second and then disappear and I cant debug my application on the device . Did I miss something ? can someone please explain me what I did wrong and corre...

Memory efficient image resize in Android

Hi, I am trying to reduce the size of images retrieved form the camera (so ~5-8 mega pixels) down to one a a few smaller sizes (the largest being 1024x768). I Tried the following code but I consistently get an OutOfMemoryError. Bitmap image = BitmapFactory.decodeStream(this.image, null, opt); int imgWidth = image.getWidth(); int imgHeig...

Eclipse/Android - Debug Configuration - Device?

I have set up a "Debug Configuration" to debug my Android project. However to get it to debug on a device (HTC Desire) I have to set the Configuration's "Target" to "Manual", there seems to be no way to set in the Debug Configuration that it should go to a selected Device. It does work, but each debug session I have to "Manually" choose...

does AndParcel allow android Library projects?

Well, I might as well post the fist question. Does AndParcel allow Android Library project functionality? Meaning, I should be able to include an Android Library project as a parcel correct or no? ...

Android singleTask or singleInstance launch mode?

I have an app that has a list as its main activity and then you can click items which opens a detailed view of that item. I also have a search activity that is similar to the main activity and works as intended. However I want this search activity to only have once instance on the stack so that users can search multiple times and clicki...

connecting to Google Apps Spreadsheet with android

Using the following code fails with a NullPointerException and the attached stacktrace. At this step I have successfully authenticated with google and try to access the following URL: https://spreadsheets.google.com/feeds/spreadsheets/private/full The call to getResponseCode fails (also the getInputStream call would fail) Any help appr...

Android - What does adapter.notifyDataSetInvalidated do?

What does the method adapter.notifyDataSetInvalidated() accomplish? There is no documentation on it. I am trying to reload a ListView and notifyDataSetChanged or notifyDataSetInvalidated don't seem to accomplish anything. ...

Android RTSP streaming failing

Hi I 've Set up wowza streaming server in my ubuntu box for RTSP streaming video files. The video gets stream perfectly when I 've Totem video player at client side. The same url or video is failing to work on android device and the application that tries to access that rtsp url breaks with Mediaplayer error (1,-1). ...

Can you lock screen from your app?

Is it possible to lock the screen from an app? ie, just like pressing the power button? ...

Android centering text in lists

Say I have a list of Strings with the elements: "One", "Two", "Three", "Four" I want to center them in the middle of the screen but I want to do it in a way that the start of each word is next to each other. Like this: One Two ...

Image detection inside an image

I usually play a game called Burako. It has some color playing pieces with numbers from 1-13. After a match finishes you have to count your points. For example: 1 == 15 points 2 == 20 points I want to create an app that takes a picture and count the pieces for me. So I need something that recognizes an image inside an image. I was...

Android GUI where different panels are shown/hidden based on context?

I'm making a drawing app. In the centre of the screen, I want the app to contain the user's drawing. At the top of the screen I want buttons for different drawing tools. When a drawing tool is selected, I want buttons specific to that tool to appear at the bottom of the app (e.g. the brush tool might show a "increase brush size" button a...

In the program called Google Maps

Hello, everybody! I have such a demand, need to call in the program Google Maps software, if I use the following method call to map: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:" + restaurant.getLatitude() + "," + restaurant.getLongitude() + "?q=" + s)); startActivity(intent); So that I can successfully call the Goog...

Android configuration screen when installing

I need to display a configuration screen when a user installs my application. Is this possible to implement? That screen should not appear again. ...