Skip to content

Commit 570fd3c

Browse files
committed
initial commit
1 parent b3a0bcf commit 570fd3c

27 files changed

+1723
-193
lines changed

CONTRIBUTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
# How to become a contributor and submit your own code
3+
4+
## Contributor License Agreements
5+
6+
We'd love to accept your sample apps and patches! Before we can take them, we
7+
have to jump a couple of legal hurdles.
8+
9+
Please fill out either the individual or corporate Contributor License Agreement
10+
(CLA).
11+
12+
* If you are an individual writing original source code and you're sure you
13+
own the intellectual property, then you'll need to sign an [individual CLA]
14+
(http://code.google.com/legal/individual-cla-v1.0.html).
15+
* If you work for a company that wants to allow you to contribute your work,
16+
then you'll need to sign a [corporate CLA]
17+
(http://code.google.com/legal/corporate-cla-v1.0.html).
18+
19+
Follow either of the two links above to access the appropriate CLA and
20+
instructions for how to sign and return it. Once we receive it, we'll be able to
21+
accept your pull requests.
22+
23+
## Contributing a Patch
24+
25+
1. Sign a Contributor License Agreement, if you have not yet done so (see
26+
details above).
27+
1. Create your change to the repo in question.
28+
* Fork the desired repo, develop and test your code changes.
29+
* Ensure that your code is clear and comprehensible.
30+
* Ensure that your code has an appropriate set of unit tests which all pass.
31+
1. Submit a pull request.
32+
1. The repo owner will review your request. If it is approved, the change will
33+
be merged. If it needs additional work, the repo owner will respond with
34+
useful comments.
35+
36+
## Contributing a New Sample App
37+
38+
1. Sign a Contributor License Agreement, if you have not yet done so (see
39+
details above).
40+
1. Create your own repo for your app following this naming convention:
41+
* mirror-{app-name}-{language or plaform}
42+
* apps: quickstart, photohunt-server, photohunt-client
43+
* example: mirror-quickstart-android
44+
* For multi-language apps, concatenate the primary languages like this:
45+
mirror-photohunt-server-java-python.
46+
47+
1. Create your sample app in this repo.
48+
* Be sure to clone the README.md, CONTRIBUTING.md and LICENSE files from the
49+
googlecast repo.
50+
* Ensure that your code is clear and comprehensible.
51+
* Ensure that your code has an appropriate set of unit tests which all pass.
52+
* Instructional value is the top priority when evaluating new app proposals for
53+
this collection of repos.
54+
1. Submit a request to fork your repo in googlecast organization.
55+
1. The repo owner will review your request. If it is approved, the sample will
56+
be merged. If it needs additional work, the repo owner will respond with
57+
useful comments.

HelloTextGoogleCast.xcodeproj/project.pbxproj

Lines changed: 536 additions & 0 deletions
Large diffs are not rendered by default.

HelloTextGoogleCast.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="Hf5-0g-O9I">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="tne-QT-ifu">
9+
<objects>
10+
<viewController id="BYZ-38-t0r" customClass="HTGCViewController" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="vbw-e2-S4e"/>
13+
<viewControllerLayoutGuide type="bottom" id="ojj-zs-jpt"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
16+
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<subviews>
19+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Hello Text Google Cast" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hyc-qg-cdT">
20+
<rect key="frame" x="255" y="121" width="259" height="32"/>
21+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
22+
<fontDescription key="fontDescription" type="system" pointSize="25"/>
23+
<nil key="highlightedColor"/>
24+
</label>
25+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tiq-WJ-goN">
26+
<rect key="frame" x="333" y="199" width="103" height="30"/>
27+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
28+
<state key="normal" title="Update Screen">
29+
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
30+
</state>
31+
<connections>
32+
<action selector="sendText:" destination="BYZ-38-t0r" eventType="touchUpInside" id="9Ww-Lp-PNb"/>
33+
</connections>
34+
</button>
35+
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Type Message Here" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="JzL-Qh-ggI">
36+
<rect key="frame" x="259" y="161" width="251" height="30"/>
37+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
38+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
39+
<textInputTraits key="textInputTraits"/>
40+
</textField>
41+
</subviews>
42+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
43+
</view>
44+
<navigationItem key="navigationItem" id="8O0-da-TSY"/>
45+
<connections>
46+
<outlet property="messageTextField" destination="JzL-Qh-ggI" id="Gy2-Vo-1Ra"/>
47+
</connections>
48+
</viewController>
49+
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
50+
</objects>
51+
<point key="canvasLocation" x="764" y="-210"/>
52+
</scene>
53+
<!--Navigation Controller-->
54+
<scene sceneID="Aoi-Fe-RPa">
55+
<objects>
56+
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Hf5-0g-O9I" sceneMemberID="viewController">
57+
<toolbarItems/>
58+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="i77-X3-jSv">
59+
<rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
60+
<autoresizingMask key="autoresizingMask"/>
61+
</navigationBar>
62+
<nil name="viewControllers"/>
63+
<connections>
64+
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="4i6-a2-7dZ"/>
65+
</connections>
66+
</navigationController>
67+
<placeholder placeholderIdentifier="IBFirstResponder" id="cWg-ah-uBk" userLabel="First Responder" sceneMemberID="firstResponder"/>
68+
</objects>
69+
<point key="canvasLocation" x="-125" y="-210"/>
70+
</scene>
71+
</scenes>
72+
<simulatedMetricsContainer key="defaultSimulatedMetrics">
73+
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
74+
<simulatedOrientationMetrics key="orientation"/>
75+
<simulatedScreenMetrics key="destination"/>
76+
</simulatedMetricsContainer>
77+
</document>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="OZs-zg-aY1">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="ufC-wZ-h7g">
9+
<objects>
10+
<viewController id="vXZ-lx-hvc" customClass="HTGCViewController" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="eeE-2p-ofO"/>
13+
<viewControllerLayoutGuide type="bottom" id="Nse-IL-vuQ"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
16+
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
17+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18+
<subviews>
19+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Hello Text Google Cast" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3E4-Gn-EzI">
20+
<rect key="frame" x="33" y="88" width="253" height="30"/>
21+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
22+
<fontDescription key="fontDescription" type="system" pointSize="25"/>
23+
<nil key="highlightedColor"/>
24+
</label>
25+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="I8Z-Yb-nKl">
26+
<rect key="frame" x="102" y="164" width="115" height="33"/>
27+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
28+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
29+
<state key="normal" title="Update Screen">
30+
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
31+
</state>
32+
<connections>
33+
<action selector="sendText:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="lym-9O-zHJ"/>
34+
</connections>
35+
</button>
36+
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Type Message Here" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="j8p-Q3-mRU">
37+
<rect key="frame" x="37" y="126" width="251" height="30"/>
38+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
39+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
40+
<textInputTraits key="textInputTraits"/>
41+
</textField>
42+
</subviews>
43+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
44+
</view>
45+
<navigationItem key="navigationItem" id="6Tv-e1-7Xf"/>
46+
<connections>
47+
<outlet property="messageTextField" destination="j8p-Q3-mRU" id="rUg-9f-GrJ"/>
48+
</connections>
49+
</viewController>
50+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
51+
</objects>
52+
<point key="canvasLocation" x="2730" y="478"/>
53+
</scene>
54+
<!--Navigation Controller-->
55+
<scene sceneID="cYH-x5-Yhv">
56+
<objects>
57+
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="OZs-zg-aY1" sceneMemberID="viewController">
58+
<toolbarItems/>
59+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="MzP-dE-XWP">
60+
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
61+
<autoresizingMask key="autoresizingMask"/>
62+
</navigationBar>
63+
<nil name="viewControllers"/>
64+
<connections>
65+
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="YmZ-bY-WXu"/>
66+
</connections>
67+
</navigationController>
68+
<placeholder placeholderIdentifier="IBFirstResponder" id="MoR-Tm-TH5" userLabel="First Responder" sceneMemberID="firstResponder"/>
69+
</objects>
70+
<point key="canvasLocation" x="2230" y="491"/>
71+
</scene>
72+
</scenes>
73+
<simulatedMetricsContainer key="defaultSimulatedMetrics">
74+
<simulatedStatusBarMetrics key="statusBar"/>
75+
<simulatedOrientationMetrics key="orientation"/>
76+
<simulatedScreenMetrics key="destination" type="retina4"/>
77+
</simulatedMetricsContainer>
78+
</document>

HelloTextGoogleCast/HTGCAppDelegate.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2014 Google Inc. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import <UIKit/UIKit.h>
16+
17+
@interface HTGCAppDelegate : UIResponder<UIApplicationDelegate>
18+
19+
@property(strong, nonatomic) UIWindow *window;
20+
21+
@end

HelloTextGoogleCast/HTGCAppDelegate.m

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2014 Google Inc. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import "HTGCAppDelegate.h"
16+
17+
@implementation HTGCAppDelegate
18+
19+
- (BOOL)application:(UIApplication *)application
20+
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
21+
// Override point for customization after application launch.
22+
return YES;
23+
}
24+
25+
- (void)applicationWillResignActive:(UIApplication *)application {
26+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
27+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
28+
}
29+
30+
- (void)applicationDidEnterBackground:(UIApplication *)application {
31+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33+
}
34+
35+
- (void)applicationWillEnterForeground:(UIApplication *)application {
36+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
37+
}
38+
39+
- (void)applicationDidBecomeActive:(UIApplication *)application {
40+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
41+
}
42+
43+
- (void)applicationWillTerminate:(UIApplication *)application {
44+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
45+
}
46+
47+
@end

HelloTextGoogleCast/HTGCTextChannel.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2014 Google Inc. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import <GoogleCast/GoogleCast.h>
16+
#import <Foundation/Foundation.h>
17+
18+
@interface HTGCTextChannel : GCKCastChannel
19+
20+
@end

HelloTextGoogleCast/HTGCTextChannel.m

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2014 Google Inc. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import "HTGCTextChannel.h"
16+
17+
@implementation HTGCTextChannel
18+
19+
- (void)didReceiveTextMessage:(NSString*)message {
20+
NSLog(@"received message: %@", message);
21+
}
22+
23+
@end

0 commit comments

Comments
 (0)