Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-11178]Implementation for Autopause API. #3963

Merged
merged 3 commits into from Mar 18, 2013

Conversation

srahim
Copy link
Contributor

@srahim srahim commented Mar 13, 2013

Testing Instruction

** Make an app with the following code app.js
** add location into the backgroundmodes in tiapp.xml

<ios>
<plist>
<dict>
  <key>UIBackgroundModes</key>
  <array>
    <string>location</string>
  </array>
</dict>
</plist>
</ios>

** By default i have set the autopause to be false.

TEST 1
** Put the app in background .
** Move around for a bit and ensure you receive location update
** Now put the phone on the table and leave it for a while(say 20-30 to be sure)
** Verify that location update paused is not fired.

TEST 2

** Open the same app.
** Switch the puaseLocationUpdatesAutomatically to true(0N)
** Put the app in background.
** Move around for a bit and ensure you receive location update
** Now put the phone on the table and leave it for a while(say 20-30 to be sure).
** Verify that location update paused is fired.
** Once the location paused event is fired. Now open the app and move around.
** Ensure that the location update resumed event is fired and the app continues to receive location updates.

If there is any confusion while testing let me know.

-(void)setActivityType:(NSNumber *)value
{
if ([TiUtils isIOS6OrGreater]) {
ENSURE_UI_THREAD(setActivityType,value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do want to wean away from ENSURE_UI_THREAD, as it means a lot more than needed is done. Consider TiThreadPerformOnMainThread.

@WhichKatieDid
Copy link
Contributor

Minor style quibbles, but nothing wrong logically in CR.

@srahim
Copy link
Contributor Author

srahim commented Mar 14, 2013

Code Updated ... Ready for review again.

@WhichKatieDid
Copy link
Contributor

CR passed, FR inconclusive, but that may be due to the nature of the beast.

@WhichKatieDid
Copy link
Contributor

Talked with Srahim, later test (with same code!) generated pause events. This may be one that's difficult to test, going on the whims of the OS. Either way, FR finally passed.

WhichKatieDid added a commit that referenced this pull request Mar 18, 2013
[TIMOB-11178]Implementation for Autopause API.
@WhichKatieDid WhichKatieDid merged commit 670ee3d into tidev:master Mar 18, 2013
@srahim srahim deleted the timob-11178 branch March 18, 2013 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants