我有Notification Service Extension的问题.我已按照一步一步的文档 https://developer.xamarin.com/guides/ios/platform_features/introduction-to-ios10/user-notifications/enhanced-user-notifications/#Working_with_Service_Extensions
为了实现,我已经这样做了.
这是我的NotificationService代码:
using System;
using Foundation;
using UserNotifications;
namespace NotificationServiceExtension
{
[Register("NotificationService")]
public class NotificationService : UNNotificationServiceExtension
{
Action<UNNotificationContent> ContentHandler { get; set; }
UNMutableNotificationContent BestAttemptContent { get; set; }
const string ATTACHMENT_IMAGE_KEY = "ll_attachment_url";
const string ATTACHMENT_TYPE_KEY = "ll_attachment_type";
const string ATTACHMENT_FILE_NAME = "-localytics-rich-push-attachment.";
protected NotificationService(IntPtr handle) : base(handle)
{
// Note: this .ctor should …
Run Code Online (Sandbox Code Playgroud) 是否可以以编程方式为Localytics设置应用密钥?从集成指南(https://support.localytics.com/Android_SDK_integration),您似乎必须将它在清单文件中设置为元数据.
<meta-data android:name="LOCALYTICS_APP_KEY" android:value="APP KEY FROM STEP 2"/>
Run Code Online (Sandbox Code Playgroud)
从以下帖子看,似乎无法动态设置Android元数据.如何动态添加元数据(不在清单中但在代码内)?
我希望能够根据Gradle buildType动态设置应用程序密钥,这样我就可以拥有一个发布应用程序密钥和一个调试应用程序密钥.
我已经集成了Localtyics iOS SDK.在此之后我得到如下错误:无法转换类型'LLAppDelegateProxy'的值
这意味着我无法获得App委托对象的引用.我现在遇到了麻烦,因为我想要Localytics并想要一个App委托的参考对象.
有没有人知道这个解决方案?
我好奇是什么导致了这个?我正在接受某人的代码并使用名为localytics的第三方分析软件.我正在尝试导入他们的.jar文件,并在我用它创建虚拟应用程序时取得了成功.问题是尝试将其与当前的应用程序集成.以前的开发人员已经创建了自己的jar文件实现,我无法更改(时间敏感).
谁能告诉我为什么.jar文件在android studio中是红色的?