在我的Android应用程序中,我使用GCM从我的公司服务器接收消息.
我编写了c2dm的代码,并按照说明将代码迁移到GCM.(http://developer.android.com/google/gcm/c2dm.html)
在Android Lollipop(Nexus 9 wifi)中,设备注册推送通知并接收推送注册ID,但是当我从服务器发送消息时,在设备中我没有收到任何消息.
在以前的Android版本(从4.0到4.4)我没有任何问题.
你知道Lollipop推送通知有什么问题吗?
谢谢
我正在我的应用程序中集成华为服务以便在AppGallery中发布。我已经集成了AppUpdateClient https://developer.huawei.com/consumer/en/doc/development/HMS-References/appupdateclient
我已经在 AppGallery 的“开放测试”中发布了我的应用程序。我使用较低版本的代码在发布模式下构建 apk,并将其安装在我的智能手机上。
val client: AppUpdateClient = JosApps.getAppUpdateClient(activity)
client.checkAppUpdate(activity, object : CheckUpdateCallBack {
override fun onUpdateInfo(intent: Intent?) {
val status = intent?.getIntExtra(UpdateKey.STATUS, -1)
...
Run Code Online (Sandbox Code Playgroud)
返回的状态始终为3。华为文档:3:常量值NO_UPGRADE_INFO,表示没有更新信息。
如果我打开 AppGallery,它会通知我该应用程序有更新,如果我单击“更新”,它会成功更新该应用程序。
如何从我的应用程序测试该过程?
我正在开发一个带有芯片的应用程序。
我有一个带有 TextView 和 ChipGroup 的约束布局。芯片以编程方式添加。
这是布局
...
<com.google.android.material.chip.ChipGroup
android:id="@+id/chipGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@android:color/holo_red_dark"
android:gravity="end"
app:layout_constraintBottom_toTopOf="@+id/chartView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/project3">
</com.google.android.material.chip.ChipGroup>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="Pippo"
android:textColor="@color/greenPositive"
app:layout_constraintBottom_toTopOf="@+id/chartView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/project3" />
...
Run Code Online (Sandbox Code Playgroud)
该活动显示为屏幕截图(我在芯片组中放置了红色背景以显示该区域)
如何解决所有这些问题?