mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Update hello_services for an engine API change (#4919)
This commit is contained in:
parent
c14208dc6e
commit
e0174c9dad
@ -16,7 +16,6 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.chromium.base.PathUtils;
|
||||
import org.domokit.activity.ActivityImpl;
|
||||
import io.flutter.view.FlutterMain;
|
||||
import io.flutter.view.FlutterView;
|
||||
@ -38,8 +37,7 @@ public class ExampleActivity extends Activity {
|
||||
setContentView(R.layout.hello_services_layout);
|
||||
|
||||
flutterView = (FlutterView) findViewById(R.id.flutter_view);
|
||||
File appBundle = new File(PathUtils.getDataDirectory(this), FlutterMain.APP_BUNDLE);
|
||||
flutterView.runFromBundle(appBundle.getPath(), null);
|
||||
flutterView.runFromBundle(FlutterMain.findAppBundlePath(getApplicationContext()), null);
|
||||
|
||||
flutterView.addOnMessageListener("getLocation",
|
||||
new FlutterView.OnMessageListener() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user