I am developing iPhone app where I want to display how much data downloaded and uploaded from device. I didn't find any public APIs to do this. But I fount one app 'OpenSignal' which does the same thing. here is the link for OpenSignal app.
Any help how to detect how much data downloaded or uploaded from the device.
Any help?
This can be done using getifaddrs. You will need to iterate and search for the appropriate data. You're looking for a record where sa_family == AF_LINK and then you can check which interface it is part of and get the number of bytes. There are restrictions such as when this record gets wiped to zero. man page (google is also your friend for usage details).
Related
I am trying to build a Asset Manager. I am using a scanner or a mobile device to scan the barcode which is the asset id. My requirement is as follows:
1) When the scanner scans for the first time the data(purchase date, cost, assigned to , history) should be allowed to be entered and the data should be stored in the google spreadsheet.
2) When the product or the item is already present it should display me the result(purchase date, cost, assigned to , history).
It would be a great help if i get a clue on what could be done.
Thanks in advance.
Mithun
Things you may consider:
What protocal to use to interface with the device. For example, I would recommend TWAIN for scanners.
What's your app type? Is it a web one that you can do scanning from browsers? Then you can choose the according scanning SDK for your project.
Store data to Google Spreadsheet. This post might help.
I have this idea for an iPhone app and the first time the app loads it will download data from a database - i'll link it all together.
The question i have is, could I tell the user of the app something like this, through an alert view or something:
"This is the first time you are using this app and it will need to download the data from a database. This will be about (whatever the size is of all the pictures and information)."
- note that the () should tell the user the size of the content of the database of whatever it is.
Then the user can be warned if they are on a cellular connection that this will happen.
I hope this makes sense and can be done in a way:-)
Cheers Jeff
One way to do it would be to calculate the download size in advance on your server. Then create a simple web endpoint on your server that contains the download size (in KB, MB, etc).
For example,
http://myserver.org/data_download_size
returns
54234908
which is the size in bytes of your download. Then you can retrieve that value from your iPhone app and display it to the user.
What I'm building is simply an application that fetches data over the web and displays them on the iOS views. Data are text and, sometimes, images / music files / movies.
I'd like to use some caching solution for the media. What it needs to do is:
get an url of the file
check if it's alredy downloaded in the cache storage, if it is, serve it
if not, download it
while also checking how much of the storage the current cache uses, and, if it's over the quota, delete oldest files
Best would be to have a simple interface for this - so I can just give an url and get the file of it (while files can change over time and reside on the same URL, so this should be handled too, in a perfect case).
Anyone knows a library to do it, on iPhone/iPad application?
ASIHttpRequest has a DownloadCache option that may work for you. From their documentation:
* You want to have access to the data when there is no internet connection and you can't download it again
* You want to download something only if it has changed since you last downloaded it
* The content you are working with will never change, so you only want to download it once
This is what I used in my iPad app and it works pretty well.
You could try looking at using a UIWebview for the view. If I am understanding this correctly, you will be hosting your content on a web server and would simply like the iOS device to pull the content from the URL. This is what UIWebview is. It is essentially programmable access to Safari.
I am trying to build an application which should send the data as an xml file to the server and other user's should be able to see the info uploaded by another user.
Embedding everything in xml file is done but now the question is how to push this information to the other user's so that they can see it in a particular format. Also how i can proceed towards making my own server to support this iphone app.
Thanks,
You can probably using a loop in your iPhone to check for new data every 1-2 minute. iPhone app can call your service to check if there is new information, if it doesn't have, you return a code to tell. If it has new information, you return the new information under a specific format.
The server and iPhone app has to agree on the same xml format
If you deploy an application through the iTunes app store, what usage information do you get from Apple? Do you only get the number of downloads/sales, and does this differ for free vs. paid apps? Do you get any information regarding how often it is used, crash logs, demographics info, etc? Is the only way to build hooks to your own server to track this information and would such an app even get approved?
I've seen articles such as this one that includes quotes like:
only about 20 percent of users return to use a free app the day after they first download it and by 30 days out, less than five percent are using the app.
Is that based on surveys, or is it data that comes from Apple? There doesn't appear to be much publicly available data except when Apple shows the top applications, but that is just based downloads or ratings, and nothing deeper.
Most of this information comes from companies like Pinch Media and Admob. They supply libraries you can include in you app which inform their servers of events in your app (specifically launch but also other events decided by you).
They use these events to provide aggregate information on iPhone apps. Several reports have been published recently referencing this data.
You only receive usage information if you somehow program the reporting of such information into your app.
Number of Downloads (Sales if a non-free app) and more recently crash logs are the only information you receive from Apple. you do not even receive personal information about WHO is was that bought your app, only that they did.
You won't get usage statistics from Apple, only download and sales statistics. The reporting is slightly different for free apps(as they won't show up in the financial report), but basically the same information is provided.
You can however track usage information on your own by having your application ping a remote server every time the app is accessed. You can use the unique device id to track a specific user. This will be dependent on internet access for the iPhone/iPod Touch.
Apple does give you how many downloads have occurred as well as what countries they are from. If you want more detailed usage statistics you will have to go to a third party solution, or write it yourself.
Unless Apple is secretly sending usage information when an app is opened, I don't see how anyone can get aggregate statistics about the whole app store. When I upload an app, it is in binary format, and it is probably unlikely that anyone adds in their own code to secretly do this.