Android Question Help Needed to Create a GPS Fake Program in B4A [Solved]

carlos7000

Well-Known Member
Licensed User
Longtime User
Hello community,

I hope you are all doing well. I would like to request your assistance in creating a simple program in Basic4Android (B4A) that allows me to simulate a fake GPS location on my Android device.

The reason behind this request is that I'm working on a development project and need to test certain functionalities that require GPS location without physically moving to different places.

I have been researching how to do this and have tried some approaches, but I've encountered difficulties with outdated libraries and methods. I would greatly appreciate it if someone could provide me with a guide or code example to achieve this using the latest tools and recommended practices.

I appreciate any help, guidance, or examples that you can provide. Any contribution will be of great help in advancing my project!

Thank you for your time and attention!

Best regards,
 

carlos7000

Well-Known Member
Licensed User
Longtime User
Hello Erel if I am interested in creating a simple program that simulates the movement. It already provides Fake GPS location, among others, but they only simulate a fixed point or a random movement. I want to simulate a periodic movement in a straight line. function that does not have Fake GPS location

I was looking at this post but it is very old. Compile it, modify it, etc. but it doesn't work

 
Upvote 0

carlos7000

Well-Known Member
Licensed User
Longtime User
Searching and searching I found this post: https://www.b4x.com/android/forum/threads/mock-provider-for-api-30.130104/

I have downloaded the example and the library. I compile and "it works"

I tell you that the Start and stop buttons appear in the designer but in execution, they don't appear. Delete them and create again with the default values and they already work.

the program seems to work. but when pressing the Stop button the application crashes.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…