当前位置:   article > 正文

个推_个推 cid in blacklist

个推 cid in blacklist

一、导入service和xml

 

二、Activity

  1. public class MainActivity extends AppCompatActivity {
  2. // DemoPushService.class 自定义服务名称, 核心服务
  3. private Class userPushService = DemoPushService.class;
  4. @Override
  5. protected void onCreate(Bundle savedInstanceState) {
  6. super.onCreate(savedInstanceState);
  7. setContentView(R.layout.activity_main);
  8. PushManager.getInstance().initialize(this.getApplicationContext(), userPushService);
  9. PushManager.getInstance().registerPushIntentService(this.getApplicationContext(), DemoIntentService.class);
  10. }
  11. }

三、清单文件

  1. <service android:name=".DemoIntentService"/>
  2. <service
  3. android:name=".DemoPushService"
  4. android:exported="true"
  5. android:label="PushService"
  6. android:process=":pushservice">
  7. </service>

四、values

  1. <string name="no_clientid">(none)</string>
  2. <string name="start">已启动</string>
  3. <string name="clientid">clientid&#160;=&#160;</string>
  4. <string name="stop">已停止</string>
  5. <string name="clear">清除日志</string>
  6. <string name="enablelog">开启debug日志</string>
  7. <string name="bindcell">绑定手机号</string>
  8. <string name="pmsg">透传测试</string>
  9. <string name="psmsg">通知栏测试</string>
  10. <string name="transmit">透传内容</string>
  11. <string name="begin">开始(h)</string>
  12. <string name="end">结束</string>
  13. <string name="duration">持续时间(h)</string>
  14. <string name="set_heartbeat">心跳间隔(s)</string>
  15. <string name="send_msg">发送消息</string>
  16. <string name="bind_alias">绑定别名</string>
  17. <string name="bind_alias_unknown_exception">绑定别名失败,未知异常</string>
  18. <string name="bind_alias_success">绑定别名成功</string>
  19. <string name="bind_alias_error_frequency">绑定别名失败,请求频次超限</string>
  20. <string name="bind_alias_error_param_error">绑定别名失败,参数错误</string>
  21. <string name="bind_alias_error_request_filter">绑定别名失败,请求被过滤</string>
  22. <string name="bind_alias_error_cid_lost">绑定别名失败,未获取到cid</string>
  23. <string name="bind_alias_error_connect_lost">绑定别名失败,网络错误</string>
  24. <string name="bind_alias_error_alias_invalid">绑定别名失败,别名无效</string>
  25. <string name="bind_alias_error_sn_invalid">绑定别名失败,sn无效</string>
  26. <string name="unbind_alias">解绑别名</string>
  27. <string name="unbind_alias_unknown_exception">取消绑定别名失败,未知异常</string>
  28. <string name="unbind_alias_success">取消绑定别名成功</string>
  29. <string name="unbind_alias_error_frequency">取消绑定别名失败,请求频次超限</string>
  30. <string name="unbind_alias_error_param_error">取消绑定别名失败,参数错误</string>
  31. <string name="unbind_alias_error_request_filter">取消绑定别名失败,请求被过滤</string>
  32. <string name="unbind_alias_error_cid_lost">取消绑定别名失败,未获取到cid</string>
  33. <string name="unbind_alias_error_connect_lost">取消绑定别名失败,网络错误</string>
  34. <string name="unbind_alias_error_alias_invalid">取消绑定别名失败,别名无效</string>
  35. <string name="unbind_alias_error_sn_invalid">取消绑定别名失败,sn无效</string>
  36. <string name="add_tag">添加标签</string>
  37. <string name="add_tag_unknown_exception">设置标签失败,未知异常</string>
  38. <string name="add_tag_success">接口调用成功</string>
  39. <string name="add_tag_error_count">接口调用失败, tag数量过大, 最大不能超过200</string>
  40. <string name="add_tag_error_frequency">设置标签失败,频率过快</string>
  41. <string name="add_tag_error_null">接口调用失败, tag 为空</string>
  42. <string name="add_tag_error_repeat">设置标签失败, 标签重复</string>
  43. <string name="add_tag_error_unbind">设置标签失败, 服务未初始化成功</string>
  44. <string name="add_tag_error_not_online">还未登陆成功</string>
  45. <string name="add_tag_error_black_list">该应用已经在黑名单中,请联系售后支持!</string>
  46. <string name="add_tag_error_exceed">已存 tag 超过限制</string>
  47. <string name="version">版本号</string>
  48. <string name="silentime">静默时间</string>
  49. <string name="getclientid">获取cid</string>
  50. <string name="confirm">确定</string>
  51. <string name="cancel">取消</string>
  52. <string name="exit">退出</string>
  53. <string name="appid">appid&#160;=&#160;</string>
  54. <string name="appkey">appkey&#160;=&#160;</string>
  55. <string name="appsecret">appsecret&#160;=&#160;</string>
  56. <string name="mastersecret">mastersecret&#160;=&#160;</string>
  57. <string name="show_version">当前sdk版本&#160;=&#160;</string>
  58. <string name="show_cid">当前应用的cid&#160;=&#160;</string>
  59. <string name="set_silenttime">设置静默时间段</string>
  60. <string name="push_notification_title">通知栏测试</string>
  61. <string name="push_notification_msg_title">通知栏测试</string>
  62. <string name="push_notification_msg_content">您收到一条测试消息,点击访问</string>
  63. <string name="push_transmission_data">收到一条透传测试消息</string>
  64. <string name="network_invalid">对不起,当前网络不可用!</string>

五、

  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. google()
  5. jcenter()
  6. maven {
  7. url 'https://maven.google.com/'
  8. name 'Google'
  9. }
  10. }
  11. dependencies {
  12. classpath 'com.android.tools.build:gradle:3.2.0'
  13. // NOTE: Do not place your application dependencies here; they belong
  14. // in the individual module build.gradle files
  15. }
  16. }
  17. allprojects {
  18. repositories {
  19. google()
  20. jcenter()
  21. maven {
  22. url 'https://maven.google.com/'
  23. name 'Google'
  24. }
  25. }
  26. }
  27. task clean(type: Delete) {
  28. delete rootProject.buildDir
  29. }
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion 28
  4. defaultConfig {
  5. applicationId "bwie.com.exception"
  6. minSdkVersion 21
  7. targetSdkVersion 28
  8. versionCode 1
  9. versionName "1.0"
  10. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  11. manifestPlaceholders = [
  12. GETUI_APP_ID : "ns1Hog4w4p6g7jrSeOHeZ8",
  13. GETUI_APP_KEY : "ZE2SKvnO7B6mhJZEY8r687",
  14. GETUI_APP_SECRET : "pU0o50B6ij9pqS6ZejPp83"
  15. ]
  16. }
  17. buildTypes {
  18. release {
  19. minifyEnabled true
  20. shrinkResources true
  21. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  22. }
  23. packagingOptions {
  24. exclude 'META-INF/LICENSE.txt'
  25. exclude 'META-INF/NOTICE.txt'
  26. }
  27. }
  28. }
  29. dependencies {
  30. implementation fileTree(dir: 'libs', include: ['*.jar'])
  31. implementation 'com.android.support:appcompat-v7:28.0.0'
  32. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  33. testImplementation 'junit:junit:4.12'
  34. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  35. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  36. implementation 'com.getui:sdk:2.13.0.0'
  37. implementation 'com.android.support:support-v4:28.0.0'
  38. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/274606?site
推荐阅读
相关标签
  

闽ICP备14008679号