App closes the moment it is opened

I made the app which uses TinyDB and Location sensor. after installing the app, when I open it, it closes immediately without giving any warning or requesting for any permissions…
The problem solved if the user goes to mobiles settings/apps//Permissions and then gives permissions for storage and location.
But I want that app user need not do this.
Any help ?

It would really help if you provided a screenshot of your relevant blocks, probably in your case the Screen1.Initialize event, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Should I send the .aia file?

probably later...
you also can follow this guide
https://community.appybuilder.com/t/capturing-device-logs-using-adb/83?u=taifun
to find out more about the issue

Taifun

why are some of the blocks white? you might want to reopen your project to refresh that…
it seems to be you are using an extension?
why don’t you use the built in location sensor component?

Taifun

Hi !
Thanks so much .

Switching to the native location sensor solved the problem.
But the native location sensor does show the direction in which we are moving.
So one problem solved and another pops in.

:grinning:

so what do you need instead?
what exactly does the extension provide additionally?
any link to the extension?
Taifun

Correct, the native LocationSensor does not provide a bearing. Only the very impressive Advanced Location Sensor Extension by Niclas Gins does that as far as I am aware (by parsing a NMEA string).

How? Either by using bearing or parsing the NMEA
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

Field Meaning
0 Message ID $GPRMC
1 UTC of position fix
2 Status A=active or V=void
3 Latitude
4 Longitude
5 Speed over the ground in knots
6 Track angle in degrees (True)
7 Date
8 Magnetic variation in degrees
9 The checksum data, always begins with *

Trak angle is what contains the information to surmise direction of travel.

There are several Location Sensor type extensions. Juan Antonio's extension LocationSensor Extension. Accuracy. Geocoder. GeomagneticField has bearing ... that might do the same thing.

@Someshvar_Vashisht You asked a similar question here

Do you know what the trak angle is and what you can do with it? The track angle is the direction that the vehicle is moving in, as opposed to the direction it is pointing in. The track angle is also derived from velocity and is the same angle that GPS puts out. In all actuality, the track angle has little to no relationship with the direction the vehicle is pointing in.