Disclaimer: It might not be the solution to your problem.
I faced the same problem. So after reading what you wrote, I searched around for something that would help us.
I solved it by using this: How do you get the current page number of a ViewPager for Android?
On my project, I had a button on each page, that on click would trigger a dialog, this dialog would then get a string from the current position of a cursor.
The position on the cursor didn't match the current page being displayed, because, ViewPager changes the cursor's position to get data to preload pages.
So you need to force the the cursor to move to the correct position, the one you're viewing.
To do that, you use cursor.moveToPosition(viewpager.getCurrentItem()). To make sure the cursor follows what you are viewing.
I hope this helps you.