this is my first time posting so if I make a mistake correct me please!
I am currently brain-storming an app, and as I have been researching part of it on here, and other places I have come to a bit of a snag. I want the app to be able to access the call timer on a iPhone (as in, it will be able to track how long you are in a call) and then store this information. As of 2011 it seems that this was either not possible, or you had to use something called CoreTelephony. I however could not find any recent material on this, so I was wondering if anything has changed in recent years.
Thanks in advance for any help!
If your trying to count/show how long someone has spent on the phone from the iphone usage data you cannont, If you are trying to show how long someone has been on the phone in your app using your phone/voip or what ever you use then you can use NSTimer
Related
This question already has an answer here:
Update location in Background
(1 answer)
Closed 4 years ago.
I'm making a location tracking app. In this app, I need to record user location every 10 seconds. Also, the recording is done in a background service so that the application does not need to be in foreground. To make this, I tried to use Timer but it's not working in background. I've tried so much but it didn't work. Could you help me please?
I found this great tutorial: https://www.raywenderlich.com/5817-background-modes-tutorial-getting-started
I had a similar app to be built some time ago, and I also tried things like you did, but that is very very wrong way to use timer and all to record your location.
First of all, I suggest you to not try to record/ping location explicitly because, it will cause batter drainage. There is something called, significant location change, please go through it in docs. This will trigger you location update in every single significant location change.
But I assume, you really need to ping the location. There is a git repo, link below
Background geo location tracking
Please go though it, it is really nice library out there, I have ever come across, go through its documents. I am sure you will come around and be able to use it for your app. :)
I need to scan a website for changes every few minutes and when difference occurs i need inform user with popout window that contains information about that change.
Problem is i can't find solution to that, i tried putting that code in applicationDidEnterBackground but it didnt work. I'm new to swift and mobile programming at all so please be understanding.
Where should i begin? Little tip maybe.
Thank you!
I would like to compare the launch time of a few apps On the app store. Obviously I do not have access to source code, so I was wondering what is the best way to get accurate results ?
Is there a way to know when the system makes a call to applicationDidFinishLaunching (without source).
Any help is appreciated
Video them starting up and look at the time codes.
Maybe fire up Instruments and look for some kind of timeline evidence with one of their profilers?
I would like to create a device that will log when a person falls asleep. Of course, someone can't just open a software application and make an entry say "fall asleep, 10:13pm" and be asleep a few seconds later. Instead, I was thinking about hacking a blackberry to log whenever a person powers it on to check the current time. The specific algorithm is not important, but is it possible to write a piece of code be written to intercept the power on button and write the current time/date to a file? If so, how is it done?
Also, if anyone has a simpler idea, please share.
I haven't tested it, but since you're asking for ideas:
You have your application running in background (or even an app which doesn't extend UIapplication) and have a Task (using Timer and TimerTask) that repeatedly checks if Backlight.isEnabled() returns true. If it does - somebody is using the phone. You can even incorporate an AlertListener class to check when the user has been woken up ;)
The downside of this solution (if it works) is that it is something of a 'busy waiting loop', so intercepting some event would be much better.
As far as writing down the current time is concerned - it's possible and sample code snippets are everywhere, you can of course use the persistent store or an SQLite table to aggregate the results in an interesting way.
Funny thing is I've been thinking about an app like this lately - it might be an good idea.
I've made an application that is pretty simple, it just lets the user capture a number and then saves it in a SQLite DB.
Sometimes, not very common thing, when the user is entering the number to save in my app and he receives a call, answers the call, and then finishes it, the application is frozen after the call, can't do anything on it, not even return to the previous screen.
Does anybody have a clue on what can this be?
The code in this application is so simple =/, I have no idea what could it be.
Thanks in advance!!
How is it frozen? Have you attached the debugger and looked at your processes/threads to see what they are doing?
Could it be a painting issue rather than true freezing?
Need more information.