Social Distancing ... a CloudDB / Location Marker Tutorial

Try again outdoors SimpleGPSTest2.aia (4.8 KB) .

ya lo intente solo obtengo el proveedor gps en el encabezado

nunca e tenido problemas con el gps en otras aplicaciones
saludos

You never had problems with the gps in other applications. App Inventor apps?
Did you go outside and test?
Did you press the Test Now and wait up to a minute?
Did you ever use an app that used only gps to find your location?

Sorry you are still having issues. Others can use both the Social Distancing app and the test app and get good results. The question is why you are having issues and no one else.

The results you shared when running the SimpleGPSTest2 aia indicate your device might have an issue. Your LocationSensor on your device never gets a satellite fix.
Here are several possible reasons:

  • you are having issues with your gps hardware
  • you are testing in a building and cannot get a gps signal (go outside)
  • you live in an area of high mountains or in a city location with tall buildings. The gps receiver needs to have an unobscured view of at least 4 satellites.
  • your system settings on the device for Location is turned off. You can use the SimpleGPSTest to set the system Location on. or you can Navigate to Settings > Location > using your device settings and make sure Location is ON. Navigate to Settings > Location > Sources Mode and tap High Accuracy. NOTE: GPS accuracy varies depending on the number of visible GPS satellites. Locating all visible satellites can take several minutes, with accuracy gradually increasing over time.
  • To minimize battery usage, the Android system automatically disables some features such as the GPS when the power is low or battery saving mode is turned on. To be able to use your GPS effectively again, turning off battery saver could help you out.
  • your WIFI is out of range and your data connection is not enabled when attempting the SocialDistancing app The app requires an Internet connection for both the Map and the CloudDB. This is not the case when using the test app.

If you run the SimpleGPSTest2 and it does not work to display location coordinates, then SocialDistancing_2 will not work either. Something is wrong

Sorry, but you do now. Do you have another phone you can test with? If so what happens?

ya logre obtener la ubicación saliendo a la calle usando el wifi

ejecute el al companiom desde mi pc y con el wifi y emule al companiom en mi teléfono móvil y llegue hasta la calle y me sale los puntos marker hasta allí todo bien
pero doy unas pasos mas allá y el wifi ya no llega

trate de instalarlo como apk para utilizar mi paquete de datos y me sale esto que no se puede descargar

allí hay un problema
si se quiere que corra el app tiene que ser instalado con el apk para ejecutarlo con el paquete de datos
¿como podría corregir eso?

ya lo intente varias veces

Congratulations. You are making progress. :slight_smile:

At the moment, MIT's build server is not working today. See Server error: could not build target

I expect the server will be again soon. You should be able to build the apk later today or tomorrow, then test with the apk installed with data. Good luck.

consulta sobre este Cloud
image

¿se personaliza?

de donde nacen
RedisPort
Token

saludos

When you load the SocialDistancing aia, App Inventor automatically generates the CloudDB token default for the app to use MIT's server. See CloudDB. You do not have to 'customize'

If you want to 'customize' t use your own Redis server
🟥 HOWTO: Setup Redis Server with SSL for use with AI2 . Do you have your own server?

Were you finally able to compile the app and load to your phone? The App Inventor server was working this morning?

¿Tienes tu propio servidor?
no
¿Finalmente pudiste compilar la aplicación y cargarla en tu teléfono?
si todo ok estoy estudiandolo

¿El servidor de App Inventor estaba funcionando esta mañana?
si esta mañana ya pude descargarlo el apk

saludos

consulta
cuando copio el contenido de Screen1 a Screen2 para estudiarlo y luego simulo en Screen2 me sale esto

image

ya probé eliminando el temporizador de Screen1 y todo lo que existe en esa Screen y sigue saliendo lo mismo cuando lo ejecuto en Screen2

a que se debe?
porque e copiado todo los 663 bloques

The simple solution is do not use Screen2. The the tutorial app example now works on your Android. If you want to 'study' and make changes to the app; make a copy of the aia and study the copy. :cry: and read the explanation about how the app works :slight_smile: After you have a copy, do your experiments.

See Social Distancing ... a CloudDB / Location Marker Tutorial .

eso quiere decir que solo funciona en Screen1?
y a que se debe?

Yes. :slight_smile: Unless you re-write the source code to work on a second Screen or you use a Virtual Screen instead of another Screen

Merci de votre réponse ce code m'a beaucoup aider juste il est conçu pour quatre utilisateurs
Et ça revient à mon problème
Je veux un nombre illimitée en utilisent l'application un marker est ajouté automatiquement sur la carte j'espère que vous m'avez compris

You will need to re-write the blocks code in order to handle unlimited users. You might consider that once a set number of users (three/four?) are on the same train, there is little point in more users reporting the location of the train?

n.b. you may find it easier to use Firebase, which will provide you with user authentication as well.

Instead of design time Markers, you will need Run time Markers for very many users. Coding that will probably be very complex.

Many users possible but 'unlimited' might not be possible using either CloudDB or FirebaseDB. Uncertain how many users of your app could be supported.

Oui un seul utilisateur suffira pour moi le nombre d'utilisateurs comme une source de foule
Un partira sur voie1 l'autre sur voie2 chacun ça destination
Es ce que c possible par générateur UUID

Es ce qu'il est possible l'ajoute de marker soit automatiquement quand un nouveau utilisateur installe l'application et à activé le gps?

You cannot use the tutorial example as it is. Either modify the example to use Runtime Markers (it presently uses Designtime Markers) or you might add a number of Designtime Markers and hide them until they are needed as new users join the postings.

There are several possible ways to use Runtime Markers to add a new Marker when a new user installs the app.

In my opinion the use of multiple Runtime Markers involve complex coding. I do not have an example with multiple Runtime Markers. An app using a Runtime Marker instead of DesignTime marker for a single user works without much additional coding.

What you do depends on whether each user uses a static location or whether the Marker location needs to reposition when any user changes his/her location.

What have you tried? Get your app to first post YOUR location. Once you are able to do that you will need to develop the logic to permit and use the locations of others.

1 Like

2 posts were split to a new topic: How can I make a rowing program that indicates distance between boats?

A post was split to a new topic: Is it possible to turn a Project that works with a TinyDB to use a CloudDB control?