How to design network quality indicator like Viber? [closed] - ios

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Here's the link to the app...
http://www.gadgetlite.com/2011/01/25/viber-app-hits-version-1-1-network/
I've looked around and mostly suggest private api or networkactivityindicator (which is not what im looking for)
Would appreciate any hint on how I could start

The network quality of the Viber app refers to the data connection.
Set a start time at NSURLConnectionDataDelegate's connection:didReceiveResponse:, then transmit something and count the bytes at connection:didReceiveData:. At connectionDidFinishLoading: set the finish time, calculate the time interval and match that against your arbitrary thresholds.

I have the feeling a default iOS framework would have that information (look at networking libraries in iOS). If not, you could possibly look at ping times (ping a URL in the background and look at the delay amount, make sure you're using a server that's available and quick at all times. ping google.com maybe?)

So I looked around, having read the very useful answer that Ege Akpinar gave earlier, and stumbled upon this article. They use the Apple's own Class, which can be used on Mac OSX and iOS:
Get ping latency from host
The link to Apple's Sample is available through the above link, but for the sake of efficiency and speed, here is its direct link:
https://developer.apple.com/library/mac/samplecode/SimplePing/Introduction/Intro.html#//apple_ref/doc/uid/DTS10000716-Intro-DontLinkElementID_2
I also found another post that shows how to implement the class using Swift. I thought I might include it, in case you are using Swift:
Using Simple Ping in swift (iOS)
I hope this will be of some use.

Related

Controlling internet speed Swift [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to make an app which can slow down a user's internet speed. Is there any ways? It's for a gym sports events where whenever the runner is running on the threadmill and with their speed on the threadmill,the download speed of a file is changed. For example if the running speed is faster,download speed is faster. Is there any codes that are able to control the internet speed? I looked up on stacksoverflow but all is on simulator.
There are no public APIs for doing this. I would suggest that you instead fake the reporting of progress.
If it is your app which is doing the downloading then if you implement the HTTP/FTP/whatever communication yourself over TCP/UDP your app can insert delays; or it can just download at network speed to a temporary location and transfer it from there to the correct destination at whatever speed it chooses.
If you are trying to slow down standard apps like Safari you could add a HTTP/FTP proxy to your system, which rather than simply proxying slowed down transfers. If you don't want to write a proxy from scratch take a look at Squid or GlimmerBlocker (I think its source is available, its in Java, this proxy is a Mac ad blocker demonstrating a proxy can be used for more than just proxying).
HTH, Have fun!

How to recognize voice commands in iOS? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am trying to do something similar to this.
To summarize the video, the app continiously listens to you and when it recognizes words you specified (commands), it would announce you.
However, NSSpeechRecognizer works only for macOS.
Is there an equivalent for iOS? I tried SFSpeechRecognizer but I don't know how to specify the available commands.
Thank you!
SFSpeechRecognizer doesn't have commands.
So what you need to do is to create an array or set with command words and then check if it contains recognized word.
Please see http://avikam.com/software/sfspeechrecognizer-tutorial.
SFSpeechRecognizer is one way of trying this, another is to try and create a Siri intent based upon a specific domain that you are targeting in iOS. However, I am not positive that either of these options will get you to what you are looking for though because in the video you will see that the macOS application is open and listening to the dictation.
To continuously listening part is the problem. You can enable Siri to do this by setting this up in your iOS settings and then training Siri, but as far as I know this capability is not available for SFSpeechRecognizer. As I understand SFSpeechRecognizer, it is used primarily for dictation.

How to send/receive data through audio jack in iOS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We are looking for the ways to handle data transfer using audio jack in iOS.
We searched a lot to see whether it is possible to have this two way data communication through iPhone's audio jack, but had no luck yet. As per mentioned in some forums its possible, but again ended up with kind of vague answers which are more of theoretical-
Receiving Data Through Audio Jack
Force iPhone to read in data through headphone jack
http://hackaday.com/2010/02/01/android-audio-serial-connection/
So far we understand the app needs to be able to perform below things:
Check whether audio jack is ready to transfer the data with cable is already inserted into it
Sending Data : Data on your iPhone should be converted into analogue signals as you are going to transfer it using audio connector.
Receiving Data : Data will be received as analogue signals which should be converted to digital to read it back.
Please correct me or add up if anything is missing. Also wanted to ensure whether direct communication is possible. Ex. If I want to transfer data from my iPhone to Mac machine. Do we need to have dependency over any middleware hardware which then handles the signal conversion.
It would be really great if anyone is aware of any available 'libraries / APIs / well-defined process' which can be good enough to make a start..
Any help in this regard will be greatly appreciated!
Thanks.

How to create a poll on IOS? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
hi I’m new to IOS development i have developed only one application in iOS now i want to make a polling app in IOS i Google every where i did’t get a proper solution to make a polling app.
In my polling app i want get input poll form the user and i have to store in database and i have to calculate the value for the polling and i have to show the result how many people voted .
so please can any one suggest what is right way to make polling in IOS or is there any alternative way to make this.
thanks.
Assuming you want to store your results on a back end web server with a DB then you would first need to write some web services. I personally would suggest a combination of PHP and MySQL as they're both open source and relatively easy to get to grips with. I also recommend you use JSON as your data interchange format as it provides a human readable structure without the complexity of XML.
Once you have a functioning back end you would need to build an app with the appropriate data fields that you want in either one or multiple views. Personally I would put all of your questions into an array and then cycle through them changing the input controls if necessary. You can then add your answers to an NSMutableArray.
Once you have your complete answer set in your NSMutableArray you can serialise it to JSON and transmit it off to your web service.
There are many guides for getting started with JSON on iOS available, I would suggest you take a look at this one.
Your question is business specific (not to iOS, iPhone & objective C).
So I would suggest you to better try these APIs available in market.
support.polldaddy.com
Poll EveryWhere
TypeForm
Hope that helps.

How can I create a cloud backend to update my iOS app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a news application that i am in the process of building, and of course news updates a lot, so I have to constantly update my stories, so I need a backend of some sort that will let me update my stories over the air without updating the actual app.
I found Parse.com and they have some awesome stuff, but with the way my app is built I don't think I can use them.
I will have to update UIImageviews, UItextviews, and the names of Buttons. With Parse I can only seem to find help regarding the PFQueryTableViewController, which I could use this, but that requires completely recoding and some redesigning of my app to fit into that.
So unless there's another way, I guess I will suck it up and get to work.
So is there a simpler way to do this, or maybe a better service that works more towards what I'm describing?
What you are asking basically is how to do network communication. It sounds like to me you can do what you want with just Parse. You just store the images and text and then call the information from the parse backend when you are loading. From there you can update the UITextViews, button names, and UIImageViews however you want dynamically (using the .text, setTitle, and .image properties and methods respectively). You could also use Amazon S3 for image storage... but the API is less well documented for that.
This is probably your best bet, unless you really want to delve in more deeply and learn how to use NSURLConnection or AFNetworking to communicate with a back-end that you build on a django, ruby, etc. server that you host yourself on a server.

Resources