-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
12 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 2 additions & 31 deletions
33
...id/app/src/main/java/com/jfixby/scarabei/flutter/scarabeiflutterexample/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,10 @@ | ||
package com.jfixby.scarabei.flutter.scarabeiflutterexample; | ||
|
||
import android.os.Bundle; | ||
import com.jfixby.scarabei.red.android.ScarabeiAndroidDeployer; | ||
import com.jfixby.scarabei.red.flutter.ScarabeiFlutterAndroid; | ||
import io.flutter.app.FlutterActivity; | ||
import io.flutter.plugin.common.MethodChannel; | ||
import io.flutter.plugin.common.PluginRegistry; | ||
import com.jfixby.scarabei.red.flutter.test.ExampleActivity; | ||
|
||
public class MainActivity extends FlutterActivity { | ||
|
||
final ScarabeiAndroidDeployer deployer = new ScarabeiAndroidDeployer(); | ||
public class MainActivity extends ExampleActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
|
||
// GeneratedPluginRegistrant.registerWith(this); | ||
|
||
deployer.tryToDeploy(this); | ||
|
||
ScarabeiFlutterAndroid plugin = new ScarabeiFlutterAndroid(); | ||
registerPlugin(plugin); | ||
} | ||
|
||
private void registerPlugin(MethodChannel.MethodCallHandler plugin) { | ||
String channelName = plugin.getClass().getCanonicalName(); | ||
registerPlugin(plugin, channelName); | ||
} | ||
|
||
private void registerPlugin(MethodChannel.MethodCallHandler plugin, String channelName) { | ||
PluginRegistry registry = this; | ||
String className = plugin.getClass().getCanonicalName(); | ||
Registrar registrar = registry.registrarFor(className); | ||
final MethodChannel channel = new MethodChannel(registrar.messenger(), channelName); | ||
channel.setMethodCallHandler(plugin); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters