friendlyrobotnyc / tinydancer Goto Github PK
View Code? Open in Web Editor NEWAn android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
License: MIT License
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
License: MIT License
Any particular api call or functionality strictly depending on api level 16 ?
Wondering if it's feasible to lower it to 14 to support more devices.
Thanks
Robert
Caused by: java.lang.NullPointerException
at android.widget.TextView.getExtendedPaddingTop(TextView.java:1824)
at android.widget.TextView.getTotalPaddingTop(TextView.java:1918)
at com.codemonkeylabs.fpslibrary.ui.TinyCoach.(TinyCoach.java:54)
at com.codemonkeylabs.fpslibrary.TinyDancerBuilder.show(TinyDancerBuilder.java:94)
at com.codemonkeylabs.fpslibrary.sample.UI.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:5287)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159
java.lang.RuntimeException: Unable to start service com.codemonkeylabs.fpslibrary.service.FPSService@6be9f23 with Intent { cmp=my.cool.app/com.codemonkeylabs.fpslibrary.service.FPSService (has extras) }: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@d29dcdd -- permission denied for this window type
Thanks to @jaredsburrows for adding CI, I should add some tests.
Permission requesting and such.
#11
Add TravisCI for continuous integration builds
TinyDancer.hide(Application)
takes an application instance but calls TinyDancerBuilder.hide(Context)
, this reduces the flexibility as you need to put an extra method in the application class.
Can i use your library to show fps on a floating service ?
I have a android phone without root permission, So i can't meet fps value shows
I'm trying to add the library to my Android project but I get an error when I run the project
the Gradle build success with no error but when hit the run button I got this error before installing apk
Error:Program type already present: com.codemonkeylabs.fpslibrary.FrameDataCallback
Error:com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/omaraltamimi/AndroidStudioProjects/myproject/app/build/intermediates/transforms/dexBuilder/production/debug/0, /Users/omaraltamimi/AndroidStudioProjects/myproject/app/build/intermediates/transforms/dexBuilder/production/debug/1, /Users/omaraltamimi/AndroidStudioProjects/myproject/app/build/intermediates/transforms/dexBuilder/production/debug/2, /Users/omaraltamimi/AndroidStudioProjects/myproject/app/build/intermediates/transforms/dexBuilder/production/debug/3, ...............
Similar to leak canary, can we add a "no-op"?
There was a typo in the class, TinyDancer, Content should be Context
And I include the jar within an app, and the class TinyDancer could not be recoganized, maybe it causes by the jar consist with the typo.
Please add CHANGELOG.md
:)
// You can grab format from the OkHttp
for example.
Is the have stack infomation can be supply?
We can use Choreographer.postFrameCallback to set callback when each frame execute, and we can get the frame time from this callback to judge wether app is stuck. My question is
When I find the APP stuck, How can I get the runtime context information, including the page that happened to be stuck, the time-consuming method, etc. Thanks
Hi, can you remove uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" for no-op release since it is not necessary for release, in AndroidManifest.xml
Hey there,
I have some trouble resolving your dependency through gradle. I tried this as stated in the .md:
debugCompile "com.github.brianPlummer:tinydancer:0.1.1"
But always get this:
Error:Failed to resolve: com.github.brianPlummer:tinydancer:0.1.1
Can you please add some more infos on how to include your dependency? Maybe I am just missing the repo you uploaded to?
And from your uploading code it also looks like your .md is not up to date and you might have changed groupId or artifactId...
Hint: The Android Arsenal page did not help, but caused more confusion...
Thanks for you help 👍
Because why not
Hello,
I like your library. But I cannot use it in my apps because they work with lower than minSdkVersion 16. Is there any way to modify this library so that it can be ignored on devices that run lower than sdk 16?
Thanks,
Igor
In your library manifest you are setting the android:allowBackup
and android:label
attribute. It would be much easier to integrate your library, if the application wouldn't need to override those values.
Hi
According to Android 8.0 Behavior Changes apps that target API 26 should now be using the TYPE_APPLICATION_OVERLAY instead of the SYSTEM_ALERT_WINDOW.
If not you get this nice stacktrace.
Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@c3386fe -- permission denied for window type 2002 at android.view.ViewRootImpl.setView(ViewRootImpl.java:789) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:92) at com.codemonkeylabs.fpslibrary.ui.TinyCoach.addViewToWindow(TinyCoach.java:80) at com.codemonkeylabs.fpslibrary.ui.TinyCoach.<init>(TinyCoach.java:52) at com.codemonkeylabs.fpslibrary.TinyDancerBuilder.show(TinyDancerBuilder.java:94) at com.foo.bar.MyApplication.initTinyDancer(MyApplication.kt:128) at com.foo.bar.MyApplication.onCreate(MyApplication.kt:76) at com.zeroturnaround.jrebel.android.agent.runtime.client.JRebelApplication.onCreate(SourceFile:139) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5791) at android.app.ActivityThread.-wrap1(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Thanks in advance.
Tim
view position does not change even if i change it from Builder
The demo looks like it is out of the 1800s, it would be nice to add some material styling to it.
@jaredsburrows any best practices for maven/travis you can point me to? Where to keep keys externalized etc.
Thank you kindly
I tried using TinyDancer in my Android TV project, but app kept crashing during startup. The reason was: java.lang.RuntimeException: Unable to create application com.android.tools.fd.runtime.BootstrapApplication: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.action.MANAGE_OVERLAY_PERMISSION dat=package:com.mobitv.client.connect.tv flg=0x10000000 }
- there's no activity in Android TV that can request for overlay permission. Seems that android.permission.SYSTEM_ALERT_WINDOW
is missing in Android TV too, so there's probably no chance to use TinyDancer on TV.
Maybe it's worth mentioning in readme about this limitation?
I noticed that TinyDancer widget stays on screen even when application process is killed, in matter of fact I killed all applications and still see it.
Widget went away after going to application manager -> my app and "force stop" it.
It happened on Samsung Note Edge 5.0.1.
Can we add touch event for long press on the widget with dialog popup to kill it?
At the moment if I try to launch TinyDancer for the first time on Marshmellow it'll ask me to grant permission which is ok, but then TinyDancer won't be displayed until I trigger hide and show manually.
Would be nice if TinyDancer will understand that permission was granted and then draw itself without need in manual hide/show!
If user hadn't granted permission then library could display a Toast "TinyDancer won't work without this permission" :)
TinyDancer is not visible.
I have tried to add it in Application class onCreate() as well as Activity class onCreate().
TinyDancer.create()
.show(this);
Hello,
I cloned your project, but am unable to build the app. It throws an error:
No such property: GROUP for class: org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer
Please advise.
I already have an android studio project. I just want to import the tinydancer pckage and add the code to show the fps.
But I can't import the tiny dancer package. Showing the error "can't import".
How to do this? Please tell me.
Allow users to extend the value of this tool easily. A callback called on each doFrame() which forwards the time between VSync and the dropped frames you've calculated could be valuable. The overlay is great, though extensibility here allows other devs to leverage the work you've done to simplify their performance measuring problems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.