User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: AndroidPlus Flashlight Now Working

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AndroidPlus Flashlight Not Working

    I'm trying to create a simple flashlight app. I have the following objects in my app:

    - Android Object
    - AndroidPlus Object
    - 2 Button Objects

    I have one button labeled "On" and the other button labeled "Off." When one clicks on the On button it sets the AndroidPlus flashlight to 1. When one clicks on Off it sets the Android Plus flashlight to 0. I've built the app as an APK file and installed it on my Android phone. In the Android Options I have the Hardware Required Setting of Flashlight checked off. When I install the app and run it, I tap on the On button. Nothing happens though. It doesn't turn the light of the phone on. I know the flash LED works as I have a flashlight app installed on my phone already.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    You just have to grant the appropriate permissions for your app in the Android Options . I assume CAMERA is required and you should also tick FLASHLIGHT.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I added the camera permissions in my app. I already had Flashlight ticked. I compiled it and then installed it on my phone and it worked just fine. Guess I need to read up a bit more on the different options. It would be nice if in the future this could automatically be done. For example, when I created an event using the AdroidPlus Flashlight action, it could automatically tick the appropriate option(s) in the main app Android settings.

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm still having one issue. No matter what I do, it seems as if certain conditions aren't being recognized. I don't want people to accidentally leave the flashlight on. I wanted to where if someone tapped the back or home button it would turn the flashlight off. I've tried the following negated conditions:

    - Window is minimized
    - Window has focus
    - Window is visible

    They will all work if the back button is tapped. However, if the home button is pressed the light stays on. I was hoping that any of these conditions would work for anytime the app is not being used (i.e. sent to the background), which would happen if any of the buttons (other than menu) were pressed, if another app popped up in front, or if they received an incoming call.

  5. #5
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would like to add that I've already tried the Button is down condition. I entered the keycode of 3 as that's the keycode for the Home button. It still doesn't shut the flashlight off when the Home button is pressed.

  6. #6
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,592
    Mentioned
    268 Post(s)
    Tagged
    4 Thread(s)
    did you try using android object which handles the back and menu button and check in android properties, back button when set as default react according OS in order to handle don't forget to check, disable default back button behavior
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  7. #7
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The back button condition works fine. I have it set to when the back button is pressed it sets flashlight to 0 (AndroisPlus object) and ends the application. When back button is pressed, flashlight turns off.

    My issue is the Home button. I was hoping to use the Window Control object using one of the aforementioned conditions. That way it would take care of any condition where the app isn't in the foreground.

    Like I said, I even tried using the button keycode since the Home button isn't one of the conditions like what exists for back and menu button.

  8. #8
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,592
    Mentioned
    268 Post(s)
    Tagged
    4 Thread(s)
    Windows Object not work in android, those conditions does not apply to android

    mm you mean you want to send your application to background, did you uncheck the line that said "end application when not in foreground"?

    if you want to end, use regular system condition, End of frame or End of Application and then set the flash light to off

    home button is exclusively of the OS.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  9. #9
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just tried about every possible combination of what you've suggested and none of them work when pressing the Home button. I've tried the condition of End of frame as well as End of Applicaiton for it to set flashlight to 0. I've tried all of those with "End application when not in foreground" checked as well as unchecked. Seems like there's no way to turn the flashlight off when Home has been pressed.

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2016
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any ideas why the flashlight is not working for me? I have tried Wodjanoi's example MFA just in case there was something wrong with my code...

    I also made a very simple app with the following settings etc...
    Application Properties:
    Required Hardware: Camera
    Permissions: CAMERA, FLASHLIGHT
    Objects:
    AndroidPlus
    Conditions:
    Start of Frame + Run this event once
    Actions:
    Set flashlight to 1

    Which didn't work either...

    When I went to install the app on my Huawei Ascend Y320, which has Android version 4.2.2, it said that the app required permission to use the flashlight; however, when I went to install the app on the Samsung Galaxy S5, it didn't request permission to use the flashlight. Unfortunately, my Huawei doesn't have a flashlight, so I wasn't able to test whether or not the app worked on it.

    Technical Details:
    Fusion 2.5 Developer (Steam Edition) Build R286.6
    Android Exporter Build API: 24
    Minimum Android Version: 2.3 / 2.3.1 / 2.3.2
    Target Android Version: 6.0
    Testing Device: Samsung Galaxy S5
    Testing Device Android Version: 6.0.1

Page 1 of 2 1 2 LastLast

Similar Threads

  1. AndroidPlus preferences saving issue
    By EBMan in forum Android Export Module 2.5
    Replies: 3
    Last Post: 13th March 2016, 05:10 PM
  2. Questions about the AndroidPlus object and Share
    By Outcast in forum Android Export Module 2.5
    Replies: 23
    Last Post: 9th November 2015, 06:09 PM
  3. Flashlight
    By Lukiester in forum Fusion 2.5
    Replies: 2
    Last Post: 25th August 2014, 06:16 AM
  4. Help with flashlight example
    By pdsoft in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st July 2012, 04:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •