How to move car icon in the direction of movement?

I am using “mapsforge” library to show offline navigation on a map.Now I have to show car icon on a map with moving my car.Actually, the problem is how can I point icon head in the direction of destination (where we are moving ).

Please ask this in the mapsforge forum.

You can get the direction in degree using the following sensors, and then rotate the car according to the degree:

Sensor.TYPE_ACCELEROMETER and Sensor.TYPE_MAGNETIC_FIELD

look at this class int degree is what you should pay attention in this class and is exactly what you are looking for.
sorry for bad (not clear) code, this code is for about 4 years ago.