Questions tagged [monkeyc]

Monkey C is an OO language developed by Garmin for use on their wearable devices.

is an OO language that works with the Monkey Brains virtual machine designed for easy app development on Garmin's wearable devices. The goal of Monkey C is to round the sharp edges of making a wearable app, letting the developer focus on the customer and less on resource constraints. Monkey C is an object-oriented language from the ground up. It uses reference counting to automatically clean up memory, freeing the developer from focusing on memory management. The resource compiler helps you manage different screen layouts between different devices.

The Monkey Brains VM runs on top of Garmin's RTOS, and exposes APIs for graphics, page layouts, location, activity tracking, persistent storage, and communication with mobile devices and sensors. The goal is to extend Garmin's devices onto the wearable web by allowing the developer to bring rich connected content to the Connect IQ platform.

Resources

Programmer's Guide

API Documentation.

22 questions
3
votes
2 answers

Const keyword not recognized by MonkeyC

I am building project in monkeyc (ConnectIq) from Garmin in Eclipse, and I want to use const instead of var in my code, but it seems that the const keyword is not recognized by the compiler. What could be wrong? My code is: const PI =…
user3053231
2
votes
1 answer

Garmin and Monkey C "Cannot find symbol ':setText'..."

I want to try a garmin WachFace and came across very quickly folgnden error, but unfortunately I do not know why it occurs, maybe someone can help you? Cannot find symbol ':setText' on type 'PolyType' I use the…
Mallalei
  • 71
  • 4
1
vote
1 answer

Connect IQ Garmin Simulator test getting location by enableLocationEvents function

I need find position of watch. I have an method: function initializeListener() as Void { System.println("start"); Position.enableLocationEvents(Position.LOCATION_ONE_SHOT, method(:onPosition)); } function onPosition( info as Position.Info )…
michal
  • 1,534
  • 5
  • 28
  • 62
1
vote
0 answers

Garmin makeWebRequest in background service delegate can not wake app from callback

Trying to request a webrequest in the background, and trigger an application wake when it finishes. The example code works, but it's impossible to wake the app from a callback: using Toybox.Background; using Toybox.Communications; using…
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
1
vote
1 answer

Why do my code changes not compile or show up when I run my MonkeyC program from Eclipse?

I am using Eclipse, the ConnectIQ add-on, and MonkeyC to write an app for a Garmin watch. I can run several sample apps on the simulator, but most of the time my edits don't deploy when I hit "Run". IDE info: Eclipse IDE for Java Developers Version:…
1
vote
1 answer

Connect IQ unexpected type Error when using setText

When a menu item is pressed I want to set the text of a label, however i'm getting the errors: "Failed invoking " and "Unexpected Type Error". In my menu delegate I have: using Toybox.WatchUi as Ui; using Toybox.System as Sys; using…
lehermj
  • 916
  • 4
  • 9
  • 20
0
votes
1 answer

Garmin MonkeyC Communications.makeWebRequest stopped working when moved to SDK 4.2.4

Im stuck and looking for help with this error: ERROR: fenix6: C:\....\OtherView.mc:90,8: Invalid '$.Toybox.Lang.Method(responseCode as $.Toybox.Lang.Number, data as Null or $.Toybox.Lang.Dictionary) as Void' passed as parameter 4 of type…
jarekj9
  • 37
  • 4
0
votes
0 answers

Connect IQ/Monkey C: Getting from menu and submenu to main screen with user inputs

I'm trying to learn Monkey C and create a really simple application, a timer where you can specify how long a period should be and how many periods (soccer game). I'm trying to do this in the most simple way to be able to launch on the oldest…
Tekhom
  • 13
  • 4
0
votes
1 answer

Handle buttons when switch to new view in monkey c Garmin

Hi I have an function to switch to another view: WatchUi.switchToView(new weatherResultView(data), WatchUi.MenuInputDelegate, WatchUi.SLIDE_IMMEDIATE); Inside weatherResultView view I need function to handle click on buttons. In the above code I…
michal
  • 1,534
  • 5
  • 28
  • 62
0
votes
0 answers

Simulate mouvement for simulator

I'm trying to make my first data field for Garmin Forerunner 955 watch. I want to make a field for pace that include the height difference. So, I need to simulate that I am walking on the simulator, but I can't find the information on…
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
0
votes
1 answer

How to drill down into a nested object in Monkey C? (connect-iq)

EMULATOR "fr945" MIN API LEVEL "3.0.0" API DATA STRUCTURE { "data": { "devices": [ { "device": "00:0E:00:AD:00:00:00:4A", "model": "H6008", "deviceName": "Mudroom", …
0
votes
0 answers

Monkey C: Is it possible to receive a physical button press event while my app is int the background?

I'm developing an emergency assistance app for the Garmin smartwatch platform and would like to be able to send an alarm with the (double) press of a button. In Android there is usually a kind of broadcast you can subscribe to. This broadcast will…
vvvv
  • 26
  • 2
0
votes
0 answers

How to speed up communication between android and a Garmin Watch App?

I developed an AndroidApp (using ConnectIQ) that sends messages to a WatchApp I also developped (on a fenix 6x pro, with Monkey C). The WatchApp makes my watch rings when a message is received. The AndroidApp uses…
mike
  • 55
  • 6
0
votes
1 answer

I wana have my application to fetch a html web page but i keep getting -400 whatever i try monkey c / garmin connect

even this exemple i found on the site of garmin has the same problem https://developer.garmin.com/connect-iq/core-topics/https/ import Toybox.System; import Toybox.Communications; import Toybox.Lang; class JsonTransaction { // set up the…
0
votes
0 answers

Compress coords two pairs per compressed chunk of data to be exported to xml, coding noob not sure where to begin or what to use

Basically I want to take an array of coordinates in long,lat format (qgis exports them that way by default it seems) and compress the coords as lines (two pairs at a time) for storage in a custom app for a navigation device I guess like this: Line 1…
1
2