[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Android App Development for Beginners – 36 – Sending Extra Intent Data
by
Tags:
Comments
41 responses to “Android App Development for Beginners – 36 – Sending Extra Intent Data”
-
Can you send an object using intents? By object I mean getting multiple values from the user and adding them to the object.
-
Hello everyone, I have a question: in 8:29 it is declared Bundle applesData = getIntent().getExtras();
and then this data is converted into a new string:
String appleMessage= applesData().getString("appleMessage");And my question: Is it wrong or can I convert the data into a string without using the Bundle class. For example:
String appleMessage = getIntent().getExtras().getString("appleMessage")?PS Amazing videos! Thank you so much!
-
how to solve Error:(22, 71) error: cannot find symbol variable MainActivityInput
-
Hello there.can anyone help please?When i add the code line baconText.setText(appleMessage);
the textview in bacon activity vanishes and nothing appears there.
What could be the possible error?
the code is exactly same as Bucky's.and my android studio version is 2.3.2 -
i luv this dude
-
you are truly good
just what i need
not like those "tu du" indian crap -
Excellent Job..
-
What is the significance of View view….??
-
Dude you are always making us hungry with all that bacon talk! Awesome tutorials.
-
Incase you will use intent with sqlite:
//
——Activity1———//
String fullNameCursor = cursor.getString(cursor.getColumnIndex(CrudContract.CrudEntry.COLUMN_FULLNAME));
Intent intent = new Intent(FetchActivity.this, MainActivity.class);
intent.putExtra("fullnameIntent", fullNameCursor);
startActivity(intent);//
——-Activity2———//
Intent intent = getIntent();
String fullnameGet = intent.getStringExtra("fullnameIntent");
fullname.setText(fullnameGet); -
Anybody facing the " App has unfortunately stopped" error, try the below try and catch statement:
public void onClick(View view){
try {
i = new Intent(this, Apples.class);
startActivity(i);
} catch (Exception e) {
e.printStackTrace();
}
Log.d(TAG, "IntErr");}
** Just a note here that I'm trying to go from my Avocado class to my Apple class. So you can change the above code according to your classes.
-
ok if im getting this right using the onclick method you dont need to add the onclick listener , if this is correct why you didnt say that from tutorial one and we kept typing it? any reply is more than welcomed
-
the EditText object need not have a name same as the id in the layout xml file.
-
Already have second activity added also have the parameters added still gives me app has stopped error.
-
What if we want to switch with a smooth effect like we did before button place and size example.
Transactionmanager.begindelayedtransaction does not work with this one. How to ? ^^ -
bucky is awesome
-
Believe me you are AWESOME BUCKY !
-
This is only for sending string along.. But what about sending image.
What code is needed to send image along…Can anyone help. -
What i wanna know is, how to pass String-Array, i'm having a really huge trouble with it.
-
Gongrats man,great tutorials.I would like to ask if withi this technique i also can change a TextField or an image of another Activity when i click a button,i v been trying to do this for days but with no result,any suggestions will help,thanks again
-
I have problem with this line of code in apples.java class
final EditText applesInput = (EditText) findViewById(R.id.applesInput);
// compiler says that: Unexpected cast to EditText: layout tag was TextView But if I use TextView instead of EditText , I can Not write any thing into plain text , so I have to use EditText!!Plzzzzz help me!!. -
can any one help me with this
-
08-22 09:11:00.164 22559-22559/bhantana.intenthandler E/AndroidRuntime: FATAL EXCEPTION: main
Process: bhantana.intenthandler, PID: 22559
Theme: themes:{default=overlay:com.blissroms.moelle.ddoverhauled, iconPack:com.blissroms.moelle.ddoverhauled, fontPkg:com.blissroms.moelle.ddoverhauled, com.android.systemui=overlay:com.blissroms.moelle.ddoverhauled, com.android.systemui.navbar=overlay:com.blissroms.moelle.ddoverhauled}
java.lang.IllegalStateException: Could not find method onClick(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'appleButton'
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:327)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21158)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5471)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) -
Getting following error when launching app after 2:13 minutes of this video
Could not identify launch activity: Default Activity not found
Error while Launching activity -
For those whose app crashes when they want to change the activity, even if they included "Viev view" in the onClick method:
For me AS 2.1.2 does not declare the created Java classes in AndroidManifest, you have to do it manually. So open up AndroidManifest.xml, and type in <activity android:name=".SecondActivity"></activity> inside the <application> tag (of course change the name of the activity to what you have). This worked for me. -
Bundle applesData = getIntent().getExtras();
if(applesData==null);
return;
}
String appleMessage = applesData.getString("appleMessage");
//Error here ^
Getting an error saying "Cannot resolve symbol applesData to a type"
Anyone else have this problem or know why it saying this? -
hello guys, can anyone tell me the differences between create a clickListener at .java and android:onClick="onClick" at .xml?
because from my understanding, both of these are doing the same job. -
for all those facing the problem of "app_name. has unfortunately stopped" add View view to the parameteres of the onClick activity it worked for me example : public void a(View view) {
Intent i;
i = new Intent(this,bacon.class);
startActivity(i); -
:(? " i did the same thing .. but when i click on "go to bacon" it shows message"unfortunately application has stopped
-
I have a problem. When I type this in my mainactivity.java the program marks it red and says: Cannot resolve symbol 'view'…
public void onClick(View view){
Intent i = new Intent(this, bacon.class);
startActivity(i);
}
Please can someone help me. I also tried to replace view with only v and the same error again… -
It is funnier to do it both ways. That when you send to Bacon you can see what the person wrote and write back without changing the Title from Bacon as Bucky did. Then send it back to Apple where you can see what u wrote in Bacon in Apple without changing the title and send back to bacon. Then u can send back and forward
-
When switching there seems to be a new Activity created every time. The memory usage always rises when you switch. Is there a way to only create an Activity once and then change between them?
-
Amazing!!
-
Getting into the fun stuff 😀 woot woot!
-
The app crashes when run and shows the message "app_name.unfortunately stopped"
Any help would be appreciated.
-
This video was really intents !
-
Fantastic Video Bucky! you really explained things very well, and I learned a lot! thank you from Ireland
-
Thanks a lot Bucky, you are a fucking legend.!
-
cant you just double tap on a button to write the code for it to take you to the next page?
Leave a Reply