garmin-connect-seed
garmin-connect-seed copied to clipboard
Application is started multiple times
If I put a println in the application's initialize(), onStart(), and onStop() functions, when I run in the simulator I see:
app init app start app init app start
Is this intended behavior? It seems bizarre, and at the very least makes it difficult to follow the execution of the program. Actions like onSelect in the delegate also occur multiple times
Thanks for submitting this issue. I will take a look at it
@srwalter I have a difficulty confirming this issue. After running make run
I get this output, without the duplication you see:
What is the command you run?
I'm using connectiq-sdk-lin-3.0.12-2019-06-12-77ed6f47e.zip as my SDK on Linux. I'm also targeting the d2bravo for my device. I run:
$ ~/src/connectiq/bin/connectiq & # start simulator $ make # build $ ~/src/connectiq/bin/monkeydo bin/NumberPickerApp.prg d2bravo initialize start initialize start Complete
I see the same behavior targeting the fenix5s
You shouldn't need to start the simulator. Can you try again without the simulator being open?
If you do want to run your application in the simulator, do make run
and this will start the simulator for you.
For me that hangs indefinitely. It looks like bin/connectiq runs in the foreground and doesn't exit for me, therefore I never get to the next command (sleep 3) in "make run"
If I modify Makefile to run connectiq in the background, then "make run" works, and it behaves the same as I described above
I just updated my version of the SDK to match yours, but still can't replicate the problem. What Java version are you using?
Also - can you verify that the hanging you described above is in fact not the application running in the simulator? When I do make run
, the application starts in the simulator and the command does 'hang' in the terminal until the application is shut down.
Java 1.8.0 here
Confirmed. If I run the simulator command from the Makefile, it does not return until I close the simulator window.
@srwalter this is actually expected - the terminal process will block until you close the simulator. To recap - you don't need to start the simulator manually. When you run make run
in the terminal, it will open the simulator with your application and will block the terminal until you close the simulator. Is this what you are seeing?
Hi Daniel, for me it was working fine with minor adjustments until 3.2.x. It seems now things are a bit different. Can you perhaps have a look? I added additional sleep time, but somehow it still fails sometimes. Connect IQ CLI didn't seem to have changed, so I find this strange. They did add more debugging capability to the simulator so maybe that's related.
Ps: Are you still actively supporting the project? I find the Eclipse SDK very poor, and use this "make" commands together with VSCode for quality of life in ConnectIQ development.
@andrezunido thanks for bringing this up. I'll take a look at this when I get a chance. I do my (poor) best to actively maintain this project and am always open to PRs!