[Solved] How to send SMS with location data?

In my app, I want to send an sms with a location so how to do that?
Please help

Thanks,
A Thunker

Check out the Location Sensor and Share components

Happy Thunking!

I already read posts about this but it didn’t seem to work

1 Like

“it didn’t seem to work” is not going to be enough detail for anyone to help you.

Note the topic instructions:

2 Likes

Reading the posts are a good start. Building out the suggestions is the obvious next move. So, can you show what you’ve built out so far that is not working. Then we can help you get the code right.

1 Like

So how to send an SMS with a location please help

make it like get lat and long coordinates and sms it using share component
easy

@divyaseran.victory81 I can see that the relevant docs have all been shared with you already - were you able to complete this function in your app?

If not, can you share a screenshot of what you’ve tried so far and tell us a bit about what’s happening when you test it out.

Thanks

Hi
In my app, I added the location sensor to make it more useful but it’s not working, it doesn’t even sense the location of the user.
This is the code I’ve used
Screenshot 2021-01-03 at 11.07.43 AM
And this is what I get on the phone

2 Likes

The screenshot you provided does not have anywhere using the location. Can you provide a copy of the code where you use the location services?

in my app location sensor is used with the text message

u did every thing mostlly wrong but still
geme link to app link i fix

Did you get it

In the [GetCurrentLocation] use the [then do] to assign the green block [location] to the stored variable.

You can then use the stored variable in the [share] block

2 Likes

Ok @muneer

Your coding is correct and you are doing it the right way. Just add this missing code.

I also suggest to use variable names different than internal names. Your stored variable is “location” and the green block in the [GetCurrentLocation] is also “location”.

One other thing, in such development platforms it is normal to have result of blocks not as text or numbers but as object which you can convert them to text using [generate JSON from object].

Of course there are other ways to do this which is putting the [share] block inside the [then do] of the [GetCurrentLocation] block. This way you can use the green “location” or “latitude” and “longitude” blocks directly in the message part of [share] component.

Happy Thunking

1 Like

In addition to @muneer 's advice, you should move share4 into the “then do” block of location_sensor1 . This will ensure share4 will wait until the location sensor finishes getting the coordinates before generating the text message.

3 Likes

I wondered if I could do the same thing on a temporary number? I mean to receive sms online uk, because I am afraid to use my number. I don’t do that; I don’t put it anywhere when logging in to any website or application. It happened to me once. Unfortunately, I got scammed, and my data was stolen. Since then, I have been very vigilant. I’m sure you can help me with this because I’ve been looking for the answer to my question in the forum so far, but there was nothing related to that.

This does not work, not on an iPhone at least, the SMS appears to be blank after pressing on the button dedicated to share the location

Post a screenshot of the blocks you’re using.