Search an Array Android
I have a textbox and search button, now all I need is the code to implement searching an array. The array I have is called Facts_Array (consists of strings). Comment if you need any more information. ...
I have a textbox and search button, now all I need is the code to implement searching an array. The array I have is called Facts_Array (consists of strings). Comment if you need any more information. ...
I trying to create a "publish" button for an image in my android app, that works with the Facebook App and Email. This is my code (imagePath is something like "/sdcard/myapp/image.jpg" Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("image/jpeg"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+image...
Hey guys, I am actually looking for some opinion on how to get this done. I have a php server with a mysql backend to authenticate users using android os. I came across the debate of having JSON vs XML to minimize the overhead and using REST vs SOAP. Can I get some tips on what is the best path to go about getting this done ? I know its...
I have an error stating something like: The method foo() is undefined for the type bar(){} Eclipse tells me that after entering this code: ((application_variables) this.getApplication()).setSomeVariable("foo"); I'm not sure if this is the problem, but I have it located under.... public void onItemClick(AdapterView<?> parent, Vi...
I have a listview that is the main part of my activity. When there are no objects in the listview, I want to replace it with a helpful message (a TextView). I simply call setContentView again if the list is unpopulated in onResume. However, this only works for the TextView. If I call setContentView(R.layout.mylayout), then I get a blank...
Can I modify android.R.layout.simple_list_item_1? For eg., I want to change the text color of the textview inside the listview dynamically. For this, I need to get to the textview and change its color.. How can I do that? ...
package com.commonsware.android.threads; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.View; import android.view.View.OnClickListener; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; public class HandlerDem...
How can I get currently playing track info at app startup? http://blog.dexetra.com/2010/09/get-current-playing-track-info-from.html has nice and working example on how to get info when android media player does some action (track is changed, finished, started etc). But when I launch my app I need to get currently (in the background) pla...
Hello guys I am a newbie to android development. I am trying to create a List which has a spinner, a edit text and a check box. The data for spinner and check box come from data base. I have the following files. NewTransac class which extends ListActivity private PayDbAdapter mDbHelper; private Spinner paySpinner; private CheckBox mC...
Hello. I'm developing an Android application. I have the following interface: public interface IDBAdapter { public enum Table { ... } public int insertItem(Table table, Object item); public boolean removeItem(Table table, long rowIndex); public Cursor getAllItemsCursor(Table table); public Cursor setCu...
For my site I need to be able to tell the difference between when an Android tablet visits and when an Android phone visits. It needs to be detected before the page is sent to the user so using JavaScript to check the screen res isn't an option. At the moment I use this to detect an android device: stripos($ua, 'android') Is there an...
Hello, Following the Android SDK tutorials I have implemented my first basic date picker dialog. It works fine but is there any way to change the format of the date shown? Example: The date picker dialog displays the date as "17 Oct 2010". I would it like to be displayed as "17 10 2010". Greetings, Robert ...
I have setup a tabwidget, and in one panel there is a button to trigger a new activity, I want to display the sub-activities just in the tab widget, but not to open a new window. How can I do that ...
I'm somewhat new to android programming and writing a game, with most of the game displayed in a SurfaceView, but when a user performs certain actions in the SurfaceView, I'd like to be able to slide up another view from the bottom to give the user some options, without completely covering the SurfaceView and still allowing the user to i...
how i can show a set of images as slide show in android? ...
We uses a Bulk SMS provider for SMS alerts to optimize our logistics. There are alot of issues with bulk SMS providers and Government regulations. To over come this issue we are planning to use an Android phone to act as an SMS gateway. We want to build an application on the phone which checks a a URL on our site for SMS to be sent, onc...
I'm trying to deserialize an object but it doesn't work. Has anyone an idea how to handle it? public static List<Leistung> findAll(Context ctx) { List<Leistung> result = null; FileInputStream in = null; Object obj = null; File f = ctx.getFileStreamPath("file.obj"); if (f.exists()) { try { in = c...
I am implementing the new BackupAgentHelper from android 2.2. For it to work you need to supply the name of the SharedPreferences that you want to backup: public class MyPrefsBackupAgent extends BackupAgentHelper { // The name of the SharedPreferences file static final String PREFS = "user_preferences"; // A key to uniquely identify t...
how do I remove focus from options menu item? I.e. when I open the menu for the first time, none of the items has focus. however, if I focus on one of them using track ball, and then close and re-open the menu the focus is still there. How do I get rid of it? I am clearing and recreating the menu in onPrepareOptionsMenu (as I have to ad...
(Android) Some days ago I saw a way to register a broadcast receiver to understand when the screen goes black or the inverse. Now i'd like to find a way to understand when the users is speaking at the phone but i don't find a broadcast for this case, so how can i understand if the user is at the phone? (Possibly without always running a...