Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Simulator and accelerometer creates unexptected behaviour

ANSWERED

I've expanded my app with the a new function requiring the acceleromter.

 

The simulator behaves strange when the app tries to read acceleromter data. Ofcourse the simulator does not provide accelerometer data but the whole messaging api starts to disfunction.

 

Could this be fixed in the next simulator version? Or is there a method to detect if the app is running on the simulator or on a normal watch?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

This should be fixed in the next release of the simulator, thanks for the report!

 

You'll still not get any data from the accelerometer in the simulator, since there's no source of movement data available, but the rest of your application such as calls to the Messaging API and related events should now function correctly.

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

There isn't currently a way to determine if you're running in the simulator or not.

 

Are you checking for null values before trying to send them using messaging?

 

Best Answer
0 Votes

Hi Jon,

 

I'm looking for null values. For now, i have a global variable which is called OnSimulator. When its true, I simply do not initialize the accelerometer. It solves the problem... And it is not affecting testing since you cannot test the accelerometer at all. Let this Post be usefull for developers who stumble upon the same issue.

Best Answer
0 Votes

This should be fixed in the next release of the simulator, thanks for the report!

 

You'll still not get any data from the accelerometer in the simulator, since there's no source of movement data available, but the rest of your application such as calls to the Messaging API and related events should now function correctly.

Best Answer
0 Votes