forked from ryihan/Subrics-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
2,981 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
examples/android/binder/java/io/grpc/binder/cpp/exampleclient/AndroidManifest.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.grpc.binder.cpp.exampleclient" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="29" | ||
android:targetSdkVersion="30" /> | ||
|
||
<queries> | ||
<package android:name="io.grpc.binder.cpp.exampleserver" /> | ||
</queries> | ||
|
||
<application | ||
android:label="gRPC BinderTransport Client Cpp"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="gRPC BinderTransport Client Cpp" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
24 changes: 24 additions & 0 deletions
24
examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/layout/activity_main.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:padding="16dp" | ||
android:orientation="vertical" | ||
android:gravity="center_vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/exampleTextView" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:textSize="32dp" | ||
android:text="@string/thinking_face"/> | ||
|
||
<Button | ||
android:id="@+id/clickMeButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="16dp" | ||
android:text="@string/click_me_button"/> | ||
</LinearLayout> |
5 changes: 5 additions & 0 deletions
5
examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/values/strings.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="click_me_button">Run example</string> | ||
<string name="thinking_face">🤔</string> | ||
</resources> |
21 changes: 21 additions & 0 deletions
21
examples/android/binder/java/io/grpc/binder/cpp/exampleserver/AndroidManifest.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.grpc.binder.cpp.exampleserver" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="29" | ||
android:targetSdkVersion="30" /> | ||
|
||
<application | ||
android:label="gRPC BinderTransport Server Cpp"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="gRPC BinderTransport Server Cpp" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
10 changes: 10 additions & 0 deletions
10
examples/android/binder/java/io/grpc/binder/cpp/exampleserver/AndroidManifest_endpoint.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.grpc.binder.cpp.exampleserver"> | ||
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="30"/> | ||
<application> | ||
<service | ||
android:name=".ExportedEndpointService" | ||
android:exported="true"/> | ||
</application> | ||
</manifest> |
24 changes: 24 additions & 0 deletions
24
examples/android/binder/java/io/grpc/binder/cpp/exampleserver/res/layout/activity_main.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:padding="16dp" | ||
android:orientation="vertical" | ||
android:gravity="center_vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/exampleTextView" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:textSize="32dp" | ||
android:text="@string/thinking_face"/> | ||
|
||
<Button | ||
android:id="@+id/clickMeButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="16dp" | ||
android:text="@string/click_me_button"/> | ||
</LinearLayout> |
5 changes: 5 additions & 0 deletions
5
examples/android/binder/java/io/grpc/binder/cpp/exampleserver/res/values/strings.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="click_me_button">Run example</string> | ||
<string name="thinking_face">🤔</string> | ||
</resources> |
22 changes: 22 additions & 0 deletions
22
examples/android/helloworld/app/src/main/AndroidManifest.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.grpc.helloworldexample.cpp" > | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:allowBackup="false" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/Base.V7.Theme.AppCompat.Light" > | ||
<activity | ||
android:name=".HelloworldActivity" | ||
android:label="@string/app_name" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
86 changes: 86 additions & 0 deletions
86
examples/android/helloworld/app/src/main/res/layout/activity_helloworld.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".HelloworldActivity" | ||
android:orientation="vertical" > | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="12dp" | ||
android:paddingBottom="12dp" | ||
android:textSize="16sp" | ||
android:text="gRPC Client Configuration" | ||
android:textStyle="bold" /> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
<EditText | ||
android:id="@+id/host_edit_text" | ||
android:layout_weight="2" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:hint="Enter Host" /> | ||
<EditText | ||
android:id="@+id/port_edit_text" | ||
android:layout_weight="1" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:inputType="numberDecimal" | ||
android:hint="Enter Port" /> | ||
</LinearLayout> | ||
|
||
|
||
<EditText | ||
android:id="@+id/message_edit_text" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:hint="Enter message to send" /> | ||
|
||
<Button | ||
android:id="@+id/send_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:onClick="sendMessage" | ||
android:text="Send gRPC Request" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="12dp" | ||
android:paddingBottom="12dp" | ||
android:textSize="16sp" | ||
android:text="Response:" /> | ||
|
||
<TextView | ||
android:id="@+id/grpc_response_text" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:scrollbars = "vertical" | ||
android:textSize="16sp" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="12dp" | ||
android:paddingBottom="12dp" | ||
android:textSize="16sp" | ||
android:text="gRPC Server Configuration" | ||
android:textStyle="bold" /> | ||
|
||
<EditText | ||
android:id="@+id/server_port_edit_text" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:hint="Server port" /> | ||
|
||
<Button | ||
android:id="@+id/server_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:onClick="startOrStopServer" | ||
android:text="Start gRPC Server" /> | ||
|
||
</LinearLayout> |
3 changes: 3 additions & 0 deletions
3
examples/android/helloworld/app/src/main/res/values/strings.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">GrpcHelloworldCppExample</string> | ||
</resources> |
6 changes: 6 additions & 0 deletions
6
examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AndroidManifest.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.helloworldxamarin"> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" /> | ||
<application android:label="HelloworldXamarin.Android" android:theme="@style/MainTheme"></application> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
</manifest> |
11 changes: 11 additions & 0 deletions
11
examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/layout/Tabbar.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/sliding_tabs" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorPrimary" | ||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | ||
app:tabIndicatorColor="@android:color/white" | ||
app:tabGravity="fill" | ||
app:tabMode="fixed" /> |
9 changes: 9 additions & 0 deletions
9
examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/layout/Toolbar.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<android.support.v7.widget.Toolbar | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorPrimary" | ||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | ||
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | ||
|
5 changes: 5 additions & 0 deletions
5
...s/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-anydpi-v26/icon.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/launcher_background" /> | ||
<foreground android:drawable="@mipmap/launcher_foreground" /> | ||
</adaptive-icon> |
5 changes: 5 additions & 0 deletions
5
...rp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-anydpi-v26/icon_round.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/launcher_background" /> | ||
<foreground android:drawable="@mipmap/launcher_foreground" /> | ||
</adaptive-icon> |
7 changes: 7 additions & 0 deletions
7
examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/values/colors.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="launcher_background">#FFFFFF</color> | ||
<color name="colorPrimary">#3F51B5</color> | ||
<color name="colorPrimaryDark">#303F9F</color> | ||
<color name="colorAccent">#FF4081</color> | ||
</resources> |
18 changes: 18 additions & 0 deletions
18
examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/values/styles.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<resources> | ||
|
||
<style name="MainTheme" parent="MainTheme.Base"> | ||
<!-- As of Xamarin.Forms 4.6 the theme has moved into the Forms binary --> | ||
<!-- If you want to override anything you can do that here. --> | ||
<!-- Underneath are a couple of entries to get you started. --> | ||
|
||
<!-- Set theme colors from https://aka.ms/material-colors --> | ||
<!-- colorPrimary is used for the default action bar background --> | ||
<!--<item name="colorPrimary">#2196F3</item>--> | ||
<!-- colorPrimaryDark is used for the status bar --> | ||
<!--<item name="colorPrimaryDark">#1976D2</item>--> | ||
<!-- colorAccent is used as the default value for colorControlActivated | ||
which is used to tint widgets --> | ||
<!--<item name="colorAccent">#FF4081</item>--> | ||
</style> | ||
</resources> |
Oops, something went wrong.