OK firstly I want to point out I see what is happening and for the most part how it works (am just confused by the field declaration = "m圜lassPath" why?). puts string message inside the string EXTRA_MESSAGE - why? String message = editText.getText().toString() To get this to work, I need to send the full text along with the notification. Intent intent = new Intent(this,DisplayMessageActivity.class) ĮditText editText = (EditText) findViewById(R.id.edit_message) I’m working on a very small Android notifications app where I a) display a notification using a background service, b) the user taps the notification, which c) takes them to a view that shows the full text of the notification. this method is activated by a button being pressed Public static final String EXTRA_MESSAGE = "" Class field //key holds string? not fully understanding this. While starting another use putExtra method of the intent. I am making my first Android app following the instructions from the developers guide (I am already at a moderate level with Java) and I am using some code that looks like this: Why an earth would you want to ever use intent.putExtra method to share information between classes in Android? Ti Activity mc tiêu, thông qua phng thc startActivity. Ví d thông qua phng thc startActivity (), bn có th nh ngha mt Intent s dng gi chy mt Activity khác. This is a real noob question I'm sure, but I am finding it quite perplexing. Mã ca bn có th gi Intent vào h thng Android vi ch nh thành phn mc tiêu gi n.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |