Wait for user to finish interacting with UITableView - android

I would like to implement what Gmail does in its app. That is, it fetches the emails in the background on a pull-to-refresh and when the data is available, it will update the UITableView. But if the user is interacting with the UITableView just before updating the UITableView, the app waits until the time the user releases his touch and then updates it. How can I achieve this on iOS and Android?

There are multiple tutorials on the internet for achieving this. Basically you have to use a UIRefreshControl. Check this answer or this tutorial.

Related

How to check some change in the Dashboard(Service) and receive the result and perform action accordingly in Mobile App?

I have a requirement something like if the password get changed/User get deleted from the server then on immediate action I should logout from the Mobile Application, I am using Rest Services as back end. The service communication is with Android and iOS Mobile App as Front end.
How to know some operation got reflected in the service which should be like a GCM Service ?
As of now my approach is like for every 5/10 second time interval I am going to hit a service which will give me the updated result so that I can perform some action in my Mobile App, which I feel not a good approach. So I would like to know any best solutions to implement the same.
Looking for some good approach to follow, Thanks.

Why do we need pull to refresh for mobile app?

I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new feeds up there and it can take me to it if i press it, but the pull to refresh functionality is still there. Why?
This is a great question. I'm interpreting it from the perspective of user experience.
Fast Company did an interview with Kevin Systrom a few years ago when Instagram added pull-to-refresh. He wasn't into the idea.
Systrom feels the gesture, which enables mobile users to refresh their photo feeds with a simple tug of the thumb, is a superfluous addition to his app, a relic of another smartphone era. "I don’t believe there should be refresh buttons," he says.
You're right that applications don't need to provide manual refresh capabilities. I'd say that pull-to-refresh and other user initiated actions fall under a category of interfaces that return agency to users, rather than relying on automatic processes to accomplish a task — in this case, refreshing content.
There are a few questions a user might ask if pull-to-refresh was removed from the examples you've given.
How do I get new content?
How often does this content refresh?
Does the user know that the content is automatically kept up-to-date? Do they trust that it's being refreshed quickly and consistently?
Nielsen Norman Group wrote a post late last year about visibility of system status, particularly that progress indicators contribute to a positive user experience by reducing uncertainty. I'd extend this research to pull-to-refresh and related interfaces. Maintaining a user's ability to manually perform an action that fetches new content covers two of Nielsen's ten usability heuristics — visibility of system status and user control and freedom.
In this light, a user who engages pull-to-refresh has a particular mindset: I want the latest data, and I want it now. Necessary or not, allowing them to manually refresh may be contributing to an improved user experience.
FYI: Pull to refresh was first used by Loren Brichter in the app Tweetie 2 which was acquired by Twitter later.
I think his answer to how he had implemented Pull down to refresh
gesture would be an apt answer for you question
Tweetie 2 simply took this idea from Tweetie 1, that reloading was
simply “loading newer”, and “loading newer” put new messages at the
top of the list… and activated the action based on a finger motion
that you were already doing. Why make the user stop scrolling, lift
their finger, then tap a button? Why not have them continue the
gesture that they are already in the process of making? When I want to
see newer stuff, I scroll up. So I made scrolling itself the gesture.
The gesture is only half the battle though, you need appropriate
feedback. Once the reload is activated, the scrollable area of the
list actually changes to leave the feedback UI in-place (rather than
bouncing offscreen). Without this part, the UI is unintuitive. And
once the loading is complete, the UI makes itself disappear.
Reference
It's usually better for a user to choose when to update the the news feed "like on the Social Apps".
Since its not usually good to update the content automatically when the user is still reading it.This can bring about confusion to the user.
And the pull to refresh is a qualified feature for doing the work
Also this is to save mobile data usage especially in countries where internet is expensive
Simple point by considering google's Do and Don't
Swipe-to-Refresh can be used to One-phased loading.We can use other type
progress bars ie , circular etc for loading content for the first
time and load and display all content at once or loading items when
scrolls .
You can understand the purposes clearly by going through this
In my opinion this UI component is an equivalent of refresh button which does not occupy any space and it is user friendly because join scrollable + force refreshing + loading animation + finish event
It is up to app's team to determine should they use it or not based on their possibilities
your question is Awsome.. i have some R&D on it.
see nowadays reach apps never use pull to refresh in android. because android have service that can run in background with wack-lock.
but ios have no background service.
service always consume battery best way when app is open you can one time use service and after than stop service and use swipe to sync or refresh.
hope u get some idea about it.
i have one Link for more about it.see comments that can open you for this point.

How to make an interactive activity which can be updated regularly?

I want to make a UI which can be updated regularly without updating the app itself (I want to make an event announcer meaning that every event the admin make the activity should be updated with the latest event)
Well I have an idea how to do this by making a page on my website and view it using a webview. So my question is? Is there a better way to do that other than this? Will suggest how or just link me to website or even give me a keyword to search it.
Everything is appreciated.
As the question is ambiguous! But look for Handlers.
Define a fixed interval where you can refresh the UI by giving the delayed messages!

Load huge dataset from cloud in my ListView - Android

I have read a lot of SO answers asking a similar question, but I believe my question is different. I have to load around 70-80K records from the cloud and display it to the user in a ListView. A few things that I want to be done :
I don't want to use a load more Button or load more objects when the user scrolls as I have a index from A-Z so the user could start my application and click on Z and the data should be present/available to him.
I have considered pre fetching the data using a splash screen but I was wondering if there is really any other optimised method to fetch such huge data.
I don't want to hang up the UI thread with the Loading progress bar.
I agree that this may be too much to ask for but I am just trying to see if someone has a very efficient way of doing this. I am open to ideas involving modifications in the backend on web service as well, so if you have an efficient way of achieving this using some modifications on the web service, that is also fine for me.
If it helps, look at your default contacts app, it has all the data ready and available to you when you open it. You can directly use the index to navigate to Z section. Just assume the same with 70k entries in the app.
Thanks in advance!
Here is the best solutions I figured out with the help of Tamal Mukherjee and Roman Nurik.
Tamal's solution :
Just load 5-10 rows/letter. Add a 'more' button or handle scroll event and load dynamically. Use SQLite to store data. Use background threads to fill up the db. 
Roman Nurik's soltuion :
With 80k rows, that's well over 1000 items per letter in the alphabet. Seems like you'll need a lot more than letter indexing to make this UI usable. Why not offer filter-as-you-type? That'll result in more HTTP requests but might result in a better UX.
So i guess my implementation will be a combination of the both.
Please follow this step:-
1- Call API on splashscreen using IntentService.
2- Use static broadCasting and save API response into sqlitedb using ORMLite in onRecieve() method of BroadCastReciever.
3- Make sure there should be separate class for receiver.
4- Use Loader Manager for updating ListView.

Updating the app at exactly midnight

Is there a way to cause my app to update itself at exactly midnight every night? I need the new content to be displayed on the app right when it hits midnight. I have an idea of how to accomplish this, but if it isn't in another thread and is in the onCreate and the app is running in the background next time it is opened it would just display the previous info and not the updated?
I could also use help accomplishing this same thing with iPhone as well.
I will clarify a bit. So all the information that is to be displayed on the app will be in the app already. I simply want the content (whats displayed) on the app to randomize and then display the new group of content only once per 24hours or at exactly midnight. Hope that makes it more clear.
Android:
You can set pre-determined times to update with AlarmManager
You can look at a snippet here: Android: How to use AlarmManager
iPhone:
With iPhone you probably have to download the content whenever you re-open the app.
Can't you just have the app update the content upon launch, or when entering the foreground in the appDelegate.
This question is very vague - but if I understand the requirements correctly you will need to serve the application's content dynamically via a content server (or some type of a CDN). In this case there could be various scenarios.
In the easiest possible implementation, you could have the application be powered by data (XML, JSON, etc...) from something like Amazon S3 and have logic within the application to know how to fetch the correct data depending on the current day.
This wouldn't be extremely difficult to implement, but it would require building some type of cross-platform framework that reads the same kind of data for each application.
Is the content available before midnight?
If so, can't you have the app download it in the background beforehand and then make it available exactly at midnight?
If not, there's surely going to be some delay anyway.
app can not update itself at least in iOS apps.

Categories

Resources