i want to implement following things in my project.
from activity A i want to start activity B for result.
activity A has a listview(say mylistview) and an adapter set for it.
i am stuck while developing my program.
i am not able to find the solution
what i am doing is, from one activity (A) i am calling other activity (B) for result.
now in activity A i have a list view.
for that listview i have an ArrayAdapter
the code for that purpose is :
String []name_list = myarraylist.toArray(new String[myarraylist.size()]);
ArrayAdapter<String> adapter = new ArrayAdapt
I am currently attempting to pass a string across activities. The string is used to set an image in the second activity. So the user is clicking a button in the first activity and then the appropriate image is loaded in the second activity based upon what was selected.
I am working on development of monitoring application for android phones which always run in background and automatically responds to SMS strings without interaction of user
I successfully got battery level and GPS coordinates in activity but cant pass these values from activity to broadcastreceiver which then auto send these values as reply to SMS strings.
Here is a code for passing value from a
I fetched data in JSON from web service and then i put data into a custom ListView.
On clicking an item of ListView , I open a new Activity.
I'm developing a simple app for displaying Author names of the blog and their respective description. I developed code to display names of the authors using the ListView on first activity. When setOnItemClickListener function is performed on the item of the list, it takes you to the second activity and displays the description of the author.
I'm trying to pass a Parceble Extra to another activity using this example, but when I try get it on my second activity NullPointerExeception shows up, could somebody help me?
My Parcelable class:
public class MetaDados implements Parcelable {
private int codigoInstituicao;
// . .
In my main activity I want to override the onResume method so it acts differently, depending on the activity, which was opened before.
For example: if the user creates a new Item for the listView (in the addNewItem activity), I need to reload the database to display the newItem.
I am going crazy trying to figure out how to store a variable someplace so when I switch to another activity then back again the variable still contains this value. I did this a while ago using shared preferences, but this was a bad solution, this was way more permanent than I needed and just not the correct way.