I am using listview to display data, inside listview i am using image in every listeitem.
following method is called from wrapper class
public View getView(int position, View convertView,
ViewGroup parent) { /*implementation*/ }
I am following this tutorial http://developer.android.com/guide/samples/ApiDemos/src/com/example/andr...
I have an activity handling search (ACTIVITY_1), which works perfectly when I use the search (via SEARCH button on the phone) within/from this activity.
However, when I use search from another activity (ACTIVITY_2..x) by implementing onNewIntent and forward the query string to my Search_Activity.class (ACTIVITY_1)
@Override
protected v...
my app have a spinner and also have reset button. how to update the values while clicking on button?
...
I'm looking at developing an app that could benefit from having a image recognition system. I've seen this sort of thing in iPhone and Android apps. Take a picture of a book and the app takes you to Amazon where you can find that book. I'm not looking for general image recognition, but more the ability to pick a single image out of a lib...
int minMagIndex = prefs.getInt(Preferences.PREF_MIN_MAG, 0);
if (minMagIndex < 0)
minMagIndex = 0;
int freqIndex = prefs.getInt(Preferences.PREF_UPDATE_FREQ, 0);
if (freqIndex < 0)
freqIndex = 0;
What is the second parameter in prefs.getInt ?
why is this if condition check done ?
...
Hi,
I get the following error
12-15 16:54:37.125: ERROR/MediaPlayer(6032): error (-2147483648, 0)
when trying to execute this code in a service:
MediaPlayer mp = null;
@Override
public void onCreate() {
if (mp == null) {
mp = new MediaPlayer();
}
}
@Override
public void onStart(Intent intent, int startId) {
if (!mp.isPlayi...
I need to be able to handle/catch Intents while my Activity is closed. So I am looking at either a Service or a BroadcastReceiver.
Is it possible to "receive" intents to a service itself? I tried to search, but could not find anything helpful.
With a BroadcastReceiver, I am not exactly sure how that works outside of an Activity. D...
Hi,
In my application, I have created a ContentProvider.
Is there a way for me to instantiate this ContentProvider when my apk is started?
RIght now, the ContentProvider only instantiates when someone does a query.
Thank you.
...
So now I have my BroastcastReceiver declared in the manifest file...
<receiver android:name=".MyReceiver">
<intent-filter>
<action android:name="android.intent.action.CALL_BUTTON" />
</intent-filter>
</receiver>
I want to catch the intent when the Call button is pressed.
Here is my code...
public class MyReceiver...
In my app I try to capture a fling event on a view (a ScrollView to be exact, but tried with LinearLayout as well). By setting breakpoints I can see the that the MotionEvents happen correctly up to the point where the onFling() should fire. The event flow is as follows:
The view's onTouchEvent
The OnGestureListener's onDown
The OnGestu...
We are trying to use the native camera app to let the user take a new picture. It works just fine if we leave out the EXTRA_OUTPUT extra and returns the small Bitmap image. However, if we putExtra(EXTRA_OUTPUT,...) on the intent before starting it, everything works until you try to hit the "Ok" button in the camera app. The "Ok" button j...
Hi,
Im using ksoap2 to call web .net services. The call works just fine except when I pass paramaters. The passed paramaters are always recieved as null values by the web service. I dont know what the problem is, I hope someone can help.
Thanks,
...
Hi,
I have an NoContentViewActivity which has no Content View (i.e. I did not call setContentView() in the onCreate of my Activity).
My question is how can I keep the content view of the launching activity on the screen? Right now, I am getting a blank screen whenever I launch NoContentViewActivity? I want the content view of the launch...
Hi stackoverflow'ers,
Quick questions here:
What are the necessary tools/APIs to post something from Android to Facebook?
I looked at this URL
http://wiki.developers.facebook.com/index.php/User%3AAndroid
and it mentioned a few suggestions.
Have anyone tried fbrocket?
What is Facebook Connect anyway?
Thanks!
Nicholas
...
Does Android keep the connection between the server/socket when it moves from EDGE to WIFI and vice versa?
...
I want to display search result on the screen, i have implemented in such a way that.
From the search form user fill the 'search field' and 'search location' i set values into bean and that bean is static so that i can access it from every where.
Then i start search result screen intent using
Intent mainIntent = new Intent(SearchVenu...
So I'm working out my first multi-threaded application using Android with the AsyncTask class. I'm trying to use it to fire off a Geocoder in a second thread, then update the UI with onPostExecute, but I keep running into an issue with the proper Context.
I kind of hobbled my way through using Contexts on the main thread, but I'm not ex...
I have a database containing a userId and a note. The user doesn't know if there already is a note in the DB so they write one and click the 'Submit' button. I want to insert this note if there is no note for the userId or update that userId's already existing note:
notesDb.open();
boolean updateResult = notesDb.upda...
I am using following code to start activity when user pressing search button on the handset
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_SEARCH){
Util.startActivity(ReviewsDetail.this, KeywordSearch.class);
return false;
}else{
return super.onKeyUp(keyCode, event);
}
}
But he...
In android, I create my menu item like this?
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, 0, 0, "Menu1");
menu.add(0, 1, 0, "Menu2");
return true;
}
How can I set all the menu item disabled programmically (in another part of the code in my activity, not in onCreateOptionsMenu() method itself)?
...