Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
flutter_boost_1.22.4
Commits
388d0a3c
Commit
388d0a3c
authored
Apr 30, 2019
by
Yacumima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixs
parent
60679765
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
android/src/main/java/com/taobao/idlefish/flutterboost/FlutterBoostPlugin.java
.../com/taobao/idlefish/flutterboost/FlutterBoostPlugin.java
+15
-0
example/android/app/src/main/java/com/taobao/idlefish/flutterboostexample/MyApplication.java
...om/taobao/idlefish/flutterboostexample/MyApplication.java
+5
-1
No files found.
android/src/main/java/com/taobao/idlefish/flutterboost/FlutterBoostPlugin.java
View file @
388d0a3c
...
@@ -28,6 +28,7 @@ import android.app.Application;
...
@@ -28,6 +28,7 @@ import android.app.Application;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
...
@@ -49,6 +50,7 @@ import fleamarket.taobao.com.xservicekit.handler.MessageResult;
...
@@ -49,6 +50,7 @@ import fleamarket.taobao.com.xservicekit.handler.MessageResult;
import
io.flutter.plugin.common.MethodCall
;
import
io.flutter.plugin.common.MethodCall
;
import
io.flutter.plugin.common.MethodChannel
;
import
io.flutter.plugin.common.MethodChannel
;
import
io.flutter.plugin.common.PluginRegistry
;
import
io.flutter.plugin.common.PluginRegistry
;
import
io.flutter.view.FlutterView
;
public
class
FlutterBoostPlugin
implements
MethodChannel
.
MethodCallHandler
,
Application
.
ActivityLifecycleCallbacks
{
public
class
FlutterBoostPlugin
implements
MethodChannel
.
MethodCallHandler
,
Application
.
ActivityLifecycleCallbacks
{
...
@@ -296,6 +298,19 @@ public class FlutterBoostPlugin implements MethodChannel.MethodCallHandler, Appl
...
@@ -296,6 +298,19 @@ public class FlutterBoostPlugin implements MethodChannel.MethodCallHandler, Appl
}
}
mCurrentActiveActivity
=
null
;
mCurrentActiveActivity
=
null
;
}
}
//reset view provider when single instance context is destroyed
// final FlutterView flutterView = mViewProvider.tryGetFlutterView();
// if(flutterView != null) {
// Activity ctxActivity = (Activity)flutterView.getContext();
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
// if((ctxActivity.isDestroyed() || ctxActivity == activity) &&
// mManager.getLastRecord() == null) {
// mViewProvider.reset();
// }
// }
// }
}
}
public
static
void
setBoostResult
(
Activity
activity
,
HashMap
result
)
{
public
static
void
setBoostResult
(
Activity
activity
,
HashMap
result
)
{
...
...
example/android/app/src/main/java/com/taobao/idlefish/flutterboostexample/MyApplication.java
View file @
388d0a3c
...
@@ -30,7 +30,11 @@ public class MyApplication extends FlutterApplication {
...
@@ -30,7 +30,11 @@ public class MyApplication extends FlutterApplication {
*/
*/
@Override
@Override
public
Activity
getMainActivity
()
{
public
Activity
getMainActivity
()
{
return
MainActivity
.
sRef
.
get
();
if
(
MainActivity
.
sRef
!=
null
)
{
return
MainActivity
.
sRef
.
get
();
}
return
null
;
}
}
@Override
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment