我像这样使用生态系统.config.js 启动了我的节点应用程序。
pm2 start ecosystem.config.js
我的生态系统.config.js 就在这里。
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps : [
// First application
{
name : "API",
script : "./app/index.js",
env: {
COMMON_VARIABLE: "true"
},
env_production : {
NODE_ENV: "production"
}
},
],
/**
* Deployment section
* http://pm2.keymetrics.io/docs/usage/deployment/
*/
deploy : {
production : {
user : "node",
host : "212.83.163.1",
ref : "origin/master",
repo : "git@github.com:repo.git",
path : "/var/www/production",
"post-deploy" : "npm install && pm2 startOrRestart ecosystem.json …Run Code Online (Sandbox Code Playgroud) 我已经为用户创建了一个动态链接,可以在我的应用中分享一些内容.
当我href在Android设备上使用标记单击HTML页面中的链接时,该链接正在运行.
这意味着,如果未安装该应用程序,请转到Play商店,否则打开应用程序即可收到深层链接地址.
但是当链接在Facebook信使或电子邮件等其他地方完全相同时,我点击链接,然后它就无法正常工作.
即使我的应用已安装,它也始终会重定向到Play商店.
有什么问题?
我的代码在这里.
.java用于接收深层链接
GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this, this)
.addApi(AppInvite.API)
.build();
boolean autoLaunchDeepLink = false;
AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink)
.setResultCallback(
new ResultCallback<AppInviteInvitationResult>() {
@Override
public void onResult(@NonNull AppInviteInvitationResult result) {
if (result.getStatus().isSuccess()) {
// Extract deep link from Intent
Intent intent = result.getInvitationIntent();
String deepLink = AppInviteReferral.getDeepLink(intent);
Log.e("sf", "### deep link : " + deepLink );
} else {
Log.d("asdf", "getInvitation: no deep link found.");
}
}
});
Run Code Online (Sandbox Code Playgroud)AndroidManifest.xml中活动的意图部分
<intent-filter>
<action android:name="android.intent.action.VIEW" /> …Run Code Online (Sandbox Code Playgroud)如果我FirebaseMessaging.getInstance().subscribeToTopic("news")多次致电订阅“新闻”主题,会发生什么?
我花时间寻找它,但是没有。我在MainActivity中使用该方法,因此每次启动应用程序时都会调用该方法。以我的经验,获取推送消息不是问题,而且我还没有发现任何问题。但是我想知道我多次调用它的确切时间。