android

How to listen for a Webview finishing loading a URL in Android?

I have a webview that is loading a page from the Internet. I want to show a progressbar until the loading is complete. How do I listen for the completion of page loading of a WebView? ...

Alternatives for Pushing data from an Android Service to an Activity

I've a service that is receiving UDP data from the network. I want to push this data from the service to a UI activity. One way to do it is using broadcast Intents. What is the performance overhead of sending broadcasts frequently from the service to the activities? Are there any other alternatives for doing this ? Thanks. ...

Can I launch an Android app from incoming SMS/MMS messages?

I would like to know if I can launch a program via incoming MMS/SMS? More on the MMS side of things. Workflow: MMS sent to Android device self executable MMS Any thoughts? ...

How to receive a event on android checkbox check change?

what would be the correct way of receiving and sending a event when a check box get's enable or disable. In c# i could just easily double click and all the code would be done for me. but in android it appears to be a bit more obscure. i thought of using the touch event handlers but then if the user has a keyboard it wont detect the chang...

How do I make a Button a part of a scrollable ListView?

I have a ListView with a Button below it. When I fill the list with more content than the screen size allows, so that the scroll bar appears, the Button is not part of the scrollable area. That is, the Button disappears. How do I make the Button part of the scrollable area? <RelativeLayout xmlns:android="http://schemas.android.com/ap...

com.android.internal.policy.impl.PhoneLayoutInflater sometimes remaining in memory (hprof dumps)

I'm inspecting memory trying to find eventual memory leaks via hprof dumps. I find that sometimes when I leave an activity via back button (which would finish the activity), the activity would still remain in memory but it would only have two GC root, which don't seem to be very 'strong' though. This is my activity flow / the way I cli...

Pausing a Thread - Activity pause timeout for HistoryRecord

I'm trying to write a game engine in Android, but I don't have much familiarity with threads. My thread has an attribute, mSurfaceHolder, which holds the surface that I'll be drawing to. The run() method for my thread looks like this: public void run() { // We're running now setState(STATE_RUNNING); // Keep looping while t...

Query to sort a field such that strings comes first and then numbers

I've a column in which contains numbers or strings. The type of the column is varchar. Usually when we sort it using the string field, then all the numbers come first and then strings start. But I want all the strings first and then numbers. TIA ! ...

to find a list of connected server in android device?

Programmability i want monitor IP ever connected to my Adnroid device. My initial thought is i can write a background service which will run tcpdump command and forward its output to inputStream. By putting any regular expression i can retrieve list of connected IP to my device. I think that would be bulky to continually run command ...

The type new AdapterView.OnItemClickListener(){} must implement the inherited abstract method AdapterView.OnItemClickListener)

The type new AdapterView.OnItemClickListener(){} must implement the inherited abstract method AdapterView.OnItemClickListener.onItemClick(AdapterView, View, int, long) Why i get this message when i tried to build the tutorial package Fedail.Hello.Layout; import android.app.Activity; import android.os.Bundle; import android.widget.*; i...

Stopping a service once it has finished it's work

I have an Android Service that is started by my application and does some things in a threadPool using Executors.newCachedThreadPool() Once it has finished doing it's work I would like the service to stopSelf(), how can I get the service to determine when it is no longer needed (ie, there are no more Threads executing) so that it can sh...

Html List tag not working in android textview. what can i do?

Html List tag not working in android textview. this is my string content: String str="A dressy take on classic gingham in a soft, textured weave of stripes that resembles twill. Take a closer look at this one.<ul><li>Trim, tailored fit for a bespoke feel</li><li>Medium spread collar, one-button mitered barrel cuffs</li><li>Applied plac...

Keep user state in Android

I am developing an Android app that needs to receive specific informations for each user. I made an authentication using GET and POST methods. Now I have the cookie delivered by the server when the username and password are correct. How do I store this data? I looked for but couldn't find the best way to store a session in Android. ...

How to add rounded corner to a drawable I'm using as a background in Android?

I have a specific drawable that I use as background in my app. It is not a solid color. Now I want to add rounded corners to this drawable. I only found the rounded corner available in a shape with a gradient or a solid color as a background but not another drawable. Is there another easy way of adding rounded corners to a drawable? ...

Android: Listview where each item is a webview

Hello, I have a listview with a custom adapter for each item of the list. If my custom item is some textview everything works fine. But each item has to be some html and hence I need each item to be a webview. The problem is that the webview steals my click and thus I cannot select an item from the list anymore. So this: this.itemAdap...

iPhone/Android swipe detection for mobile browser

Is it possible to detect that the viewport is being dragged by a touch event? Using the following code I am able to get the position of where the finger touched the screen, what node started the event and where it was dragged to. Which solves one of the problems but I would really like to detect when the user has dragged the page/window...

unexpectedly stoped error storing text boxes in to database table dynamically in android

Hi to all, I am new to android application development.I have create registration form with user name,password, email. this values should be stored in sqlite database table. retrieve the data from the table. in login.java i have create the table and insert the values of registration form data in to the table dynamically. In databsehel...

Android encryption

I am working on an android application, and I need to use encryption for one aspect of it. I am really indifferent to which algorithm I use (AES, DES, RSA, etc...). I am aware that Java has a crypto package, but I am not at all familiar with. Can someone post an example on how to do an encrypt/decrypt function? Thanks ...

how to block text messages in android

What should I include in android App, to block text messages. Both incoming and outgoing. ...

ScoreNinja titleText and subboard are not doing anything

I am using ScoreNinja (a high score manager) in my android game, and I want to use the subboard feature mentioned in the documentation. But when I do this: mScoreNinjaAdapter.show(score, "Test Title", "test_board"); It doesn't do anything differently. The title is still "Global High Scores" and it is still showing scores from the mai...