简体   繁体   English

我如何创建Android的贴纸包,就像我在iOS for iMessage中一样?

[英]How can I create a sticker pack for Android like I have in iOS for iMessage?

In Xcode (for iOS devices), I can simply click on a button that says "new sticker pack app," and (magic!) there it is, no coding necessary. 在Xcode(适用于iOS设备)中,我只需单击一个显示“新贴纸包应用程序”的按钮,并且(魔术!)就在那里,无需编码。 I just add images to it and upload it to the app store. 我只是添加图像并将其上传到应用商店。 Super simple! 超级简单!

Android now allows for stickers as well through Gboard. Android现在允许贴纸通过Gboard。

However, as far as I can tell, you already need to have a sticker app in order to follow any of the directions I can find for adding it to Gboard. 但是,据我所知,您已经需要一个贴纸应用程序,以便按照我可以找到的任何方向添加到Gboard。 But how do you create a sticker app in the first place? 但是你如何创建一个贴纸应用程序呢?

Take this wonderful line in both the above links: "To kick things off, you'll need to add the Firebase App Indexing library." 在上述两个链接中都可以看到这条美妙的路线:“为了解决问题,您需要添加Firebase应用程序索引库。”

"Add?" “加?” Add to what? 加什么?

I found this and downloaded it, thinking it might be a template or something. 我发现并下载了它,认为它可能是模板或其他东西。 But I couldn't get it to run at all in Android Studio. 但我无法让它在Android Studio中运行。

It does have these awesome instructions: "Get Google-service.json from your firebase project." 它确实有这些非常棒的说明:“从你的firebase项目中获取Google-service.json。”

"Firebase project?" “Firebase项目?” What firebase project? 什么火力棒项目?

How do I create a sticker pack app to which I can "add" the Firebase App Indexing library so that the sticker app will show up on Gboard? 如何创建贴纸包应用程序,我可以“添加”Firebase应用程序索引库,以便贴纸应用程序将显示在Gboard上? It's so easy in iOS! 在iOS中这么容易!

Maybe Firebase has sticker pack templates or something, I thought. 也许Firebase有贴纸包装模板或东西,我想。 But they don't seem to as far as I can tell. 但他们似乎并没有我能说的那么多。

FWIW, I'm not opposed to writing code if necessary. FWIW,我不反对在必要时编写代码。 It would just be nice to have some idea what code needs to be written! 想知道需要编写什么代码真是太好了! And where to put it! 在哪里放!

A link to a start-with-nothing to finish-with-everything-and-upload-to-app-store tutorial would be absolutely fantastic. 链接到一个无所事事的完成 - 所有内容和上传到应用程序商店教程绝对是太棒了。 The only thing I really don't need help with at this point is making the PNGs! 在这一点上我唯一真正需要帮助的就是制作PNG!

Thanks in advance! 提前致谢!

From what I understand of the links you posted, you add the Firebase App Indexing API to your app. 根据我对您发布的链接的了解,您可以将Firebase应用程序索引API添加到您的应用中。 You can do this easiest in Android Studio by going to Tools->Firebase , which will open a drawer to the right. 您可以在Android Studio中通过Tools->Firebase执行此操作,这将打开右侧的抽屉。 In this drawer click on App Indexing and follow the instructions. 在此抽屉中单击App Indexing并按照说明操作。

Basically it adds the Firebase dependencies to your build gradle file and populates the google-service.json which is just a config file with some constants and strings for firebase to work. 基本上它将Firebase依赖项添加到您的构建gradle文件并填充google-service.json,它只是一个配置文件,其中包含一些常量和字符串,以便firebase工作。

Gradle dependency: Gradle依赖:

implementation 'com.google.firebase:firebase-appindexing:16.0.1'

I recommend using the Android Studio assistant. 我建议使用Android Studio助手。 Once this is done your app is now a Firebase project, as it has its own project in the Firebase web app, which is basically a fancy name for an app that is connected with some Google libraries that do cool stuff. 完成此操作后,您的应用程序现在就成为Firebase项目,因为它在Firebase Web应用程序中有自己的项目,这个应用程序基本上是一个花哨的名称,它与一些做酷炫的Google库相关联。

You then can use the library as shown in the docs to index your stickers into the Playstore at first install or update of your app. 然后,您可以使用文档中显示的库,在首次安装或更新应用时将贴纸索引到Playstore。

new Indexable.Builder("Sticker")
   .setName("Bye")
   // add url for sticker asset 
   .setImage("http://www.snoopysticker.com?id=1234")
   // see: Support links to your app content section
   .setUrl("http://sticker/canonical/image/bye")
   // Set the accessibility label for the sticker.
   .setDescription("A sticker for Bye")
   // Add search keywords.
   .put("keywords", "bye", "snoopy", "see ya", "good bye")
   .put("isPartOf",
        new Indexable.Builder("StickerPack")
          .setName("Snoopy Pack")
          .build())
   .build())};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android和iOS中创建贴纸键盘应用 - How to create Sticker Keyboard App in android & IOS 我怎样才能使屏幕具有多个屏幕,如 iOS 或 android 多任务操作 flutter 应用程序 - how can i make screen have multi screens like iOS or android multi tasking action flutter app 如何在Android中像Spotify一样使用选项卡式应用程序? - How can I have a tabbed app in Android like Spotify does? 如何使用特定语言环境(如iOS)打开Android DatePickerDialog - How can I open Android DatePickerDialog with specific locale like iOS [android]如何创建会议等自定义配置文件 - [android]how can i create customize profile like meeting etc 如何在Android中创建像DropBox这样的文件夹列表? - How can i create folders list like DropBox in android? 如何在android studio中创建ui? - How can I create ui like that in android studio? 我如何为Android创建类似于图像的布局? - How I can create layout something like in image for Android? 如何在HTML5中创建像Android这样的模式登录? - How I can create a pattern login like Android in HTML5? 如何为Android应用程序创建类似UI的'Pulse' - How can I create a 'Pulse' like UI for an android application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM