nachiketavadera / flashlight Goto Github PK
View Code? Open in Web Editor NEWAn android application that makes using LED as a torch easier.
License: Apache License 2.0
An android application that makes using LED as a torch easier.
License: Apache License 2.0
Describe the bug
Upon vibrating the phone app is crashing with the following exception!
Exception
FATAL EXCEPTION: main
Process: android.nachiketa.flashlight, PID: 13636
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at android.nachiketa.flashlight.Global.changeBackground(Global.java:34)
at android.nachiketa.flashlight.Global.torchToggle(Global.java:55)
at android.nachiketa.flashlight.FlashlightShakeToggle.onSensorChanged(FlashlightShakeToggle.java:67)
at android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent(SystemSensorManager.java:857)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:181)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Device details
Android version: 10
Device vendor: Xaomi
Device name: Redmi note 9s
Hello, i am a graphic designer and i'd like to contribute a logo to your project, it's free of course.
I haven't found a single word on how much extra energy that service would consume if left working in background.
As for 'more gestures' feature request, actually, this doesn't relate to the flashlight. I'd like to build a similar background service that would listen to 'triple wrist-twist' gestures clockwise and counter clock wise when the phone is locked to perform two different BLE requests, but I am not quite sure how to recognize such gestures (if possible at all)
add this with UI in order to add blinking light . I am beginner so I don't know about mobile developement
public void toggle(View view)
{
Button button = (Button) view;
// mine coding for disco light
if(button.getText().equals("Switch On") )
{
int i=1000;
while (i>3)
{
if(i%80!=0)
{
//button.setText(R.string.switch_on_text);
torchToggle("off");
}
if(i%80==0)
{
// button.setText(R.string.switch_off_text);
torchToggle("on");
}
if (i==10000)
{
button.setText(R.string.switch_off_text);
torchToggle("off");
break;
}
i++;
}
}
// mine coding
}
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.