Search Results

Search found 3983 results on 160 pages for 'activity'.

Page 9/160 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to read the Web.Config file in a Custom Activity Designer in a WF4 Workflow Service

    - by Preet Sangha
    I have a WF service with a custom activity and a custom designer (WPF). I want to add a validation that will check for the presence of some value in the web.config file. At runtime I can overload void CacheMetadata(ActivityMetadata metadata) and thus I can do the validation happily there using System.Configuration.ConfigurationManager to read the config file. Since I also want to do this at design time, I was looking for a way to do this in the designer.

    Read the article

  • Unexpected resume of "package name" while already resumed in ''package name" Error in Android

    - by Janusz
    If changing the orientation of my phone or the emulator I get the following output in LogCat: 04-09 11:55:26.290: INFO/WindowManager(52): Setting rotation to 1, animFlags=0 04-09 11:55:26.300: INFO/ActivityManager(52): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/1 nav=3/1 orien=2 layout=18} 04-09 11:55:26.460: INFO/UsageStats(52): Unexpected resume of client while already resumed in client 04-09 11:55:26.579: INFO/SearchPosition(807): Activity is paused 04-09 11:55:26.689: INFO/SearchPosition(807): Activity is resuming SearchPosition is the activity that is displayed. Activity is paused is written in the onPause Method and Activity is resuming in the onResume method of the activity. I googled a little bit for the error message but I don't fully understand the meaning of it. I think it could mean that the old Activity is not properly destroyed after changing the screen orientation. Is this correct? If yes what causes the error? If this is not correct? What is the meaning of this output?

    Read the article

  • Android: Having trouble creating a subclass of application to share data with multiple Activities

    - by Mike
    Hello, I just finished a couple of activities in my game and now I was going to start to wire them both up to use real game data, instead of the test data I was using just to make sure each piece worked. Since multiple Activities will need access to this game data, I started researching the best way to pass this data to my Activities. I know about using putExtra with intents, but my GameData class has quite a bit of data and not just simple key value pairs. Besides quite a few basic data types, it also has large arrays. I didn't really want to try and pass all that, unless I can pass the entire object, instead of just key/data pairs. I read the following post and thought it would be the way to go, but so far, I haven't got it to work. Android: How to declare global variables? I created a simple test app to try this method out, but it keeps crashing and my code seems to look the same as in the post above - except I changed the names. Here is the error I am getting. Can someone help me understand what I am doing wrong? 12-23 00:50:49.762: ERROR/AndroidRuntime(608): Caused by: java.lang.ClassCastException: android.app.Application It crashes on the following statement: GameData newGameData = ((GameData)getApplicationContext()); Here is my code: package mrk.examples.StaticGameData; import android.app.Application; public class GameData extends Application { private int intTest; GameData () { intTest = 0; } public int getIntTest(){ return intTest; } public void setIntTest(int value){ intTest = value; } } // My main activity package mrk.examples.StaticGameData; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; public class StaticGameData extends Activity { int intStaticTest; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); GameData newGameData = ((GameData)getApplicationContext()); newGameData.setIntTest(0); intStaticTest = newGameData.getIntTest(); Log.d("StaticGameData", "Well: IntStaticTest = " + intStaticTest); newGameData.setIntTest(1); Log.d("StaticGameData", "Well: IntStaticTest = " + intStaticTest + " newGameData: " + newGameData.getIntTest()); Intent intentNew = new Intent(this, PassData2Activity.class); startActivity (intentNew); } } // My test Activity to see if it can access the data and its previous state from the last activity package mrk.examples.StaticGameData; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class PassData2Activity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); GameData gamedataPass = ((GameData)getApplicationContext()); Log.d("PassData2Activity", "IntTest = " + gamedataPass.getIntTest()); } } Below is the relevant portion of my manifest: <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".StaticGameData" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".PassData2Activity"></activity> </application> <application android:name=".GameData" android:icon="@drawable/icon" android:label="@string/app_name"> </application> Thanks in advance for helping me understand why this code is crashing. Also, if you think this is just the wrong approach to let multiple activities have access to the same data, please give your suggestion. Please keep in mind that I am talking about quite a few variables and some large arrays.

    Read the article

  • How to display strings in activity 3 from activity 1, 2? [migrated]

    - by user107160
    I need to get strings values from two different activities say activity1 and activity2, each activity should have maximum 4 edittext field..so totally eight fields should be displayed orderly in activity3. I have tried the code which is not displaying in the activity3. Look at code, Activity1 String namef = fname.getText().toString(); Intent first = new Intent(AssessmentActivity.this, Second.class); first.putExtra("list1", namef); startActivity(first); String namel = lname.getText().toString(); Intent second = new Intent(AssessmentActivity.this, Second.class); second.putExtra("list2", namel); startActivity(second); String phone = mob.getText().toString(); Intent third = new Intent(AssessmentActivity.this, Second.class); third.putExtra("list3", phone); startActivity(third); String mailid = email.getText().toString(); Intent fourth = new Intent(AssessmentActivity.this, Second.class); fourth.putExtra("list4", mailid); startActivity(fourth); Activity2 String cont = addr.getText().toString(); Intent fifth = new Intent(Second.this, Third.class); fifth.putExtra("list5", cont); startActivity(fifth); String db = dob.getText().toString(); Intent sixth = new Intent(Second.this, Third.class); sixth.putExtra("list6", db); startActivity(sixth); String nation = citizen.getText().toString(); Intent Seventh = new Intent(Second.this, Third.class); Seventh.putExtra("list7", nation); startActivity(Seventh); String subject = course.getText().toString(); Intent Eight = new Intent(Second.this, Third.class); Eight.putExtra("list8", subject); startActivity(Eight); *Activity3* TextView first = (TextView)findViewById(R.id.textView2); String fieldone = getIntent().getStringExtra("list1" ); first.setText(fieldone); TextView second = (TextView)findViewById(R.id.textView3); String fieldtwo = getIntent().getStringExtra("list2" ); second.setText(fieldtwo); TextView third = (TextView)findViewById(R.id.textView4); String fieldthree = getIntent().getStringExtra("list3" ); third.setText(fieldthree); TextView fourth = (TextView)findViewById(R.id.textView5); String fieldfour = getIntent().getStringExtra("list4" ); fourth.setText(fieldfour); TextView fifth = (TextView)findViewById(R.id.textView6); String fieldfive = getIntent().getStringExtra("list5" ); fifth.setText(fieldfive); TextView sixth = (TextView)findViewById(R.id.textView7); String fieldsix = getIntent().getStringExtra("list6" ); sixth.setText(fieldsix); TextView seventh = (TextView)findViewById(R.id.textView8); String fieldseven = getIntent().getStringExtra("list7" ); seventh.setText(fieldseven); TextView eight = (TextView)findViewById(R.id.textView3); String fieldeight = getIntent().getStringExtra("list8"); eight.setText(fieldeight);

    Read the article

  • Record Screen Activity with CamStudio

    - by Asian Angel
    Sometimes a visual demonstration works much better than a list of instructions. If you need to make a demo video for family and/or friends then you might want to have a look at CamStudio. Using CamStudio To get properly set up you will need to install two different files (the main program followed by the codec). Once that is done you are ready to get started. When you start the program you will see a surprisingly small window. Notice the highlighted Record to text…it serves as a visual indicator for the video type selected for recording. Before you start creating a video it would be a good idea to look through some of the settings. The first one to look at is the region or area that you want to record. Next you will want to look through the video options since these will affect the quality and final size of your video files. The default setting for quality is 70…adjust that to the level that best suits your needs. Note: For our example we maxed out the various video settings for best quality. On our system Microsoft Video 1 was listed as the default compressor but as you can see there were other options available. You can configure the settings for the compressor you want to use if desired. Keep in mind that each compressor will have unique settings of their own, so if you change it, be certain to go back and check. We decided to use the CamStudio Lossless Codec for our example (it gave the best results while trying the software). Going back to the main window you can toggle back and forth between .avi and .swf output using the last button. Once you are satisfied with the settings click on the red record button to start. If you need to pause while recording or stop recording click on the system tray icon and select the appropriate command. When you are finished recording, you will be presented with the save file window. Browse for the desired save location and name your new file. Once you have saved the file the movie player window will automatically open so that you view your new video. Our sample video shown here is at 50% of original size so may look slightly “gritty”. The detail was much better at 100%. If you decide to record and save as .swf the process will be identical to recording in .avi format until the movie player window opens. At that time the conversion process from .avi to .swf will begin. When complete you will have a new flash video and html file that goes with it. Depending on which browser you have set as default, you may run into a small problem when the preview for your new .swf file tries to open. There is a small bug in the generated html file. You can use this work-around or… Just open the .swf file directly in your favorite browser. Conclusion CamStudio may not produce the highest quality videos, but it’s free and does a very nice job nonetheless. If you are working on a tight budget or only need to make an occasional video then CamStudio is a very sensible choice. Links Download CamStudio Stable Version & CamStudio Codec *Download links are approximately half-way down the page. Download CamStudio Stable Version & CamStudio Codec at SourceForge *Beta version also available here. Similar Articles Productive Geek Tips Get the Classic Style Network Activity Indicator Back in Windows 7How To Copy a DVD with VLC 1.0ALLCapture 3.0 [Review]Listen and Record Over 12,000 Online Radio Stations with RadioSureGeek Reviews: Play And Record Internet Radio With Screamer Radio TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 TimeToMeet is a Simple Online Meeting Planning Tool Easily Create More Bookmark Toolbars in Firefox Filevo is a Cool File Hosting & Sharing Site Get a free copy of WinUtilities Pro 2010 World Cup Schedule Boot Snooze – Reboot and then Standby or Hibernate

    Read the article

  • Couldn't get connection factory client - fighting with Google Maps

    - by iie
    another day another problem, I finally managed to set up correctly google maps on my android application, or at least I thought I've done it, the whole progam starts, it even call the class which should "print" a map, but the only thing I can see is a grid with google label on it [ in the corner ]. I've checked the dalvik monitor and the error E/MapActivity(394): Couldn't get connection factory client occurs. I've find out on stackoverflow website that I should sent a gps signal or sth like this from dalvik monitor, and I've done it. Nothing happend, also I got the api key one more time, but nothing changed. here is map.xml <?xml version="1.0" encoding="utf-8"?> <!-- This file is /res/layout/mapview.xml --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/zoomin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="+" android:onClick="myClickHandler" android:padding="12px" /> <Button android:id="@+id/zoomout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="-" android:onClick="myClickHandler" android:padding="12px" /> <Button android:id="@+id/sat" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Satellite" android:onClick="myClickHandler" android:padding="8px" /> <Button android:id="@+id/street" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Street" android:onClick="myClickHandler" android:padding="8px" /> <Button android:id="@+id/traffic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Traffic" android:onClick="myClickHandler" android:padding="8px" /> <Button android:id="@+id/normal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Normal" android:onClick="myClickHandler" android:padding="8px" /> </LinearLayout> <com.google.android.maps.MapView android:id="@+id/mapview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:clickable="true" android:apiKey="0zPcz1VYRSpLusufJ2JoL0ffl2uxDMovgpW319w" /> </LinearLayout> here is a MapMapa.java public class MapMapa extends MapActivity { private MapView mapView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); mapView = (MapView)findViewById(R.id.mapview); } public void myClickHandler(View target) { switch(target.getId()) { case R.id.zoomin: mapView.getController().zoomIn(); break; case R.id.zoomout: mapView.getController().zoomOut(); break; case R.id.sat: mapView.setSatellite(true); break; case R.id.street: mapView.setStreetView(true); break; case R.id.traffic: mapView.setTraffic(true); break; case R.id.normal: mapView.setSatellite(false); mapView.setStreetView(false); mapView.setTraffic(false); break; } } @Override protected boolean isLocationDisplayed() { return false; } @Override protected boolean isRouteDisplayed() { return false; } manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="menu.dot" android:versionCode="1" ndroid:versionName="1.0"> <application android:label="@string/app_name" android:icon="@drawable/icon"> <uses-library android:name="com.google.android.maps" /> <activity android:name="MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".About"> android:label="@string/about_title" android:theme="@android:style/Theme.Dialog" > </activity> <activity android:name=".Exit"> andorid:label="@string/exit_title"> </activity> <activity android:name=".Options"> </activity> <activity android:name=".Start"> </activity> <activity android:name=".Create"> </activity> <activity android:name=".Where"> </activity> <activity android:name=".Proceed"> </activity> <activity android:name=".Finish"> </activity> <activity android:name=".Login"> </activity> <activity android:name=".OK"> </activity> <activity android:name=".UserPanel"> </activity> <activity android:name=".Managero"> </activity> <activity android:name=".Edition"> </activity> <activity android:name=".Done"> </activity> <activity android:name=".Delete"> </activity> <activity android:name=".MapMapa"> </activity> </application> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-sdk android:minSdkVersion="3" /> </manifest>

    Read the article

  • In Android: How to Call Function of Activity from a Service?

    - by nex
    Hi folks, I have an Activity (A) and a Service (S) which gets started by A like this: Intent i = new Intent(); i.putExtra("updateInterval", 10); i.setClassName("com.blah", "com.blah.S"); startService(i); A have a function like this one in A: public void someInfoArrived(Info i){...} Now I want to call A.someInfoArrived(i) from within S. Intent.putExtra has no version where I could pass an Object reference etc ... Please help! PS: The other way around (A polling S for new info) is NOT what I need. I found enough info about how to do that.

    Read the article

  • Why is my searchable activity's Intent.getAction() null?

    - by originalbryan
    I've followed the SearchManager documentation yet am still having trouble making one of my app's activities searchable. From my activity, the SearchDialog appears, I enter a query, hit search, my activity reopens, then I see this in the log: D/SearchDialog( 584): launching Intent { act=android.intent.action.SEARCH flg=0x10000000 cmp=com.clinkybot.geodroid2/.views.Waypoints (has extras) } I/SearchDialog( 584): Starting (as ourselves) #Intent;action=android.intent.action.SEARCH;launchFlags=0x10000000;component=com.clinkybot.geodroid2/.views.Waypoints;S.user_query=sdaf;S.query=sdaf;end I/ActivityManager( 584): Starting activity: Intent { act=android.intent.action.SEARCH flg=0x10000000 cmp=com.clinkybot.geodroid2/.views.Waypoints (has extras) } D/WAYPOINTS( 1018): NI Intent { cmp=com.clinkybot.geodroid2/.views.Waypoints (has extras) } D/WAYPOINTS( 1018): NI null D/WAYPOINTS( 1018): NI false It appears to me that everything is fine up until the last three lines. The "NI" lines are getIntent().toString(), getIntent().getAction(), and getIntent().hasExtra(SearchManager.QUERY) respectively. ActivityManager appears to be starting my activity with the correct action. Then when my activity starts, it contains no action!? What am I doing wrong? The relevant portion of my manifest is: <activity android:name=".views.Waypoints" android:label="Waypoints" android:launchMode="singleTop"> <intent-filter> <action android:name="android.intent.action.SEARCH" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> </activity>

    Read the article

  • OpenSocial create activity from submit click

    - by russp
    Hi I'm "playing with OpsnSocial" and think I get a lot of it (well thanks to Googles' bits) but one question if I may. Creating an activity Lets say I have a form like this (simple) <form> <input type="text" name="" id="testinput" value=""/> <input type="submit" name="" id="" value=""/> </form> And I want to post the value of the text field (and or a message i.e "just posted" to the "users" activity. Do I use a function like this? function createActivity() { if (viewer) { var activity = opensocial.newActivity({ title: viewer.getDisplayName() + ' VALUE FROM FORM '}); opensocial.requestCreateActivity(activity, "HIGH", function() { setTimeout(initAllData,1000); }); } }; If so, how do I pass the text field value to it - is it something like this? var testinput = document.getElementById("testinput"); so the function may look like function createActivity() { if (viewer) { var activity = opensocial.newActivity({ title: viewer.getDisplayName() + testinput }); opensocial.requestCreateActivity(activity, "HIGH", function() { setTimeout(initAllData,1000); }); } }; And how do I trigger the function by using the submit button. In my basic JQuery I would use $('#submitID').submit(function(){ 'bits in here '}); Is at "simple as that i.e. use the createActivity function and it will use the OS framework to "post" to the activity.xml

    Read the article

  • Is it possible to launch an Android Activity from an AlertDialog?

    - by YYY
    I am trying to create a small pop-up in my Android application to let the user choose from one of many items, ala a ListView. I am hoping to make it show up as a translucent box that overlays on the screen, as opposed to completely occupying it like Activities usually do. One technique for doing this that I've heard is possible is to launch an Activity in an AlertDialog box. This would be perfect - it's the ideal size and has a lot of the mechanical properties I'm looking for, but I'm totally unable to find any more specifics of this technique. Is this possible? And if not, what is the preferred way of accomplishing something like this?

    Read the article

  • Can I have an android activity run only on the first time an application is opened?

    - by The Trav
    OK, so I'm playing around with an android app. The 90% use case is that users want to go straight to the primary list screen to find what they're looking for. That's what I want as my default screen. The first time a user loads the app however, some configuration is required before their list screen is of any value to them. So my question, is how I can go about displaying the configuration activity the first time the app is opened up, and then the list screen for future openings. I also want to put a demo button on the configuration screen, so I suppose more than just detecting that it's the first time, I specifically want to detect whether the user has performed certain configurations within the first screen.

    Read the article

  • Can't return data to parent activity

    - by user23
    I'm trying to return data (the position of the item picked from the grid) to parent activity, but my code fails. The debbuger shows how 'data' gets right the key and data in the "data.putExtra("POS_ICON", position)" at child activity, but after in onActivityResult() at parent activity the debbuger shows 'data' with no key nor data returned...it's like if data loses its content. I've followed other posts and tutorials but no way. Please help. Parent activity: public void selIcono(View v){ Intent intent = new Intent (this, SelIconoActivity.class); startActivityForResult(intent,PICK_ICON_REQUEST); } protected void onActivityResult(int requestCode, int resultCode, Intent data) { //here's the problem: no data is returned!! if (requestCode == PICK_ICON_REQUEST) { if (resultCode == RESULT_OK) { // An icon was picked. putIcon(data.getIntExtra("POS_ICON", -1)); } } } Child activity: public class SelIconoActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sel_icono); GridView gridview = (GridView)findViewById(R.id.gr_iconos); gridview.setAdapter(new ImageAdapter (this)); gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { Intent data = new Intent(); data.putExtra("POS_ICON", position); setResult(Activity.RESULT_OK, data); finish(); } }); } }

    Read the article

  • Facebook publishActivity: No error, but no activity published

    - by carlo.capocasa
    Hi, implementing publishActivity in PHP using the REST API using this code: $activity = array( 'message' => '{*actor*} did something.', 'action_link' => array( 'text' => 'Play Travians', 'href' => WEBROOT ) ); $activity = $facebook->api_client->dashboard_publishActivity($activity); I get a 15-digit number returned and no errors, however no activity appears in the logged in account or friends of this account. Help appreciated. Carlo

    Read the article

  • Access workflow ExectionProperties from Activity

    - by rekna
    When I derive an activity from NativeActivity, I can access Workflow executionproperties using the NativeActivityContext like this: context.Properties.Find("propertyname"); Some of my activities derive from Activity, because I they define a coded workflow using the Implementation property. An Activity has an ActivityContext, which does not provide access to the workflow execution properties, it does not have a Properties property. Is there another way to get access to the workflow execution properties from within an Activity

    Read the article

  • How to start an activity Dialog.

    - by PP
    I have one activity which i am using for displaying Dialogs and as a normal layout. So what i want to do is, sometimes i want to start activity as Theme Dialog and some times using setContentView. I can't use <activity android:theme="@android:style/Theme.Dialog"> in manifest file as it will always display activity as dialog. So can we do it programmatic, i have also tried setTheme() method but it did't work. Thanks, PP.

    Read the article

  • How can I access bitmaps created in another activity?

    - by user22241
    I am currently loading my game bitmaps when the user presses 'start' in my animated splash screen activity (the first / launch activity) and the app progresses from my this activity to the main game activity, This is causing choppy animation in the splashscreen while it loads/creates the bitmaps for the new activity. I've been told that I should load all my bitmaps in one go at the very beginning. However, I can't work out how to do this - could anyone please point me in the right direction? I have 2 activities, a splash screen and the main game. Each consist of a class that extends activity and a class that extends SurfaceView (with an inner class for the rendering / logic updating). So, for example at the moment I am creating my bitmaps in the constructor of my SurfaceView class like so: public class OptionsScreen extends SurfaceView implements SurfaceHolder.Callback { //Create variables here public OptionsScreen(Context context) { Create bitmaps here } public void intialise(){ //This method is called from onCreate() of corresponding application context // Create scaled bitmaps here (from bitmaps previously created) }

    Read the article

  • Tagging gone from Nautilus, GAJ, tracker

    - by nathan28
    I had installed Gnome Activity Journal, Zeitgeist and Tracker but borked the install by mixing the PPAs with the universe repos. I removed all the packages, did apt-get remove --purge, then did a locate to manually rm everything else. Then I reinstalled from the PPAs properly. Now I can't tag files anymore, either in Nautilus or GAJ. What packages are involved in tagging? What else might I be missing?

    Read the article

  • Android passing an arraylist back to parent activity

    - by Nicklas O
    Hi there. I've been searching for a simple example of this with no luck. In my android application I have two activities: 1. The main activity which is launched at startup 2. A second activity which is launched by pressing a button on the main activty. When the second activity is finished (by pressing a button) I want it to send back an ArrayList of type MyObject to the main activity and close itself, which the main activity can then do whatever with it. How would I go about achieving this? I have been trying a few things but it is crashing my application when I start the second activity. When the user presses button to launch second activity: Intent i = new Intent(MainActivity.this, secondactivity.class); startActivityForResult(i, 1); The array which is bundled back after pressing a button on the second activity: Intent intent= getIntent(); Bundle b = new Bundle(); b.putParcelableArrayList("myarraylist", mylist); intent.putExtras(b); setResult(RESULT_OK, intent); finish(); And finally a listener on the main activity (although I'm not sure of 100% when this code launches...) protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(resultCode==RESULT_OK && requestCode==1){ Bundle extras = data.getExtras(); final ArrayList<MyObject> mylist = extras.getParcelableArrayList("myarraylist"); Toast.makeText(MainActivity.this, mylist.get(0).getName(), Toast.LENGTH_SHORT).show(); } } Any ideas where I am going wrong? The onActivityResult() seems to be crashing my application. EDIT: This is my class MyObject, its called plan and has a name and an id import android.os.Parcel; import android.os.Parcelable; public class Plan implements Parcelable{ private String name; private String id; public Plan(){ } public Plan(String name, String id){ this.name = name; this.id = id; } public String getName(){ return name; } public void setName(String name){ this.name = name; } public String getId(){ return id; } public void setId(String id){ this.id = id; } public String toString(){ return "Plan ID: " + id + " Plan Name: " + name; } @Override public int describeContents() { // TODO Auto-generated method stub return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(id); dest.writeString(name); } public static final Parcelable.Creator<Plan> CREATOR = new Parcelable.Creator<Plan>() { public Plan createFromParcel(Parcel in) { return new Plan(); } @Override public Plan[] newArray(int size) { // TODO Auto-generated method stub return new Plan[size]; } }; } This is my logcat E/AndroidRuntime( 293): java.lang.RuntimeException: Unable to instantiate activ ity ComponentInfo{com.daniel.android.groupproject/com.me.android.projec t.secondactivity}: java.lang.NullPointerException E/AndroidRuntime( 293): at android.app.ActivityThread.performLaunchActiv ity(ActivityThread.java:2417) E/AndroidRuntime( 293): at android.app.ActivityThread.handleLaunchActivi ty(ActivityThread.java:2512) E/AndroidRuntime( 293): at android.app.ActivityThread.access$2200(Activi tyThread.java:119) E/AndroidRuntime( 293): at android.app.ActivityThread$H.handleMessage(Ac tivityThread.java:1863) E/AndroidRuntime( 293): at android.os.Handler.dispatchMessage(Handler.ja va:99) E/AndroidRuntime( 293): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 293): at android.app.ActivityThread.main(ActivityThrea d.java:4363) E/AndroidRuntime( 293): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 293): at java.lang.reflect.Method.invoke(Method.java:5 21) E/AndroidRuntime( 293): at com.android.internal.os.ZygoteInit$MethodAndA rgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 293): at com.android.internal.os.ZygoteInit.main(Zygot eInit.java:618) E/AndroidRuntime( 293): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 293): Caused by: java.lang.NullPointerException E/AndroidRuntime( 293): at com.daniel.android.groupproject.login.<init>( login.java:51) E/AndroidRuntime( 293): at java.lang.Class.newInstanceImpl(Native Method ) E/AndroidRuntime( 293): at java.lang.Class.newInstance(Class.java:1479) E/AndroidRuntime( 293): at android.app.Instrumentation.newActivity(Instr umentation.java:1021) E/AndroidRuntime( 293): at android.app.ActivityThread.performLaunchActiv ity(ActivityThread.java:2409) E/AndroidRuntime( 293): ... 11 more

    Read the article

  • Visual indication of network activity

    - by at.
    is there a simple application which can sit on top of a fullscreen game to give me an indicator of when there is a lot of network activity? I can only seem to find system tray apps or programs which work outside of fullscreen games. Preferably something transparent so i can see through it. A little background info: I used to have my PC sitting sideways on my desk so I can see lights from the network card. The lights stopped working a while ago and all I need is a little blinking application to tell me when there is activity. I do not need a detailed graph or bandwidth usage, just activity notification. I've looked everywhere for something, maybe you guys are better at searching than me.

    Read the article

  • How do I pass argument from an activity to another in Workflow 4

    - by Jimmy Engtröm
    Hi I have created an Activity (CodeActivity) that retrieves the temperature where I live. I wan't to add that activity to a workflow and connect it to an if statement/activity that can based on my temperature outargument do different things. But I can't seem to find how to access the outargument from my temperature-activity. This is my first Windows Workflow 4 project so perhaps I'm attacking this in the wrong way. I have: public OutArgument Degrees { get; set; } But how do I access it? I have found tutorials how to get the data when running the activity (only one) but not as part of a workflow. Hope my question makes sence. /Jimmy

    Read the article

  • how to open Gmail View Message Activity?

    - by NickLai
    I want to write an application to List the Gmail message. In the list, if user click one of the message item, it shall link ot Gmail App to see more detial information. Currently I can read the Gmail db with Gmail.java. There are some problems while I want to open Gmail Activity. In general, we can open Activity with Action and parameters. But Gmail App has not release code base. We do not know what Action set to Gmail Activity and what parmeter shall we put the extras. I only know that the Activity of View detial Message is named "HtmlConversationActivity." And the Package is under "com.google.android.gm." please tell me how to open the View detial Message Activity in Gmail APP. thanks a lot.

    Read the article

  • Why activity result code is diffrent then I expected

    - by Fisher
    I have 2 activities. In child activity i have put something like that in onPause(): if (isFinishing()) { final Intent intent = new Intent(); intent.putExtra(SOME_DATA, value); setResult(RESULT_OK, intent); Log.i("test", "Result set to RESULT_OK"); } In parent activity i check resultCode when child activity is destroyed, and this is what i have noticed: If i destroy child activity by some action (in some condition i invoke finish()), then resultCode is RESULT_OK But when i destroy by pressing return key (i works only in emulator so its ESC) who kills activity, then resultCode read in parent onActivityResult method equals 0 (RESULT_CANCELD). "test" log read in each case is the same.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >