This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (row.Platform) | |
{ | |
case "iOS": | |
if ((row.DeviceId.Length & 1) != 0) | |
continue; // deviceid is odd length; what sorcery is this hex that has half a byte? | |
string payload = String.Format("{{'aps':{{'alert':'This is a push notification'}},'envId':'{0}'}}", envId); | |
BinaryWriter bw = new BinaryWriter(PushConnection); | |
bw.Write((byte)0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { | |
NSLog(@"My token is: %@", deviceToken); | |
} | |
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { | |
NSLog(@"Failed to get token, error: %@", error); | |
} | |
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { | |
NSLog(@"Received remote notification: %@", userInfo); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Projects $git pull --rebase | |
remote: Counting objects: 60, done | |
remote: Finding sources: 100% (41/41) | |
remote: Getting sizes: 100% (23/23) | |
remote: Compressing objects: 100% (4/4) | |
remote: Total 41 (delta 29), reused 38 (delta 29) | |
Unpacking objects: 100% (41/41), done. | |
From https://devtools:8443/git/iOS | |
e71b698..8c51472 master -> origin/master | |
First, rewinding head to replay your work on top of it... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Projects/android-source/bionic/libc/kernel/common/linux $git checkout -f HEAD | |
~/Projects/android-source/bionic/libc/kernel/common/linux $git status | |
# Not currently on any branch. | |
# Changes not staged for commit: | |
# (use "git add <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# modified: netfilter/xt_CONNMARK.h | |
# modified: netfilter/xt_MARK.h | |
# modified: netfilter_ipv6/ip6t_HL.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginActivityTest extends ActivityInstrumentationTestCase2<LoginActivity> { | |
public static final String EMAIL = "[email protected]"; | |
public static final String PASSWORD = "testpassword"; | |
public static final String LOGIN_BUTTON = "Login"; | |
public static final String LOGGING_IN = "Logging in..."; | |
public static final String HOME_ACTIVITY = "HomeActivity"; | |
private Solo m_Solo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSArray *)stepsToShowCompanyTitle{ | |
NSString *companyTitle = [NSString stringWithFormat:@"%@\n%@", TEST_USER_TITLE, TEST_USER_COMPANY]; | |
NSMutableArray *steps = [NSMutableArray array]; | |
[steps addObject:[KIFTestStep stepToToggleSwitchOn:SHOW_COMPANY_SWITCH_LABEL]]; | |
[steps addObject:[KIFTestStep stepToWaitForAbsenceOfViewWithAccessibilityLabel:USER_COMPANY_TEXT value:TEST_USER_EMAIL traits:UIAccessibilityTraitStaticText]]; | |
[steps addObject:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:USER_COMPANY_TEXT value:companyTitle traits:UIAccessibilityTraitStaticText]]; | |
return steps; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginActivityTest extends ActivityInstrumentationTestCase2<HomeActivity> { | |
public static final String EMAIL = "[email protected]"; | |
public static final String PASSWORD = "dstest"; | |
public static final String LOGIN_BUTTON = "Sign In"; | |
public static final String LOGGING_IN = "Signing In..."; | |
public static final String HOME_ACTIVITY = "HomeActivity"; | |
private Solo m_Solo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testLogin() { | |
if (!waitForActivity(LoginActivity.class, Timeouts.SHORT)) { | |
assertActivityShown(HomeActivity.class, Timeouts.NOW); | |
clickImageView(R.id.home_image_logout); | |
} | |
assertActivityShown(LoginActivity.class); | |
EditText email = getEditText(R.id.login_email); | |
EditText password = getEditText(R.id.login_password); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2006 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$TEST_PLATFORMS" = "single" ] then | |
AVDS=4.0-hdpi-normal | |
elif [ "$TEST_PLATFORMS" = "full" ] then | |
AVDS=`$ANDROID list avds -c` | |
fi |
OlderNewer