小编Rah*_*hel的帖子

Firebase事件未从Android服务登录

我在我的Android应用程序中有一个音乐流媒体服务,我正在尝试使用基于火灾的事件记录来记录流式音频.我相应地实现了所有内容,我可以从我的活动中查看事件,但不能从我的服务中查看.

我是否遗漏了某些内容或者没有来自服务的firebase支持事件?

public class Player extends Service implements ...{


public FirebaseAnalytics mFirebaseAnalytics;
@Override
public void onCreate() {
    Player.running = true;
    super.onCreate();

    this.startForeground();
    mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
    ...
}
Run Code Online (Sandbox Code Playgroud)

和Logginng一样

Bundle bundle1 = new Bundle();
bundle1.putString(FirebaseAnalytics.Param.VALUE,"song_finished");
mFirebaseAnalytics.logEvent("song_finished", bundle1);
Run Code Online (Sandbox Code Playgroud)

android android-service firebase firebase-analytics

6
推荐指数
1
解决办法
2233
查看次数

如何与牛图的 plot_grid 一起使用

我想将几个 ggplot2 图表组合成一个使用cowplot::plot_grid(). 从它的文档:

?plot
Arguments

... 
List of plots to be arranged into the grid. The plots can be objects of one of the following classes: ggplot, recordedplot, gtable, or alternative can be a function creating a plot when called (see examples).
Run Code Online (Sandbox Code Playgroud)

所以,如果我输入一个 ggplot2 对象列表 plot_grid(),它应该将这些图合并为一个,对吗?

那么为什么这行不通呢?

p1 <- ggplot(mpg, aes(x = cty, y = hwy, colour = factor(cyl))) + 
  geom_point(size=2.5) 
p2 <- ggplot(diamonds, aes(clarity, fill = cut)) + geom_bar() +
  theme(axis.text.x = element_text(angle=70, vjust=0.5))

list(p1, …
Run Code Online (Sandbox Code Playgroud)

r ggplot2 cowplot purrr

1
推荐指数
1
解决办法
1697
查看次数