I am currently using the DataApi and Asset class to transfer a 30MB file from mobile to wear. I am using an IntentService but the file never gets to the mobile. The wear freezes and says "Application is not responding, do you want to wait?"
Should I use a SyncAdapter to send this over? I'm not sure on the best way to do this?
It is better to use ChannelApi methods; first obtain a channel and then use Channel#sendFile() to send the file across. ChannelApi is built for transferring large files and doesn't do a sync across all the devices but rather for the target that you have used to open the channel to. It also saves space on the sender side. If you don't need syncing across multiple connected devices, this is the api to use.
Related
I do have two computers which are used to control an industrial plant. One of them controls the plant, the other is used as a failsafe. They are directly connected over ethernet, and the inactive" one just mirrors the display of the main controller.
I did capture the network traffic between the two and when i open it up in wireshark i see its all X11 traffic. It does include the initial connection request and also includes all the "draw calls" in plain text.
I now want to "replay" this captured stream and recreate the screen content from it. Is there any program available which can do so? Ideally directly from the wireshark capture file
My thoughts so far:
I can easily replay the network data itself and send it to some socket, but the communication is specific to the session, e.g. some commands refer to specific handle values set up earlier. Its unlikely a new session would work with the same values so i cant just pipe it into some program
What you see from your connection is only your connection requests + events relevant to the windows created by you ( or other's client windows where your connection sets an event mask ), and because of that quite a lot is lost. I'm not aware of the programs that can reconstruct best possible version of the screen from one client traffic but it's certainly not possible to have 100% accurate copy of the screen and best possible model will be far away from real screen (unless your connection periodically polls for backing store content of each mapped window).
Here is the deal, I have an application in which the device listens to iBeacons in the background and timestamps the moment user passes the area in range. Initially, as soon as I get a didEnter call back I used the chance to save the information to the iCloud using CloudKit. But sometimes on a bad luck, the internet is not available at that very moment and saving fails (e.g. when the user is in elevator).
I tried to use FMDB to write the information to database and sync them when app enters foreground. That doesn't work either. Since iOS8 by default encrypts the disk and does not allow me to write to disk after the phone gets locked by the user or the phone get a reboot (eventhough there are some APIs in NSFileManager to let you write to a file until it's open called "NSFileProtectionCompleteUnlessOpen" but they don't work after few hours of phone being locked. Perhaps a bug).
Third solution was to write them into a array and use reachability to sync them to iCloud as soon as I get a chance (on location callbacks, appdelegate callbacks or reachbilityChanges notification). But this solution is not secure to app termination. If the user termiate the app I dont have enough time to do anything.
The last solution is a mix of all together. Write to array if the disk is encrypted. write to disk if not encrypted. sync them all together and save to internet at any time possible. Do not want to put myself in alot of hassles before getting some help.
Do you have any idea how to deal with this?
You have 10 seconds of time to execute in the background after a region entry/exit event. You can save the data into an Array in UserDefaults during this time. Then do the syncing with CloudKit when the app is active.
I am trying to collect GPS location every 5 seconds from a smart phone by using socket.io.
I notice that when users pick up a phone call, socket.io will stop emitting messages. When users switching tabs in the browser, socket.io will stop emitting messages too.
Does anyone know how to solve this problem?
Thanks very much!
Your best bet would be to package the website in a native app. Use a service such as http://build.phonegap.com or Intel XDK. There are configuration options to keep your app alive in the background. As for it disconnecting during phone calls, this is a carrier limitation. If the user was connected to WIFI, most phones will that for data while simultaneously on a call.
Some networks (such as Verizon) do not have the capability to do voice and data at the same time. Thus, when a call is made, data is suspended until the call is finished. AT&T does not have this limitation.
The operation of background tabs will vary by mobile browser and is likely done for battery conservation reasons. It is unlikely there is a work-around to keep the background tab running (because that would defeat the whole battery management purpose).
I am going to write some apps on WP 7.5 in C#, which should store some user input in files, and later on these files should be synced with a server.
However, internet connection might not always be available.
So, the app should store the data inernally first, and later on it should synchronize with the server in the background.
Now, is a background sync possible at all? If yes, are there any prebuilt-functionalities to do this? Or else, what is the 'best practice' to do such sychronizing tasks ?
Our file server's protocol can be chosen according to this task. We could even use a SQL server.
You need to read about "Background file transfers for Windows Phone":
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202955(v=vs.105).aspx
Especially read and understand the policies and constraints regarding data size, duration, etc.
Note that this topic is part of the broader topic 'Multitasking for Windows Phone' which includes the background file transfers, tasks, etc:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202866(v=vs.105).aspx
I guys:)
I am doing an windows phone application that presents videos, but presents when syncronized with an ntp server. I already have a variable with the time but i donĀ“t know now what to do. I try search in google but i dont find anything.. I want to make an application to present the same video at the same time in different phones..
Any help? Examples?
The simplest way to get multiple devices doing something in sync is to define a time at which they should all start (do this on a central server) and then have each device request the amount of time to wait until the start. Each device should then start playback when that period has elapsed.
If you need to have different devices join in at specific ppoints when some are already playing the video your central point will need to send the point to start playing as well as the amount of time to wait until playback shoudl begin.
Due to the latency of the network communication you won't be able to get perfect sync though.