Commit ee5a80a6 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Remove obsolete references to "flutter refresh" in hello_services (#7093)

Fixes https://github.com/flutter/flutter/issues/6947
parent e05dcc9c
......@@ -67,23 +67,3 @@ To build directly with `gradle`, use the following commands:
To build with Android Studio, open the `android` folder in Android Studio and
build the project as usual.
### Updating the Dart code
You can push new Dart code to a Flutter app during development without performing
a full rebuild of the Android app package.
The `flutter refresh` tool manages this process. `flutter refresh` will build
a snapshot of an app's Dart code, copy it to an Android device, and send an
intent instructing the Android app to load the snapshot.
To try this out:
* Install and run the app on your device
* Edit the Dart code
* `flutter refresh --activity com.example.flutter/.ExampleActivity`
`flutter refresh` sends an `ACTION_RUN` intent with an extra containing the
device filesystem path where the snapshot was copied. `ExampleActivity.java`
shows how an activity can handle this intent and load the new snapshot into
a FlutterView.
......@@ -76,20 +76,6 @@ public class ExampleActivity extends Activity {
flutterView.onPostResume();
}
@Override
protected void onNewIntent(Intent intent) {
// Reload the Flutter Dart code when the activity receives an intent
// from the "flutter refresh" command.
// This feature should only be enabled during development. Use the
// debuggable flag as an indicator that we are in development mode.
if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
if (Intent.ACTION_RUN.equals(intent.getAction())) {
flutterView.runFromBundle(intent.getDataString(),
intent.getStringExtra("snapshot"));
}
}
}
private void sendGetRandom() {
JSONObject message = new JSONObject();
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment