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.
Related
Can someone help me out, i am facing a issues since many days.
My Application is lagging(Users feel like the app is almost struck) at the launch screen while handling image data from server and saving it in the local SQLite Database. It would be great if someone could provide me with some solution for the same.
Thank You.
It is hard to figure out the cause without any code but if the user is complaining that the application is lagging, there is a good chance that you are doing work on the main thread and locking up the UI. You should do as much of this work as you can on a background thread as to not freeze the User Interface. If your app is useless unless this data is ready, you should design a flow where the application lets the user know that it is doing some work instead of just freezing the application UI.
I have a client app with coredata as its back end. Its simple enough, with two entities.
UPDATE: Using CloudKit as the sync service. I'm not really sure what is going on there. Except I can query and get results, incase things don't automatically work. The problem is, as I noticed with most third-party sync-service providers. 95% of the time, they all work. Its when I test it with a more than a few devices / simultaneous calls that some undesired change comes in.
This question is more about iOS and coredata than the actual syncing architecture.
there are times when there is definite sync data loss. I really can't tell when and how. That im still figuring out. Sometimes initial sync takes a long time (if theres existing data) and the user might close the app, (some people double press the home button and actually close apps!).
But no matter what I do, sometimes i miss an object, sometimes an attribute.
So I saw this NSAsynchronousFetchRequest and I thought about giving me an option to check if all local-data (coredata) is okay, to see if theres anything missing.
Perhaps i could use a simple predicate to see of some managedObject.title == nil and fetch its identifier. Collect those faulty objects and request the truth server for data for these objects? Is this a good use of NSAsynchronousFetchRequest?
If yes, when during the lifetime of the app would this be good?
Im thinking maybe after applicationDidEnterBackround would be a good time..? Then If I do get it, will need a good way to manage CoreData in the background!
If no, well.. Really don't know wat to do then.
Im trying to actually do this, will update with my results.
UPDATE: Question updated to reflect the use of Cloudkit
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
I am using GWT 2.4.
I am using Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() and Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() when needed.
For some reason, when I am debugging the website a timer fired event is being shown frequently even when I am in the login page(where I do nothing besides showing username and password).
Why is this happening? It is because of this, that the scrolling looks unresponsive.
Please note that I am remotely debugging the website by connecting my ipad to macbook.
Attached is a screen grab. Any help will be greatly appreciated.
When you say
a timer fired event is being shown frequently
Do you mean that the RepeatingCommand gets executed over and over ?
As soon as you call scheduleFixedDelay, the scheduler will execute the RepeatingCommand as long as the execute() method returns true.
I am in the login page
How about writing a log to see if the scheduled command you are talking about in the question gets invoked, even if you're not logged in ?
I found the reason for the delay. On each touch start I was getting all the text and applying a property like html.getElement().getStyle().setProperty("webkitUserSelect", "none") as part of my requirement. The data in that html is pretty big and to keep doing it on every touch start was causing a delay. Got rid of it now.
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.