Skip to content

Commit 0196932

Browse files
committed
v 0.5.2
Update Readme Clean Manage release in Github
1 parent 6042e67 commit 0196932

File tree

4 files changed

+105
-52
lines changed

4 files changed

+105
-52
lines changed

Diff for: CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.5.2
2+
- Remove JCenter
3+
- Update README.md
4+
15
# 0.5.1
26
- Migrate to AGP 7.0.3
37
- Migrate sample App to Android 12
@@ -36,5 +40,5 @@
3640

3741
# 0.1.0
3842
- First implementation
39-
- Add Activities
43+
- Add ActivitiesGener
4044
- Add Fragments

Diff for: README.md

+99-48
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,83 @@
11
# Android Object LifeCycle / BackStack Flipper Plugin
22

3-
## What you get
3+
## What you get ?
44

5-
This Flipper plugin is an app introspection plugin focus on Android Sdk mains objects and their life cycle.
5+
This library is an app introspection plugin for the [Flipper](https://github.com/facebook/flipper) tool. It does focus on Android Sdk mains objects and their life cycle inspection.
6+
7+
It enables to see the **big internal picture** of your running app in a side tool. Meaning that :
68

7-
It enable to see the "big internal picture" of your running app in a side tool. Meaning that :
89
- trough running the app as a user
9-
- you can kee an eye on internals as a developer
10+
- you can keep an eye on internals as a developer
11+
- see the dynamic of objects evolution
12+
- without struggling with debugger
13+
14+
## Status :
15+
16+
- The plugin is **under development**
17+
- The plugin **name** is not sealed (ideas are welcome)
18+
- The **private Api** is not sealed at all (it will change in the future)
19+
- The **public Api** is simple : future breaking change will be easy to handle
20+
21+
## Availability :
22+
23+
You can get the Android plugin with the Gradle dependency from Jitpack :
1024

11-
## Status
25+
- [https://jitpack.io/#afaucogney/flipper-backstack]()
26+
- [![](https://jitpack.io/v/afaucogney/flipper-backstack.svg)](https://jitpack.io/#afaucogney/flipper-backstack)
1227

13-
The plugin is under development
14-
Name is not sealed (ideas are welcome)
28+
Current version is `5.0.2`
1529

16-
## Availability
30+
## Vision
1731

18-
You can get the Android plugin with the Gradle dependency from Jitpack
19-
- https://jitpack.io/#afaucogney/flipper-backstack
32+
The idea behind this plugin is to enable understanding of what is happening during the usage of an Android Application by :
2033

21-
## Content
34+
- seeing logs about object life cycle changes
35+
- seeing internal Android object structure (limited to a set of specific architecture)
36+
- seeing objects stacks (FragmentManager BackStack, Jetpack Navigation Stack)
37+
- seeing current running objects
38+
- seeing objects destroyed (in Trash)
39+
40+
## Show me a ScreenShot !
2241

2342
![alt text](./screenshot/flipper_android_lifecyle_4.1.0.png)
2443

25-
### Left part
26-
27-
You can :
28-
29-
- see the app object structure
30-
- application
31-
- activities
32-
- fragments
33-
- viewModels (with reflexion)
34-
- viewModel members (liveDatas) (with reflexion)
35-
- jobs (not yet available)
36-
- services (not yet available)
37-
- trash (objects destroyed)
38-
- backstack (legacy)
39-
- backstack (jetpack navigation)
44+
### What is in the Left part ?
45+
46+
You can see the app object structure :
47+
48+
- Application
49+
- Activities
50+
- Fragments
51+
- ViewModels (with reflexion)
52+
- ViewModel members (LiveDatas) (with reflexion)
53+
- Jobs (not yet available)
54+
- Services (not yet available)
55+
- Trash (objects destroyed)
56+
- FragmentManager BackStack (legacy, only for activity)
57+
- JetPack Navigation BackStack
4058

41-
The object structure is view as a tree, where each instance of an object has is dedicated object category.
59+
The object structure is viewed as a tree, where each instance of an object has is dedicated object category.
4260

4361
- `HomeFragment` parent is `fragments`
4462
- `HomeFragment` children are running instances of `HomeFragment`
4563

46-
- filter objects in the tree (not yet available)
47-
48-
### Right part
49-
50-
You can :
64+
### What is in the Right part ?
5165

52-
- see the object lifeCycle events for
66+
You can see the object lifeCycle events for :
5367
- activities
5468
- fragments
5569

56-
- filter those event categories
57-
- created/destroyed
58-
- started, stopped
59-
- paused, resumed
60-
- attached/ detached
61-
- ViewCreated
70+
You can filter those event categories :
71+
- created / destroyed
72+
- started / stopped
73+
- paused / resumed
74+
- attached / detached
75+
- view-created / view-destroyed
6276
- SaveInstanceState
6377

6478
## Installation
6579

66-
### Android
80+
### Step 1 : Add the JitPack repository to your build file
6781

6882
Add it in your root build.gradle at the end of repositories:
6983

@@ -73,17 +87,41 @@ Add it in your root build.gradle at the end of repositories:
7387
maven { url 'https://jitpack.io' }
7488
}
7589
}
76-
Step 2. Add the dependency
90+
91+
### Step 2 : Add the dependency
7792

7893
dependencies {
79-
implementation 'com.github.afaucogney:flipper-backstack:b1329a419a'
94+
debugImplementation 'com.github.afaucogney:flipper-backstack:-SNAPSHOT'
8095
}
96+
97+
### Step 3 : Add Flipper to your app
98+
99+
Follow the [Getting Started](https://fbflipper.com/docs/getting-started/android-native) section of the Flipper documentation
100+
101+
### Step 4 : Add the Android-Object-LifeCycle plugin to Flipper
102+
103+
In your application, register the plugin the Flipper configuration.
104+
105+
val client: FlipperClient = AndroidFlipperClient.getInstance(this)
106+
with(client) {
107+
addPlugin(
108+
InspectorFlipperPlugin(
109+
this@App,
110+
DescriptorMapping.withDefaults()
111+
)
112+
)
113+
...
114+
addPlugin(BackStackFlipperPlugin(this@App))
115+
start()
116+
}
117+
118+
Be careful, to not embed this library in production !
81119

82-
### Flipper Desktop
120+
### Step 5 : Add the Android-Object-LifeCycle plugin to Flipper-Desktop
83121

84122
Install the plgin in Flipper, it is called `lifecycle` [Npm page](https://www.npmjs.com/package/flipper-plugin-lifecycle)
85123

86-
## What can you achieve with the plugin
124+
## What can you achieve with the plugin ?
87125

88126
- identify runtime object instances and structure
89127
- identify leaks (remaining objects)
@@ -93,19 +131,32 @@ Install the plgin in Flipper, it is called `lifecycle` [Npm page](https://www.np
93131
- lifeCycle issues
94132
- backStack issues
95133

134+
## Consideration
135+
136+
- This plugin (as Flipper) must not be shipped in Production
137+
- This plugin may doing lot of work, so please consider disabling it if you are not using it. I have not yet done measurement to evalute it resource requirement. But from the `5.0.0` version
138+
- It should run on Background tread thank to Rx
139+
- However, data structure of the app is kept in memory, so it may be a problem for some App or some low memory devices
140+
- The Plugin uses Reflection for accessing privage properties or functions
141+
96142
## TODO
97143

98144
- [ ] Be able to filter object in structure
99-
- [ ] Save option in client (duplex)
100145
- [ ] Impact event filtering from object
101146
- [ ] Evaluate saving data in db / shareprefs
102147
- [ ] Handle clean versioning / release
103148
- [ ] Generate docs
104-
- [ ] Embed Desktop Code Source here
105-
- [ ] Impl Jobs
106-
- [ ] Impl Services
149+
- [ ] Impl Jobs support
150+
- [ ] Impl Services support
107151
- [ ] See bundle / saveinstance state
108152
- [ ] See App lifecycle
153+
- [ ] Evaluated StateFlow support (on going PR)
154+
- [ ] Imp BlackStack for ChildFragmentManager
155+
- [ ] Highligh duplicate object in the tree if you click on it (see link between framgnet in stack...)
156+
157+
## ISSUES
158+
159+
- [ ] At first start, the tree is not updated ! You need to change screen to update the plugin.
109160

110161

111162

Diff for: app/src/main/java/fr/afaucogney/mobile/android/flipper/flipperandroidbackstack/App.kt

-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ class App : Application() {
1212
override fun onCreate() {
1313
super.onCreate()
1414

15-
// if (BuildConfig.DEBUG) {
1615
SoLoader.init(this, false)
17-
// if (FlipperUtils.shouldEnableFlipper(this)) {
1816
val client: FlipperClient = AndroidFlipperClient.getInstance(this)
1917
with(client) {
2018
addPlugin(

Diff for: flipper-backstack/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ afterEvaluate {
6161
// You can then customize attributes of the publication as shown below.
6262
groupId = 'fr.afaucogney.mobile.flipper'
6363
artifactId = 'android-objects-lifecycle'
64-
version = '0.5.1'
64+
version = '0.5.2'
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)