Is it possible to request wireless data once the app is installed and opened the first time?
My app triggers some API requests in the background when some condition is met. So, at the beginning when the app is installed and opened the first time (there is no API request sent), I observed it didn't show up the dialog to "Allow access to wireless data...". That makes my subsequent "background API call" not work until after "next time" the user opens the app, the dialog shows up and they "allow" it.
I know I can send any API request when the app is opened the first time to bypass the issue, but that's unnecessary in my business scenario. Is it possible to request wireless data like all other permission requests?
--------- Attached a screenshot --------
Related
A gprs initiated event from an IOT device shall invoke a dialog on google assistant without the users having to start the dialog themselves. IOW. the begin of the dialog is externally triggered by an event and this event and not the user starts a dialog. Can this be done?
I am a NodeJs convert from one of the two other dialog management systems and know how to write a dialog and have limited know-how on google assistant to react to events.
There is an IOT device that sends GPRS messages to a google assistant device in case of a status change. This should trigger a push event on the assistant's host device which speaks a message about the event and allows the recipient to control further actions through a predefined dialog.
An 'alarm' on 'google home' fulfills the first requirement: Not the user but an external event (timer) triggers the dialog without there being a permanent connection during the timer countdown.
This alarm, however, does not seem to be a dialog as it only allows to 'stop' it.
As far as I found does it seem hard -and was impossible some time ago- to barge into a device without prior activation by a user. I do not know if it is possible to emulate a user request action to initiate a dialog or if there are better ways to push an event to initiate an intent that starts -without having been activated by the user- a dialog. (Those dialogs are approved and expected by the user)
As a slightly open question: Can/how does one send a network request every 5 minutes from a minimised iOS app?
In our case, we want to make sure that a certain message written when offline is sent as soon as the user regains internet access, even if the app is minimised.
Attempts at a solution
Most people are thinking down the 'app posting it' line, which hits the 3 min limit as mentioned.
Is there anything around the server pinging the app (perhaps with a notification) to trigger the app to respond with the required information?
If a user decides to not allow an app to access cellular data every time they try to open the app they are shown a warning telling them that cellular data is turned off.
Is there a way in the SDK to stop showing this message or control when / where it is displayed?
The system will show this message if you try to access the Internet when permission has been revoked. To prevent it from appearing, you could use Apple's Reachability code to detect network availability, and only make web calls if the network is available.
See also, this StackOverflow post.
I'm just starting to get into app development and have just been learning the uses of Xcode and Objective-C language. Just wondering how an app like snapchat or any other app can send data from one user to another. General answers would suffice just to better my understanding.
How do they test this functionality?
How can they connect peer to peer and send data from one phone to another? Is it all accessed in one database that the app connects to everytime that it pulls down?
When you sign up for an app like this with a registered account is that information stored on the iphone?
Well there are two ways data can be sent to a device. One is the device polls the main server periodically. This can be seen in a pull to refresh scenario. The other is the server can send a push notification to the specific phone and app which causes the data to be received by the device and displayed however the programmer wants. So device to device is essentially one person sending something through a web service call to your server. Your server them packages that information into a Json payload and sends a push notification to the recipient. It seems like its device to device because its so quick, but it requires that you have a server in the middle and of course your server is really sending the push notification to Apple's push server, so there really are two servers involved.
How do they test this functionality?
I would try to do this with real devices, and/or using a network sniffer tool to inspect the send packets.
How can they connect peer to peer and send data from one phone to another? Is it all accessed in one database that the app connects to everytime that it pulls down?
Someones sends you a snap
your app will ask the database every ...min or when you reload if there's something new to load, and gets it from the database if there is something new
When you sign up for an app like this with a registered account is that information stored on the iphone?
Connect to snapchat
get a snap from someone and wait till you can view it
start airplane mode and see if it loads, if it does there are files (temporarily) stored on your iPhone.
I have an app that tracks wildlife where the user enters data based on their observations (eg. user enters they see 3 moose). The data is then uploaded to a server. However, because this app will be used out in the field where there is often no internet connection, I want to save data if there is no connection, and upload the data as soon as the network is available
I know about Reachability, but it looks like I can only check if the internet connection is available at that moment, and doesn't check in the background for internet connectivity
So to summarize:
If there is an internet connection when users submits data, then that's fine.
If there is no internet connection, when user submits data, I want to save this data. As soon as there is an internet connection, I want the data to be uploaded, without needing the user to open up the app again. I can't rely on the user to open the app again causing the data to be submitted, because they will likely only use this app out of the range of cell towers, and will likely NEVER run the app in a location with a network connection, so it would have to automatically submit this data for them.
Looking around, I can't find an answer so I'm beginning to wonder...is this even possible?
No, Apple don't allow applications to run indefinitely in the background for this purpose, and they don't allow applications to be triggered remotely or anything of that nature. At best you could have your application run in the background to get notifications about major location changes, but you'd have to have it as a proper feature rather than a hack to get around this limitation, otherwise your application won't get approved by Apple.
I know it's possible to utilize the network in the background but only for a limited time after the user closes the app. You could create a timer which checks for a network connection (using Reachability or by pinging Google) and set the timer to fire every minute after the app closes. It's not a very efficient solution but it may work. You should look into how long you can maintain a connection after the app close though, I think it is 5-10 minutes.