- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在研究将推送通知发送到 native 应用程序并阅读 expo 文档的方法,我被两条似乎相互矛盾的信息弄糊涂了。
Notifications will appear in the system notification tray as you've come to expect, and tapping them will open/foreground the app.
(来源:https://docs.expo.io/versions/latest/guides/push-notifications)
但是在“为什么不展览”一节中指出:
Expo apps don't support background code execution (running code when the app is not foregrounded or the device is sleeping). This means you cannot use background geolocation, play audio in the background, handle push notifications in the background, and more.
(来源:https://docs.expo.io/versions/latest/introduction/why-not-expo)
这似乎自相矛盾,因为“前景化”或“打开”应用程序意味着它在我看来是在后台运行。
最后我想用这个更改应用程序图标的通知角标(Badge),但鉴于此信息,我不清楚这是否可能?在 IOS 和 Android 中?
最佳答案
确实前台应用程序听起来好像应用程序在后台主动运行,因此可以运行代码,但正如文档所述,这目前不可行单独的世博会。这意味着无法在应用程序处于后台时更改角标(Badge)计数。
另一方面,当应用程序在前台或通知正在打开时,根据 this table in the documentation 这变得可行。 .
在 iOS 上设置任意角标(Badge)计数可以用 Notifications.setBadgeNumberAsync(number)
完成,而对于 Android the only option available是使发送的推送通知计入给定 channel 的角标(Badge)计数。
关于android - 在后台和前台使用 Expo 更改推送通知中的角标(Badge)计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52567251/
我正在尝试设置 React 和 Expo monorepo 项目,一切似乎都很好,直到我想安装 react-navigation与 expo install根据 react-navigation 文档
我正在使用 expo-cli@3.0.10 此应用程序在安装在设备中的客户端博览会中运行良好 最佳答案 好的,我相信我找到了核心问题 - DNS 问题 . 无论您使用的是 Mac OS、Windows
如何在开发过程中获取重定向到 expo 应用程序的链接? 我有一个 React Native Expo 应用程序。在开发过程中以 èxpo start 开始。现在我喜欢使用 OAuth 2.0 身份验
为什么EXPO有两种通过Google进行身份验证的方式? 我不清楚expo-google-app-auth和expo-google-sign-in之间有什么区别。 在什么场合我应该使用哪一个? 最佳答
我正在使用 React Native 进行编码。当我第一次创建用于检查运行的 react native 应用程序时,我没有看到这一点。当我实现我的代码时看到这一点。我的目的是生成apk。 app.js
我已经在全局范围内安装了 expo-cli,但是当我尝试运行任何 expo 代码时,例如 expo start从任何地方,我得到:zsh: command not found: expoecho $P
我是react-native新手,我安装了expo,如下官方页面中提到的。 npm install expo-cli --global expo init my-new-project cd my-n
根据 Expo documentation with SQLite 我会这样查询: tx.executeSql(sqlStatement, arguments, success, error) 我是这
很多次我在启动 expo 项目后收到以下信息消息,似乎无法升级 expo-cli: 有一个新版本的 expo-cli 可用 (4.2.1)。您目前正在使用 expo-cli 3.28.0 使用您选择的
我已经使用 Expo 构建了一个应用程序,现在由于某些原因我想使用 expo eject 从 expo cli 中弹出该应用程序。我还能使用 Expo 套餐吗? 最佳答案 是的,Expo 包应该可以。
部署我的 Expo 网络项目时,我需要将一个文件添加到网络根目录(一个 Apple App 站点关联文件)。 Expo 开箱即用地支持此功能吗? 最佳答案 您所要做的就是在项目的根目录中创建一个名为“
我需要有关 expo xde 的帮助。 创建项目后,当我扫描二维码时,出现以下错误: there was a problem loading the experience. It looks like
我使用create-react-native-app创建了react-native项目。在此,我从 expo 导入权限模块, import {Permissions} from "expo"; 后来我
例如,如果我有组件: import React, { Component } from 'react'; import { Video } from 'expo'; let styles = requ
我将使用 Expo 制作一个应用程序,并与客户分享初步结果。我想告诉他们,这个世博应用程序反射(reflect)了最终的应用程序,它将作为独立的应用程序供我客户的客户一对一使用。 该应用程序的功能将是
When I run a Snack in the Expo Go app, is it doing anything more sophisticated than downloading t
我刚刚从 React 导航 5 升级到 6 并查看了 the doc for transparent modals .不幸的是,我无法让之前的屏幕显示在模态下。相反,我得到一个灰色背景。 我用我的代码
我尝试通过 expo 构建应用程序但失败了,我尝试重新安装 expo-cli。所以,我输入了下面的代码来删除 expo-cli。 npm -g uninstall expo-cli --save 和
我正在尝试运行我的 react-native 应用程序,我在 android 模拟器和我的手机 HUAWEI Y3II 上运行它,同样的事情发生了。 几天前我工作得很好,但突然这个错误不断出现:Cou
在 Expo 网络项目中是否有推荐的代码拆分方法? 我在文档中找不到任何内容,即使在网页性能页面上:https://docs.expo.io/guides/web-performance/ 我很惊讶,
我是一名优秀的程序员,十分优秀!