Blynk App (Preview) shutting down

Hi,

I am trying an App with the Blybk solution, the App needs to be up and running 24X7 but the App is used 2-4 times a day (Messages from the device to the server continues to flow every few seconds)

I see the Blank app on my iPhone shuts down and the the App is not working when needed in the backround, when I open the Blank App I can clearly see it is not in the RAM memory of the phone since the App is executed again.

Did someone saw or experienced this issue?

Let me know.

Thanks
Sharon

And the code, properly formatted, so people can help you is…

Hi Sharon,
I’m an iPhone user and I don’t tend to experience the same issues that you’re describing, although I do tent do kill my Blynk app if I’m not going to be needing it.

I’m not sure why the app needs to be running 24/7 for your application though. Is this something to do with notifications?

Pete.

The App is registering sensor information every 30 seconds to a Google DB, but it will switch a button 2-4 times a day. I need to keep the App open since the switch operation depend on GPS coordinates.

I am pretty sure the code have nothing to do with it (it is few 1000’s lines of code), I can see that the device continue to report status in a Google DB every 30 seconds. I believe the issue is the Blynk backround operation.

@PeteKnight, In addressing Sharon’s question, can you summarize all of the widgets that require the Blynk app to run 24/7. Is it only the Sensor widgets?

Thank you,

Joe

I am not using any sensor in the App, I am using a button, Current Location Map and terminal widgets.

OK. I thought you were using a GPS widget. @PeteKnight, the request stands. In addition to answering Sharon’s question, please summarize all of the widgets that require the Blynk app to run 24/7.

The Current Location and the Map Widget needs to be on all the time.

So, are you saying this is the GPS Streaming Widget?? If so, it will work in the background.

I think more clarity of exactly what widgets, sensors, etc. you are using (and their setup) might help us determine if your “issue” is the App or simply your iPhone shutting down what it assumes is an inactive process.

How do you “see” this? And if true, it seem to conflict with your statement…

Perhaps if you can define “status”… as in App active status via BLYNK_APP_CONNECTED() BLYNK_APP_DISCONNECTED() or via the GPS coordinates?

Need more input :wink:

As I mentioned the device is still connected to the Blynk server so I can get sensor information into my Google DB, but the App is shut off.

When it comes to details for troubleshooting… less is NOT more :stuck_out_tongue_winking_eye:

Basically, unless you are running a widget that streams one of the phones sensors (in this case GPS Streaming??) or are running another widget in reading mode, combined with BLYNK_READ(vPIN), then the state of the App rarely affects how a device works with regards to reading sensor data and sending it to the server.

But if the App state is such a factor in your project, then more info on what it is contributing to the setup… how long it stays “active” before not being active anymore… whether or not you “minimise” it or actually have it running full screen all the time (I have an Android tablet that does that… and does it fine)… ya know… more input :wink:

Perhaps even the App and iOS version you are using might be beneficial to the developers, if it is determined there is an issue…

You’re right, no one is interested to see a such long code :wink: So, go back to the basics, “Comment” out most of it and once you got the communications working, “Uncomment” blocks of codes till you can reproduce the error. If you can isolate the problem and still believe it’s a Blynk issue, just share that part of the code. I’m sure the developers will appreciate your efforts. Ha! Note here also your library version and language used.

Another option is to simulate your phone with this desktop app… link

Hi Emillio and Gunner,

Thanks for your reply.

It is hard and very inefficient to start commenting out parts of codes. since the App will go down after numerous hours this can be an endless task. I am not sure what the device code have to do wit the App itself?

In the App I am using a buttons, GPS stream, Map, LCD, LED, Tabs, and Terminal widgets.

I believe this is something to do with the backround App refresh on the iPhone. I didn’t hear of any user running Blynk 24x7 in the backround (at least not from the comments here).
I would expect if the App is going down to get a message or a log that shows the reason, I am not sure where I can see such a log. I clearly know that the device is functioning since the device reports to a Google DB the status of a sensor and other parameters. The device also reports some info based on the App cordinates and I can see that when the Blynk App is crashing the Coordinates stays the same as the last known position.
I hope an engineer from Blynk can comment on this as well.
Thanks
Sharon

I usually have the Blynk App running, constantly in the background & sometimes in the foreground, on my primary Blynk project development phone, a Nexus 6 running 24/7. If in the background, it always pops up immediately when I press on the App icon.

I have a constantly running project using the Map, but not the GPS streaming… as the phone doesn’t move much, why bother :stuck_out_tongue:

You can build this functionality into your code and have it email you.

Thanks Gunner, I do have this functionality in the code. I am reproting BLYNK_APP_CONNECTED and BLYNK_APP_DISCONNECTED into my Google DB. the problem is that this reports when the Blynk App is connected and disconnected not the App that is running under the Blynk platform (the preview application).

I am not understanding the “Preview Application” reference… but if you can already track that the App reports connected without reporting disconnected, then it is safe to assume it is still running.

It is still not clear what, if any, issue you are having with your project when the App stops running. If you are tracking the phones position or something via GPS streaming, then is it usual for the phone to be constantly moving around? A Blynkified Lojack for your jetset phone? :stuck_out_tongue:

I wonder if this is an Apple/iPhone limitation thing?

Opps, I was mistaken… I actually do have a NodeJS test project that is constantly reading from a GPS Streaming widget… effectively 24/7 from my Nexus 6. So it isn’t an issue, at least with Android… (and no wonder the battery doesn’t last as long when I forget to plug it back in :blush: )

image

Try loading in the iOS Beta App… that way the developers can have better logging if/when you send the Log reports after discovering a “crash”.

If you look the the Blynk flow, there is an option to see the App before publishing into the App store, it is called Preview Application. I do need to track the phone location 24x7. The problem has nothing to do with the phone GPS the problem is that the Preview App is getting shut periodically for some unknown reason under the Blynk App. I am not sure you ever tried the Preview App option.

Only briefly when it first came out… thus I keep forgetting about it :stuck_out_tongue_winking_eye:

Then I think I understand the issue now… All this time it seemed you were referring to the App itself crashing or something, even your title says so (I fixed that)… Again, clarity and detail of info is important for troubleshooting. :wink:

It is a “preview” and thus probably limited from constantly running, so as to not get used as a workaround instead of signing for a proper commercial contract.