Summary:
Here I have an early version of the Navigation Plugin (Android) for Open Source.
A lot of apps will be using there own Navigation framework for handling deep links. In order to keep things as simple as possible, recording navigation events is done through a single function that can be called from anywhere in the app. This will allow users to place this function in there own navigation frameworks and use there own logic with it.
Seperately, I have shown how this can be used with our Android sample app. I use the built in Android intent-filters to provide a demo of how this can potentially be used, and to form the basis of the docs that I will write.
Reviewed By: passy, danielbuechele
Differential Revision: D16828049
fbshipit-source-id: 22765f63ca0c471689d2ec5865fdfc155b92697f
Summary:
`/*` is the standard throughout open source code. For example, Firefox uses single /*: https://hg.mozilla.org/mozilla-central/file/21d22b2f541258d3d1cf96c7ba5ad73e96e616b5/gfx/ipc/CompositorWidgetVsyncObserver.cpp#l3
In addition, Rust considers `/**` to be a doc comment (similar to Javadoc) and having such a comment at the beginning of the file causes `rustc` to barf.
Note that some JavaScript tooling requires `/**`. This is OK since JavaScript files were not covered by the linter in the first place, but it would be good to have that tooling fixed too.
Reviewed By: zertosh
Differential Revision: D15640366
fbshipit-source-id: b4ed4599071516364d6109720750d6a43304c089
Summary:
Adds a plugin for listing the databases, tables and contents of those tables in an android app.
Right now, works with sqlite, but it should be generic enough to work with other db types.
## Changelog
Add initial version of android databases plugin
Creating a PR, I may need to do some cleaning up, but this is to kick off that process.
Pull Request resolved: https://github.com/facebook/flipper/pull/441
Reviewed By: danielbuechele
Differential Revision: D15288831
Pulled By: jknoxville
fbshipit-source-id: 6379ad60d640ea6b0a9473acc03dd6ea81a3a8d4
Summary: I hope that this takes care of all the android violations.
Reviewed By: danielbuechele
Differential Revision: D15199150
fbshipit-source-id: 0f5b4edc1bc9d38de0885f88bb2c3e43acfa09cd
Summary: Add the affiliates bit that the linter is checking for.
Reviewed By: jknoxville
Differential Revision: D15164826
fbshipit-source-id: 500ffe89ec0c2fd3acfbc374408d16a337cecfa4
Summary:
This makes use of the new no-op package and also structures the app
into release and debug flavours that can be built with and without
Flipper part of the APK.
This was a pretty tedious adventure. I may have missed some corner cases
and also restructured a bunch of seemingly unrelated stuff that was
necessary to respect buck module boundaries.
Reviewed By: jknoxville
Differential Revision: D15148004
fbshipit-source-id: bf81f45105f5f16d17daccb3e8050ee00d69fc35
Summary:
We should not ship this as part of our distribution.
Just meant we had to bifurcate our unit tests which
is a bit awkward, but it works now.
Reviewed By: jknoxville
Differential Revision: D15146980
fbshipit-source-id: 496b000630bbfcaa663cddacb00550e1499a1279
Summary: Last big batch of adding license headers in Java code where they were missing.
Reviewed By: jknoxville
Differential Revision: D15164860
fbshipit-source-id: 4c0a61eec7b5659fdc674ebed85f2ade60dd0aa0
Summary:
This diff makes headless flipper accept `metrics` argument. Once this is passed. The headless flipper will terminate to export the metrics of the plugins, the type of the export looks like the following.
```
export type MetricType = {[metricName: string]: number};
type MetricPluginType = {[pluginID: string]: MetricType};
export type ExportMetricType = {[clientID: string]: MetricPluginType};
```
This diff, uses the store to export the metrics. I will modify the logic to accept the data which gets exported through `exportData`
Reviewed By: passy
Differential Revision: D14933499
fbshipit-source-id: dade5b7bc59ea4beb6d16c5ef471737e8597358a
Summary:
Currently running the sample app on a pre-21 device produces a runtime error. This is because it includes OkHttp which requires 21+.
So this change just stops the sample app from being installable on pre-21 devices.
```
FATAL EXCEPTION: main
Process: com.facebook.flipper.sample, PID: 19629
java.lang.ExceptionInInitializerError
at okhttp3.OkHttpClient.newSslSocketFactory(OkHttpClient.java:263)
at okhttp3.OkHttpClient.<init>(OkHttpClient.java:229)
at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1015)
at com.facebook.flipper.sample.FlipperSampleApplication.onCreate(FlipperSampleApplication.java:54)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 19
at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:238)
at okhttp3.internal.platform.Platform.findPlatform(Platform.java:202)
at okhttp3.internal.platform.Platform.<clinit>(Platform.java:79)
... 16 more
```
Reviewed By: passy
Differential Revision: D14953859
fbshipit-source-id: 8289c19e837f1d3739e120dc5a0f53111b800ca0
Summary:
This is quite hacky, but allows us to test that a plugin connects, sends some actions and
then shuts down the app which we can use in a headless test.
Reviewed By: jknoxville
Differential Revision: D14482381
fbshipit-source-id: deafa8fa7e6d5a5ca1bb006e9d150b62295105af
Summary:
This can be used in integration tests/headless to create
some data to match against.
Ideally, headless also will need some mechanism to be
told to exit, but that's a separate issue.
Reviewed By: jknoxville
Differential Revision: D14387494
fbshipit-source-id: 88d7c27e342fb0b26251e6edf12e7b922d5144c0
Summary: Only load the image when clicking on the "button"
Reviewed By: oprisnik
Differential Revision: D14165707
fbshipit-source-id: d07fb76562f8b91fc945713d779319b976e17016
Summary:
Not quite sure about the default as static, but then if it's for
debugging only, does it matter?
Reviewed By: oprisnik
Differential Revision: D14165668
fbshipit-source-id: edd53420a4fc8570de87f02b3e5e65cfe649f810
Summary:
This looks bad. There are two things I want to follow up on in future
diffs before landing this:
- Make loading the image conditional by adding another button.
- Add a default constructor to the plugin that avoids this crazy bit of boilerplate.
Reviewed By: oprisnik
Differential Revision: D14165569
fbshipit-source-id: 25c5fbaee32e72c6469979cda694cc9f13a92166
Summary:
This deprecates the `getPlugin(String)` method and introduces
a `getPluginByClass(Class<T>)` instead which avoids having
to `instanceof`-check and then cast the result, which provides
a nicer experience for Java users.
Reviewed By: jknoxville
Differential Revision: D13277568
fbshipit-source-id: fb7b5b8c0180470ef0ad322559b5b7424520848b
Summary:
This PR adds the barebone of a crash reporting plugin in android. Since there is no easy way to stack the PR's in git, creating a new PR, but this depends on the [iOS PR](https://github.com/facebook/flipper/pull/322)
Pull Request resolved: https://github.com/facebook/flipper/pull/328
Reviewed By: jknoxville, passy
Differential Revision: D13137447
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 3b86cebbb1ea01601405dd7ba58e1caa2b506065
Summary:
We have getAndroidContext() instead.
This will probably take a few iterations to land, but getting it out there so that I can try :)
Reviewed By: muraziz
Differential Revision: D12921523
fbshipit-source-id: 038ecf8c411fdbde6831051b219a43716007ac49
Summary:
Just a quick startup test that can save you the time of manually
opening the app.
I don't have any plans of hooking this up in Circle, but it's
still kinda useful to have.
Reviewed By: jknoxville
Differential Revision: D12901590
fbshipit-source-id: a16a1814574d9f27770dcf98c6b238517c589930
Summary:
Start adding Nullable and finals in some places to
make our sample app (and hopefully rest of the codebase) follow
some of the standards we have in place elsewhere.
Reviewed By: jknoxville
Differential Revision: D10463816
fbshipit-source-id: 7df6758919331ba8a334c94214b9e02bbab8cd2d
Summary:
The start of an example plugin.
My intention is for this to be a place that we keep up to date with the current best practice for doing things.
For example, with the introduction on persistedStateReducer, there are two ways to receive incoming messages, but only one of them works in the background. This should act as a guideline.
For this reason, don't hold back on reviewing it. I want it to be 👌
Reviewed By: priteshrnandgaonkar
Differential Revision: D10448592
fbshipit-source-id: d5fa978c14e47a7fa3c9a29d0929d5a6109267af
Summary:
As titled.
The controller you requested could not be found.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9990862
fbshipit-source-id: 459420adf400fd4504035fc36b14c5595f431f6a
Summary:
Per title.
The controller you requested could not be found.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9966768
fbshipit-source-id: 224ff9d02d6a01a6f7ee28788ddd9167d15aafee
Summary:
Rename everything `Sonar*.java` in `core/`.
Biggest chunk of the rename happened with
```fish
for name in (cat names.txt)
ambr --no-interactive --regex '\b'"$name"'\b' (echo $name | sed 's/Sonar/Flipper/') fbandroid/java/com/facebook
end
```
names.txt:
```
SonarArray
SonarClient
SonarConnection
SonarDynamic
SonarObject
SonarPlugin
SonarReceiver
SonarResponder
SonarStateUpdateListener
SonarValue
```
The controller you requested could not be found.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9940900
fbshipit-source-id: 4a1342fac02513025d80dcb0af62c26ea38b5086
Summary:
This soft-breaks Android Studio support because folder names no longer map to package names, but this will be mitigated by future diffs.
Steps taken for rename:
```
cd xplat/sonar/android/;
ambr 'com.facebook.sonar' 'com.facebook.flipper'
```
Reviewed By: danielbuechele
Differential Revision: D9850009
fbshipit-source-id: d26d8ab783e7050e4e2fbdd0c35eae3f97879464
Summary:
Two fixes included in this one. The debug flag is obvious, the annotations
less so. I'll try and find the right place to document this, but the reason
we need this here is because we reflect on `Prop.class`, so these need to be
available at runtime.
Reviewed By: jknoxville
Differential Revision: D9766713
fbshipit-source-id: 269b5a60c0df644f4fda0ea289ef9dc392ee352b
Summary:
The plugin was part of the wrong package based on its directory. This
confuses Gradle and I'm frankly a bit surprised this ever built before.
Pull Request resolved: https://github.com/facebook/flipper/pull/247
Reviewed By: danielbuechele
Differential Revision: D9420595
Pulled By: passy
fbshipit-source-id: fd8e47ff242c4535b36e379df93b672eb8bb840d
Summary:
This allows breaking changes in Litho to be landed.
I'm also adding some helpers to determine if Flipper itself
is currently in a release or snapshot release train.
N.B. We don't publish snapshot releases for Flipper
right now, but will in the future where this will come in
handy.
Reviewed By: jknoxville
Differential Revision: D9359035
fbshipit-source-id: d21b607eca5d57caf4cc34234f6ba3cb0d8f307d
Summary: Adds a link on MainActivitiy that opens the diagnostic screen
Reviewed By: danielbuechele
Differential Revision: D9267065
fbshipit-source-id: 1b44134de0e57f8021b19d76644dac6389c88b65
Summary:
Open the screen by running adb shell
am start -n com.facebook.samples.litho/com.facebook.sonar.android.diagnostics.SonarDiagnosticActivity
Reviewed By: danielbuechele
Differential Revision: D9150556
fbshipit-source-id: 534583cfa5e90af6fd0d2a50572e3763b8888da2