io.flutter.plugins.GeneratedPluginRegistrant Java Examples
The following examples show how to use
io.flutter.plugins.GeneratedPluginRegistrant.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java From flutter-nfc-app with MIT License | 6 votes |
@TargetApi(Build.VERSION_CODES.KITKAT) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); Log.i("", "onCreate"); mAdapter = NfcAdapter.getDefaultAdapter(this); if (mAdapter == null) { Log.i("", "mAdapter null"); } mPendingIntent = PendingIntent.getActivity( this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); mFilters = new IntentFilter[]{new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED)}; mTechLists = new String[][]{new String[]{IsoDep.class.getName()}}; new MethodChannel(getFlutterView(), CHANNEL).setMethodCallHandler( new MethodChannel.MethodCallHandler() { @Override public void onMethodCall(MethodCall call, MethodChannel.Result result) { if (call.method.equals("getPlatformVersion")) { result.success("Android ${android.os.Build.VERSION.RELEASE}"); } else if (call.method.equals("getCardUID")) { result.success(getCardUID()); } else if (call.method.equals("getVersion")) { String commands = call.argument("commands"); result.success(getVersion(commands)); } else { result.notImplemented(); } } }); }
Example #2
Source File: EmbeddingV1Activity.java From flutter_barcode_scanner with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(new FlutterEngine(this)); }
Example #3
Source File: Flutter.java From o2oa with GNU Affero General Public License v3.0 | 5 votes |
/** * Creates a {@link FlutterView} linked to the specified {@link Activity} and {@link Lifecycle}. * The optional initial route string will be made available to the Dart code (via * {@code window.defaultRouteName}) and may be used to determine which widget should be displayed * in the view. The default initialRoute is "/". * * @param activity an {@link Activity} * @param lifecycle a {@link Lifecycle} * @param initialRoute an initial route {@link String}, or null * @return a {@link FlutterView} */ @NonNull public static FlutterView createView(@NonNull final Activity activity, @NonNull final Lifecycle lifecycle, final String initialRoute) { FlutterMain.startInitialization(activity.getApplicationContext()); FlutterMain.ensureInitializationComplete(activity.getApplicationContext(), null); final FlutterNativeView nativeView = new FlutterNativeView(activity); final FlutterView flutterView = new FlutterView(activity, null, nativeView) { private final BasicMessageChannel<String> lifecycleMessages = new BasicMessageChannel<>(this, "flutter/lifecycle", StringCodec.INSTANCE); @Override public void onFirstFrame() { super.onFirstFrame(); setAlpha(1.0f); } @Override public void onPostResume() { // Overriding default behavior to avoid dictating system UI via PlatformPlugin. lifecycleMessages.send("AppLifecycleState.resumed"); } }; if (initialRoute != null) { flutterView.setInitialRoute(initialRoute); } lifecycle.addObserver(new LifecycleObserver() { @OnLifecycleEvent(Lifecycle.Event.ON_CREATE) public void onCreate() { final FlutterRunArguments arguments = new FlutterRunArguments(); arguments.bundlePath = FlutterMain.findAppBundlePath(activity.getApplicationContext()); arguments.entrypoint = "main"; flutterView.runFromBundle(arguments); GeneratedPluginRegistrant.registerWith(flutterView.getPluginRegistry()); } @OnLifecycleEvent(Lifecycle.Event.ON_START) public void onStart() { flutterView.onStart(); } @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) public void onResume() { flutterView.onPostResume(); } @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) public void onPause() { flutterView.onPause(); } @OnLifecycleEvent(Lifecycle.Event.ON_STOP) public void onStop() { flutterView.onStop(); } @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY) public void onDestroy() { flutterView.destroy(); } }); flutterView.setAlpha(0.0f); return flutterView; }
Example #4
Source File: MainActivity.java From streams_channel with Apache License 2.0 | 5 votes |
@Override public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { GeneratedPluginRegistrant.registerWith(flutterEngine); // Manually register PluginExample flutterEngine.getPlugins().add(new PluginExample()); }
Example #5
Source File: MainActivity.java From Flute-Music-Player with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #6
Source File: MainActivity.java From flutter_crashlytics with BSD 2-Clause "Simplified" License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #7
Source File: MainActivity.java From flutter-plugins with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #8
Source File: MainActivity.java From flutter_downloader with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { GeneratedPluginRegistrant.registerWith(flutterEngine); }
Example #9
Source File: MainActivity.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #10
Source File: MainActivity.java From flutter_audio with MIT License | 4 votes |
@Override public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { GeneratedPluginRegistrant.registerWith(flutterEngine); }
Example #11
Source File: MainActivity.java From flutter_qrcode_reader with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #12
Source File: MainActivity.java From background_location_updates with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #13
Source File: MainActivity.java From image_jpeg with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #14
Source File: MainActivity.java From pspdfkit-flutter with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #15
Source File: MainActivity.java From android_job_scheduler with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #16
Source File: MainApplication.java From android_job_scheduler with Apache License 2.0 | 4 votes |
@Override public void registerWith(PluginRegistry pluginRegistry) { GeneratedPluginRegistrant.registerWith(pluginRegistry); }
Example #17
Source File: MainActivity.java From open_file with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #18
Source File: MainActivity.java From flutter_tflite with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #19
Source File: MainActivity.java From flutter-plugins with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #20
Source File: MainActivity.java From play_games with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #21
Source File: MainActivity.java From fast_qr_reader_view with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #22
Source File: MainActivity.java From Flutter_Thumbnails with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #23
Source File: MainActivity.java From FlutterPalette with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #24
Source File: MainActivity.java From flutter_plugin_device_apps with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #25
Source File: MainActivity.java From WiFiFlutter with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #26
Source File: MainActivity.java From ota_update with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #27
Source File: MainActivity.java From FlutterMulti-ImagePicker with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #28
Source File: MainActivity.java From wifi with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #29
Source File: MainActivity.java From flutter-incall-manager with ISC License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }
Example #30
Source File: MainActivity.java From flutter_umeng_analytics with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); }