File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
example/android/app/src/main/java/com/example/flutter_serial_port_example Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11package com .example .flutter_serial_port_example ;
22
33import android .os .Bundle ;
4+ import android .os .Build ;
5+ import android .util .Log ;
6+
47import io .flutter .app .FlutterActivity ;
58import io .flutter .plugins .GeneratedPluginRegistrant ;
69
710public class MainActivity extends FlutterActivity {
811 @ Override
912 protected void onCreate (Bundle savedInstanceState ) {
13+
14+ Log .d ("MainActivity" , "VERSION.SDK_INT: " + Build .VERSION .SDK_INT );
15+ if (Build .VERSION .SDK_INT <= Build .VERSION_CODES .KITKAT_WATCH ) {
16+ // use software rendering (ideally only when you need to)
17+ getIntent ().putExtra ("enable-software-rendering" , true );
18+ }
19+
1020 super .onCreate (savedInstanceState );
1121 GeneratedPluginRegistrant .registerWith (this );
1222 }
You can’t perform that action at this time.
0 commit comments