omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Some difficult (for me) questions about Pythonista

    Pythonista
    5
    28
    6987
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DavinE
      DavinE last edited by ccc

      Hey guys,

      I'm back and tested my app built with some of your help :)
      now I have some special questions...

      • I'm using console.login_alert() to authenticate on my app:
        Is it possible to use FaceID to log in?

      • Is it possible to fix Landscape or Portrait when I run my App?

      • When I'm in my app and I don't use it for 2min (my Setting) it goes in "Standby mode" is it possible to lock this function??

      • I use an MYSQL Server to save (Materials) ... is there a way to say my Server when I'm logged in they don't go in Standby mode ??

      Thank you guys a lot for your great work and help here :D

      p.s.
      better later as never
      Happy New Year

      mikael 1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        console.disable_idle_timer should fix the 2 minute thing.

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          Are you using ui, or scene?

          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by

            Re FaceId, I believe this is the same as touchid in iOS. The code below should work with face for devices that have face instead of touch.

            https://github.com/tdamdouni/Pythonista/blob/master/omz/touchid.py

            DavinE 1 Reply Last reply Reply Quote 0
            • mikael
              mikael @DavinE last edited by

              @DavinE, so, yea to all except the last one, where I do not understand the question yet.

              JonB 1 Reply Last reply Reply Quote 0
              • DavinE
                DavinE last edited by

                @JonB said:

                console.disable_idle_timer should fix the 2 minute thing.

                not quite but i found the Solution see below.
                but Thanks for your Help :)

                on_main_thread(console.set_idle_timer_disabled)(True)
                https://forum.omz-software.com/topic/6489/set_idle_timer_disabled-bug

                @JonB said:

                Are you using ui, or scene?

                I'm using UI

                @JonB said:

                Re FaceId, I believe this is the same as touchid in iOS. The code below should work with face for devices that have face instead of touch.

                https://github.com/tdamdouni/Pythonista/blob/master/omz/touchid.py

                No, this did not work.... on my iPad and iPhone (no touchid) they ask me for my code....

                @mikael said:

                @DavinE, so, yea to all except the last one, where I do not understand the question yet.

                Sry for my bad english :(
                I'm using a Synology with an MYSQL Server.
                My Synology go in Sleep Mode for like 15min...
                I want to tell the MSQL Server i'm online till i Leave my App

                i hope it's better so

                is it not possible to Fix/Lock the Orientation in fullscreen Mode ?

                mikael 1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by ccc

                  Is it possible to Fix/Lock the Orientation in fullscreen Mode ?

                  https://omz-software.com/pythonista/docs/ios/ui.html#ui.View.present orientations
                  https://omz-software.com/pythonista/docs/ios/scene.html#scene.run orientation

                  DavinE 1 Reply Last reply Reply Quote 0
                  • JonB
                    JonB last edited by

                    I want to say that orientation block doesn't work anymore in split screen capable devices. I forget if there is a workaround. You could always just manually set the orientation lock.
                    .

                    1 Reply Last reply Reply Quote 0
                    • cvp
                      cvp last edited by

                      Anyway, @DavinE said he uses ui, not scene.

                      DavinE 1 Reply Last reply Reply Quote 0
                      • mikael
                        mikael @DavinE last edited by

                        @DavinE said:

                        I'm using a Synology with an MYSQL Server.
                        My Synology go in Sleep Mode for like 15min...
                        I want to tell the MSQL Server i'm online till i Leave my App

                        This is more difficult for us to answer since it is not about Pythonista. But if MySQL activity keeps Synology awake, you can run a loop in the background thread to read something from the db say once every 10 minutes. Or use sftp or some Synology API to make it look like there’s disk activity.

                        DavinE 1 Reply Last reply Reply Quote 0
                        • DavinE
                          DavinE @ccc last edited by

                          @ccc said:

                          Is it possible to Fix/Lock the Orientation in fullscreen Mode ?

                          https://omz-software.com/pythonista/docs/ios/ui.html#ui.View.present orientations
                          https://omz-software.com/pythonista/docs/ios/scene.html#scene.run orientation

                          I Thought so too but this did not work for me....
                          I'm using it like this way:

                          self.present('fullscreen', hide_title_bar=True, orientations='landscape')
                          

                          My "self" view:

                          class main(SafeAreaView):
                          
                          1 Reply Last reply Reply Quote 0
                          • DavinE
                            DavinE @mikael last edited by

                            @mikael said:

                            @DavinE said:

                            I'm using a Synology with an MYSQL Server.
                            My Synology go in Sleep Mode for like 15min...
                            I want to tell the MSQL Server i'm online till i Leave my App

                            This is more difficult for us to answer since it is not about Pythonista. But if MySQL activity keeps Synology awake, you can run a loop in the background thread to read something from the db say once every 10 minutes. Or use sftp or some Synology API to make it look like there’s disk activity.

                            ^^ perfect this is what i'm looking for ;)
                            I'm done this so:

                            threading.Timer(600.0, FUNCTION).start()
                            
                            1 Reply Last reply Reply Quote 0
                            • DavinE
                              DavinE @cvp last edited by DavinE

                              @cvp said:

                              Anyway, @DavinE said he uses ui, not scene.

                              Is Scene better then ui ?
                              and when i change to scene need i change everything ?

                              cvp mikael 2 Replies Last reply Reply Quote 0
                              • DavinE
                                DavinE @JonB last edited by

                                @JonB said:

                                Re FaceId, I believe this is the same as touchid in iOS. The code below should work with face for devices that have face instead of touch.

                                https://github.com/tdamdouni/Pythonista/blob/master/omz/touchid.py

                                Is there another Solution for FaceID ?

                                JonB 1 Reply Last reply Reply Quote 0
                                • cvp
                                  cvp @DavinE last edited by

                                  @DavinE said:

                                  Is Scene better then ui ?

                                  I didn't say that. But it seems that ui does not support anymore orientation parameter in present.

                                  DavinE 1 Reply Last reply Reply Quote 0
                                  • DavinE
                                    DavinE @cvp last edited by

                                    @cvp said:

                                    @DavinE said:

                                    Is Scene better then ui ?

                                    I didn't say that. But it seems that ui does not support anymore orientation parameter in present.

                                    ahh okay that's why orientation did not work for me....

                                    When i use Scene is it a lot of work to change ?
                                    or can i change only the name of it ;) ?

                                    cvp 2 Replies Last reply Reply Quote 0
                                    • cvp
                                      cvp @DavinE last edited by

                                      @DavinE said:

                                      When i use Scene is it a lot of work to change ?
                                      or can i change only the name of it ;) ?

                                      It will depend on the process, and I have to say that I don't know anything about Scene. Hoping that other guys in this forum could help you.

                                      1 Reply Last reply Reply Quote 0
                                      • mikael
                                        mikael @DavinE last edited by

                                        @DavinE, orientations needs to be a sequence, so make it a list like orientations=['landscape'].

                                        DavinE 1 Reply Last reply Reply Quote 0
                                        • cvp
                                          cvp @DavinE last edited by

                                          @DavinE When I said that orientation did not work, I forgot to add this is for an iPad.

                                          1 Reply Last reply Reply Quote 0
                                          • JonB
                                            JonB @DavinE last edited by

                                            @DavinE for faceid, what do you get when you call is_available()?

                                            it may be that we need to try different values for the policy number -- i cant seemt to access apple documetation anymore on my ipad, so not sure.

                                            DavinE 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors