Skip to content

Commit

Permalink
Merge pull request #47 from bvlion/fix/update-reject
Browse files Browse the repository at this point in the history
リジェクトに対応する
  • Loading branch information
bvlion authored Feb 11, 2024
2 parents 3452eb8 + cd1e02b commit 1535e55
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 74 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}

plugins {
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'com.android.application' version '8.2.1' apply false
id 'com.android.library' version '8.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
beta ですが、初めてリリースいたします
初リリースとなります
ご愛用のほど、どうぞよろしくお願いいたします!
3 changes: 0 additions & 3 deletions fastlane/metadata/android/ja-JP/changelogs/110000005.txt

This file was deleted.

2 changes: 0 additions & 2 deletions fastlane/metadata/android/ja-JP/changelogs/110000012.txt

This file was deleted.

3 changes: 0 additions & 3 deletions fastlane/metadata/android/ja-JP/changelogs/110000050.txt

This file was deleted.

3 changes: 0 additions & 3 deletions fastlane/metadata/android/ja-JP/changelogs/110000060.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
beta ですが、初めてリリースいたします
ご愛用のほど、どうぞよろしくお願いいたします!
初リリースとなります
ご愛用のほど、どうぞよろしくお願いいたします!
2 changes: 0 additions & 2 deletions fastlane/metadata/android/ja-JP/changelogs/210000060.txt

This file was deleted.

8 changes: 4 additions & 4 deletions fastlane/metadata/android/ja-JP/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
WearLink は スマートフォンでも WearOS のスマートウォッチでも利用できる通信アプリです。
WearLink は スマートフォンでも Wear OS のスマートウォッチでも利用できる通信アプリです。
スマートウォッチではカルーセルから瞬時にカスタム通信を実行できます。

【特徴】
・スマートフォンで通信内容の登録・管理
WearOS のカルーセルからの手軽な実行
Wear OS のカルーセルからの手軽な実行
・実行履歴のスマートフォンへの同期と閲覧

通信の設定から実行、履歴の確認まで、すべてをスムーズに行える WearLink。
スマートウォッチとスマートフォンの組み合わせを最大限に活用し、効率的な操作を実現します。
通信の設定から実行、履歴の確認まで、すべてをスムーズに行える WearLink。
スマートウォッチとスマートフォンの組み合わせを最大限に活用し、効率的な操作を実現します。
新しいスマートウォッチ体験をお楽しみください。
2 changes: 1 addition & 1 deletion fastlane/metadata/android/ja-JP/short_description.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
スマートフォンや、スマートウォッチのカルーセルからカスタム通信を手軽に実行。新しいスマートウォッチ体験を始めよう
スマートフォンや、スマートウォッチのカルーセルからカスタム通信を手軽に実行。新しいスマートウォッチ体験を始めよう
11 changes: 8 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ COMPILE_SDK=33
MIN_SDK=30
TARGET_SDK=33

# VERSION_CODE は workflow の release-alpha.yaml で tail で読み込むので必ず最終行にする
VERSION_NAME=1.0.6
VERSION_CODE=10000060
VERSION_NAME=1.0.0
# VERSION_CODE
# - workflow ? release-alpha.yaml ? tail ???????????????
# - ???????????????
# - 99 ????????????
# - ?? 3 ???????????
# - ????? 3 ??????????
VERSION_CODE=01000000
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 02 16:35:10 JST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:name=".sync.SyncActivity"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop">
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,21 +201,36 @@ class MobileMainViewModel(application: Application) : AndroidViewModel(applicati

fun copyToClipboard(clipboardManager: ClipboardManager, scope: CoroutineScope, scaffoldState: ScaffoldState, isRequestCopy: Boolean) {
val clipData = if (isRequestCopy) {
ClipData.newPlainText(
"request",
savedRequest.value?.parseRequestParams()?.joinToString(",", "[", "]") { it.toJsonString() }
)
savedRequest.value?.let { value ->
ClipData.newPlainText(
"request",
value.parseRequestParams().joinToString(",", "[", "]") { it.toJsonString() }
)
}
} else {
ClipData.newPlainText(
"response",
savedResponse.value.parseResponseParams().joinToString(",", "[", "]") { it.toJsonString() }
)
if (savedResponse.value.isNotEmpty()) {
ClipData.newPlainText(
"response",
savedResponse.value.parseResponseParams()
.joinToString(",", "[", "]") { it.toJsonString() }
)
} else {
null
}
}
scope.launch {
clipboardManager.setPrimaryClip(clipData)
clipData?.let {
scope.launch {
clipboardManager.setPrimaryClip(it)
}
}
scope.launch {
scaffoldState.snackbarHostState.showSnackbar("クリップボードにコピーしました。")
scaffoldState.snackbarHostState.showSnackbar(
if (clipData != null) {
"クリップボードにコピーしました。"
} else {
"エクスポートするデータがありません。"
}
)
}
}

Expand Down
1 change: 1 addition & 0 deletions wear/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ dependencies {
implementation 'androidx.wear.tiles:tiles-material:1.1.0'
def horologist_version = captureVersion(implementation('com.google.android.horologist:horologist-compose-tools:0.3.11'))
implementation "com.google.android.horologist:horologist-tiles:$horologist_version"
implementation 'androidx.core:core-splashscreen:1.0.1'

implementation platform('com.google.firebase:firebase-bom:31.1.1')
implementation 'com.google.firebase:firebase-crashlytics-ktx'
Expand Down
7 changes: 5 additions & 2 deletions wear/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

<meta-data
android:name="com.google.android.wearable.standalone"
android:value="false" />
android:value="true" />

<activity
android:name=".WearMainActivity"
android:exported="true"
android:theme="@android:style/Theme.DeviceDefault">
android:theme="@style/Theme.App.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -30,11 +30,14 @@
<activity
android:name=".httpexecute.HttpExecuteActivity"
android:exported="true"
android:excludeFromRecents="true"
android:launchMode="singleTask"
android:theme="@android:style/Theme.DeviceDefault" />

<activity
android:name=".toast.ToastActivity"
android:exported="false"
android:excludeFromRecents="true"
android:theme="@style/NoAnimationTheme" />

<service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Devices
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.lifecycleScope
import androidx.wear.compose.material.Button
import androidx.wear.compose.material.MaterialTheme
Expand All @@ -24,15 +25,21 @@ import net.ambitious.android.httprequesttile.theme.HttpRequestTileTheme

class WearMainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
super.onCreate(savedInstanceState)
setContent {
WearApp {
AppConstants.startMobileActivity(this, lifecycleScope) {
AppConstants.startMobileActivity(
this,
lifecycleScope,
successProcess = {
Toast.makeText(this, "スマートフォンのアプリを起動しました", Toast.LENGTH_SHORT).show()
}
) {
ConfirmationOverlay()
.setType(ConfirmationOverlay.FAILURE_ANIMATION)
.showOn(this)
}
Toast.makeText(this, "スマートフォンのアプリを起動しました", Toast.LENGTH_SHORT).show()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ object AppConstants {
context: Context,
scope: CoroutineScope,
url: String = "httprequesttile://start",
successProcess: () -> Unit,
errorProcess: () -> Unit = {}
) {
val remoteActivityHelper = RemoteActivityHelper(context)
Expand All @@ -26,6 +27,7 @@ object AppConstants {
.addCategory(Intent.CATEGORY_BROWSABLE)
.setData(Uri.parse(url))
).await()
successProcess()
} catch (e: Exception) {
errorProcess()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class MainTileService : SuspendingTileService() {

private val savedRequest = MutableStateFlow<String?>("")

private val render by lazy { LinkTileRenderer(this) }

override fun onCreate() {
super.onCreate()
lifecycleScope.launch(Dispatchers.IO) {
Expand All @@ -42,45 +44,51 @@ class MainTileService : SuspendingTileService() {
override suspend fun tileRequest(requestParams: RequestBuilders.TileRequest): TileBuilders.Tile {
when (requestParams.state?.lastClickableId) {
AppConstants.START_MOBILE_ACTIVITY -> {
AppConstants.startMobileActivity(this, lifecycleScope) {
startActivity(
Intent(this, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "スマートフォンのアプリがインストールされていません")
)
AppConstants.startMobileActivity(
this,
lifecycleScope,
successProcess = {
startActivity(
Intent(this, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "スマートフォンのアプリを呼び出します")
)
}
) {
showNotFindMobileToast()
}
startActivity(
Intent(this, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "スマートフォンのアプリを呼び出します")
)
AppAnalytics.logEvent(AppAnalytics.EVENT_TILE_HEADER_TAP)
}
AppConstants.SYNC_STORE_DATA -> {
lifecycleScope.launch(Dispatchers.IO) {
AppConstants.startMobileActivity(this@MainTileService, lifecycleScope, "httprequesttile://sync")
delay(500)
WearMobileConnector(this@MainTileService)
.sendMessageToMobile(
WearMobileConnector.MOBILE_REQUEST_SYNC_PATH,
successProcess = {
startActivity(
Intent(this@MainTileService, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "同期しました")
)
}
) {
startActivity(
Intent(this@MainTileService, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "スマートフォンが見つかりませんでした")
)
AppConstants.startMobileActivity(
this,
lifecycleScope,
"httprequesttile://sync",
{
lifecycleScope.launch(Dispatchers.IO) {
delay(500)
WearMobileConnector(this@MainTileService)
.sendMessageToMobile(
WearMobileConnector.MOBILE_REQUEST_SYNC_PATH,
successProcess = {
startActivity(
Intent(this@MainTileService, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "同期しました")
)
}
) {
showNotFindMobileToast()
}
}
}
) {
showNotFindMobileToast()
}
AppAnalytics.logEvent(AppAnalytics.EVENT_TILE_SYNC_TAP)
}
}

return render.renderTimeline(
LinkTileState(
savedRequest.value?.let {
Expand All @@ -95,7 +103,12 @@ class MainTileService : SuspendingTileService() {
)
}

private val render by lazy { LinkTileRenderer(this) }
private fun showNotFindMobileToast() =
startActivity(
Intent(this, ToastActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(ToastActivity.EXTRA_TOAST_MESSAGE, "スマートフォンが見つかりませんでした")
)

companion object {
fun tileUpdate(context: Context) {
Expand Down
8 changes: 8 additions & 0 deletions wear/src/main/res/drawable/splash_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="48dp"
android:height="48dp"
android:drawable="@mipmap/ic_launcher_round"
android:gravity="center" />
</layer-list>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@
<item name="android:activityCloseEnterAnimation">@null</item>
<item name="android:activityCloseExitAnimation">@null</item>
</style>

<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@android:color/black</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_screen</item>
<item name="postSplashScreenTheme">@android:style/Theme.DeviceDefault</item>
</style>
</resources>

0 comments on commit 1535e55

Please sign in to comment.