示例#1
0
def main():
    from charts.android.factories import install
    install()
    #: Called to start your app
    from enamlnative.android.app import AndroidApplication
    app = AndroidApplication()
    #app.debug = True #: Uncomment to debug the bridge
    app.dev = '192.168.41.139'  #: Uncomment to enable reloading
    app.reload_view = reload_view
    app.deferred_call(load_view, app)
    app.start()
示例#2
0
def main():
    # Make sure instance is cleared
    from enaml.application import Application
    Application._instance = None

    from enamlnative.android.app import AndroidApplication
    app = AndroidApplication(
        debug=True,
        dev='remote',  # "10.0.2.2" # or 'server'
        load_view=load_view)
    app.timed_call(5000, run_gestures, app)
    app.start()
示例#3
0
def main():
    """ Called by PyBridge.start()
    """

    #: If we don't our code goes away
    os.environ['TMP'] = os.path.join(sys.path[0], '../tmp')

    from enamlnative.android.app import AndroidApplication
    app = AndroidApplication(
        debug=True,
        dev='remote',  # "10.0.2.2" # or 'server'
        load_view=load_view)
    app.start()
示例#4
0
def main():
    #: TODO: Plugins should support this...
    from zxing.android.factories import install
    install()

    #: Called to start your app
    from enamlnative.android.app import AndroidApplication
    app = AndroidApplication()
    app.debug = True  #: Makes a lot of lag!
    app.dev = 'server'  # "10.0.2.2" # or 'server'
    app.reload_view = reload_view
    app.deferred_call(load_view, app)
    app.start()
示例#5
0
def main():
    """ Called by PyBridge.start()
    """
    print(sys.path)
    import enamlnative
    with enamlnative.imports():
        from enamlnative.android.app import AndroidApplication
        app = AndroidApplication('com.codelv.enamlnative.EnamlActivity')
    app.debug = True  #: Makes a lot of lag!
    app.dev = 'server'
    app.reload_view = reload_view
    app.deferred_call(load_view, app)
    app.start()
示例#6
0
def main():
    """ Called by PyBridge.start()
    """
    print(sys.path)
    import enamlnative
    with enamlnative.imports():
        from enamlnative.android.app import AndroidApplication
        app = AndroidApplication('com.enaml.MainActivity')
    #app.debug = True #: Makes a lot of lag!
    #app.dev = '192.168.34.103'
    #app.reload_view = reload_view
    app.ignore_reference_errors = True
    app.deferred_call(load_view, app)
    #app.deferred_call(dump_stats)
    app.start()
示例#7
0
def main():
    """ Called by PyBridge.start()
    """
    #init_logging()
    #: If we don't our code goes away
    #os.environ['TMP'] = os.path.join(sys.path[0], '../tmp')
    #from charts.android.factories import install
    #install()

    from enamlnative.android.app import AndroidApplication
    app = AndroidApplication(
        #dev='remote',
        load_view=load_view
    )
    app.start()
示例#8
0
def main():
    """ Called by PyBridge.start()
    """
    #: If we don't our code goes away
    os.environ['TMP'] = os.path.join(sys.path[0], '../tmp')

    import enamlnative
    from enamlnative.android.app import AndroidApplication
    app = AndroidApplication()
    #app.debug = True #: Makes a lot of lag!
    app.dev = 'server' # "10.0.2.2" # or 'server'
    app.reload_view = reload_view
    app.deferred_call(load_view, app)
    app.deferred_call(dump_stats)
    app.start()
示例#9
0
def main():
    """ Called by PyBridge.start()
    """

    #: If we set the TMP env variable the dev reloader will save file
    #: and load changes in this directory instead of overwriting the
    #: ones installed with the app.
    os.environ['TMP'] = os.path.join(sys.path[0], '../tmp')

    from enamlnative.android.app import AndroidApplication

    app = AndroidApplication(
        debug=True,  #: Makes a lot of lag!
        dev='server',
        load_view=load_view,
    )
    app.start()