Share My Creation Compass GM a gyro-magnetic compass app featuring true and magnetic heading

Hi everyone, you are all welcome to download and install my free and newly released gyro-magnetic compass app "Compass GM" written in B4A from the Play Store. As long as your device has a compass. Please let me know what you think and if you want to please rate and write a review on it in the Store. You may also post comments here of course.

I also want to thank this amazing B4X community for helping me and especially Erel, who on numerous occasions has helped me in the past.

Credit and thanks also goes to:

AccelratedSurface(ver 1.12) Informatix
Gestures(ver 1.20) Agraham
GoogleMapsExtras(ver 1.34) Warwound
Magnetics(ver 1.00) Derez
Reflection(ver 2.20) Agraham
SensorExtender(ver 0.01) MikieK
Erel for creating such an amazing dev tool as B4A.

DayView.jpg
RedNightView.jpg


Edit: I am glad to announce the compass Day/Night modes. I created a red night view to reduce night blinding due to bright light. Please check it out on Google Play in the link provided above.

The red tint was achieved by using the ImageProcessing (Version: 1.06) library. When the user selects night mode, the activity is recreated and all the images are loaded normally as bitmaps and then image processed with the tint applied. When the user again selects day mode, the activity is recreated again but without any image processing. Buttons had to be dealt with in a slightly different way.
 
Last edited:

PhilN

Member
Licensed User
Longtime User
I do appreciate your suggestions. I am listening to everything you’re saying and think about. Your interaction with me is very helpful to me. I must be challenged or else I will never learn from others like yourself.

I will not release the source code at this time. This is my very first app and want to enjoy the whole experience of publishing my first app for a while.

If I do make the waypoint editor to simply accept GPS coordinates by the user copy and pasting let’s say between google maps and this app, or importing a CSV file, it might work. It is quite advanced or perhaps cumbersome for many people I think. Perhaps there are online waypoint editors available that I can direct my users to, to help them with creating a waypoint list. Let me think that through a bit. Perhaps I can two versions of the app. One as described in this paragraph (import CSV/copy and paste/ manual entry) and a Pro version that has an easy to use waypoint editor in a map view.

So what I envision for a easy to use GPS waypoint editor is a map where you can place markers on a map that are joined together with rubber banding. The map could have roads or can be a terrain map. The user can zoom in and out pan place markers very accurately and simply save the planned path as a waypoint list. They can also move the markers by dragging them. There will also be other standard editing options such as insert, delete etc. The user can at any time come back to the visual waypoint editor and make changes. I could then also provide a moving map view. This would then be the pro version or a completely different app title aimed at hikers or even urban excursions.
 

dlfallen

Active Member
Licensed User
Longtime User
Your first app? Apparently you have considerable talent for this sort of thing. Congratulations.

One final word. Just a button to save the current location as a waypoint. A text box could pop up to accept a description. Then, your app could indicate the direction and bearing from wherever you happen to be.

I look forward to your future apps. I am sure they will be good.
 

PhilN

Member
Licensed User
Longtime User
Thanks for you recommendations. They are good and I will certainly consider using them to improve my app. Thanks again!
 

Peter Simpson

Expert
Licensed User
Longtime User
@PhilN
You should have received a crash/feedback report from me.

Lat/Lon does not display anything, and yes this test device (Pixel 3XL) is working 100% perfect and I allowed the permissions the app requested.
location.png


The top of the 'Distance' and 'Heading' numbers get cut off
I delete the default waypoint list, I enter a new waypoint and save it (all within 10 to 20 seconds). The new file never saves, app always loads the default file.

wp.png


Crashes every 10 to 20 seconds without me even touching the device...
crashes.png


I was going to send you a PM, but nah....
 

PhilN

Member
Licensed User
Longtime User
Hi Peter. There is definitely a problem writing to storage. If the app can’t write to storage the FLP service will not start since it is pointless to have the lat long and not be able to determine the angle of declination/variation from the Magnetics library by using the GPS coordinates. The way the magnetics library is implemented requires the WMMF.COF file to be written to storage. The second indicator is the waypoint list that can’t save to storage. Perhaps uninstall the app and try reinstalling. What version of Android are you running? I assume you have the latest version Compass GM. The problem that you are having happened to someone else who was running Android 10. I resolved the matter with the latest update of my app. That’s why I’m asking whether you have the latest version of my app.
 

Peter Simpson

Expert
Licensed User
Longtime User
Hmm.
1. I don't need to uninstall and reinstall the app, see #4 below.
2. I have Android 10 and 11 on 2 different Pixel XL devices
2. You should try storing your values using keyvaluestore.b4xlib
4. Yes I installed the latest version from the playstore before posting above. Ignore the times in the screenshots above as they were taken earlier and yes the same issues are still happening.
5. Don't forget to sort out the your font size issues...
 

PhilN

Member
Licensed User
Longtime User
Hmm.
1. I don't need to uninstall and reinstall the app, see #4 below.
2. I have Android 10 and 11 on 2 different Pixel XL devices
2. You should try storing your values using keyvaluestore.b4xlib
4. Yes I installed the latest version from the playstore before posting above. Ignore the times in the screenshots above as they were taken earlier and yes the same issues are still happening.
5. Don't forget to sort out the your font size issues...
Hi Peter. I took a look at the 3 crash reports. Thank you for submitting them. I think I realize one problem and that is that I need to upgrade my target SDK to 30. It is at 28 at the moment. Your device Google Pixel 3 XL uses Android 11 (SDK 30). I tried upgrading to SDK 30 a few weeks ago but then ran into a major problem and that was that Google Play did not accept my signing key. I could not understand that. I was able to upgrade to SDK 29 successfully but then there was another problem with writing to storage and in one of the posts Erel actually advised someone to revert back to SDK 28 which resolved the problem for me too. I know that is not a proper solution. So I am now going to tackle the upgrade and writing to storage issue now to resolve it, once and hopefully for all. Thanks again for pointing out this problem. I will let you know as soon as it has been resolved.
 

Peter Simpson

Expert
Licensed User
Longtime User
Hello @PhilN
I've not sent you the Pixel 3 crash report, but that phone which is running on Android 10 (as is my P4LX) is also doing the exact same thing, I only sent you my pixel 3 reports as they are all doing the same thing plus 11 is the next release.

Last year 10 gave a lot of banking apps issues, I don't want you to be having those kind of issues.

I'll PM you.

Good luck :)
 

PhilN

Member
Licensed User
Longtime User
Hello @PhilN
I've not sent you the Pixel 3 crash report, but that phone which is running on Android 10 (as is my P4LX) is also doing the exact same thing, I only sent you my pixel 3 reports as they are all doing the same thing plus 11 is the next release.

Last year 10 gave a lot of banking apps issues, I don't want you to be having those kind of issues.

I'll PM you.

Good luck :)
Ok. Thanks. I await your PM.
 

PhilN

Member
Licensed User
Longtime User
[SOLVED] After some time and effort I was able to resolve the issue above. The app now runs successfully on Android 10 and 11 Beta devices. Thank you to @Peter Simpson for pointing out the error and helping me resolve it and also for testing it on your devices.
 

Beja

Expert
Licensed User
Longtime User
Hi Phil,
Thanks for this wonderful example.. Can thins be used or modified to be used for guiding autonomous robot?

Thanks
 

PhilN

Member
Licensed User
Longtime User
Hi Phil,
Thanks for this wonderful example.. Can thins be used or modified to be used for guiding autonomous robot?

Thanks
Unfortunately my code is not available publicly. As for autonomous guidance, it depends on many factors. PM me then we can chat.
 

Chinook50ca

Member
I had a look at your Compass and i would have a couple option that could be great, first to have the choice to change Latitude and Longitude to UTM, because it is more easy to used when you tell a body friend to reach you in the wood, and would be nice to be able to enter a new waypoint by entering manualy the UTM number for the same reason.
And are you going to transfer it to Apple Phone?
Forgive me for my English, i am a french man.

Keep the good work.
 

PhilN

Member
Licensed User
Longtime User
I had a look at your Compass and i would have a couple option that could be great, first to have the choice to change Latitude and Longitude to UTM, because it is more easy to used when you tell a body friend to reach you in the wood, and would be nice to be able to enter a new waypoint by entering manualy the UTM number for the same reason.
And are you going to transfer it to Apple Phone?
Forgive me for my English, i am a french man.

Keep the good work.
I will consider what you say. I have at this time decided to keep this version quite simple. I will rather add improved functionality, like UTM coordinates in a pro-version. I am not going to port it to Apple, perhaps the pro version some time later. BTW: your English is very good, much better than my French!
 

Chinook50ca

Member
Thank, i will wait for the Pro-Version, i am doing a little project write now, working pretty well, but since that is my first, i have a little problem, i don't know if you can help me, i am trying to write a text file to an External SD Card, by that, i mean a SD Card connect to the Micro Usb port of the phone, can't do it probably because permission, but i am not able to understand how to do it ?
 

PhilN

Member
Licensed User
Longtime User
Thank, i will wait for the Pro-Version, i am doing a little project write now, working pretty well, but since that is my first, i have a little problem, i don't know if you can help me, i am trying to write a text file to an External SD Card, by that, i mean a SD Card connect to the Micro Usb port of the phone, can't do it probably because permission, but i am not able to understand how to do it ?
I will PM you.
 

Chinook50ca

Member
Thank, i have test it in the wood westerday, and i see that the app do not have the Heading and the distance to a waypoint, as soon you have it, i will be glad to do some test in the wood.
A+
 

PhilN

Member
Licensed User
Longtime User
Thank, i have test it in the wood westerday, and i see that the app do not have the Heading and the distance to a waypoint, as soon you have it, i will be glad to do some test in the wood.
A+
The app does have a waypoint editor. Please take a look at it. Click on the menu at the bottom left. There you can enter distance and heading for each waypoint. You can also select the units, km, miles etc.
 
Top