rho-tau-extensions 6.0.0 → 7.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/libs/android_net_native_prebuilt/ext/build +22 -0
  3. data/libs/android_net_native_prebuilt/ext/build.bat +44 -0
  4. data/libs/android_net_native_prebuilt/ext/platform/android/android_net_native.jar +0 -0
  5. data/libs/android_net_native_prebuilt/ext/platform/android/lib/aarch64/libandroid_net_native.a +0 -0
  6. data/libs/android_net_native_prebuilt/ext/platform/android/lib/armeabi/libandroid_net_native.a +0 -0
  7. data/libs/android_net_native_prebuilt/ext/platform/android/lib/x86/libandroid_net_native.a +0 -0
  8. data/libs/android_net_native_prebuilt/ext.yml +8 -0
  9. data/libs/crosswalk/ext/platform/android/Rakefile +19 -1
  10. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkcore.so +0 -0
  11. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkdummy.so +0 -0
  12. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/native_lib_placeholder.stamp +0 -0
  13. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkcore.so +0 -0
  14. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkdummy.so +0 -0
  15. data/libs/crosswalk/ext/platform/android/adds/lib/x86/native_lib_placeholder.stamp +0 -0
  16. data/libs/crosswalk/ext/platform/android/adds/lib/xwalk_core_library_java.jar +0 -0
  17. data/libs/crosswalk/ext/platform/android/adds/res/layout/dropdown_item.xml +1 -1
  18. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/dropdown_item.xml +2 -2
  19. data/libs/crosswalk/ext/platform/android/adds/res/menu/select_action_menu.xml +8 -8
  20. data/libs/crosswalk/ext/platform/android/adds/res/raw/icudtl.dat +0 -0
  21. data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk.pak +0 -0
  22. data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk_100_percent.pak +0 -0
  23. data/libs/crosswalk/ext/platform/android/adds/res/values/android_ui_strings.xml +1 -0
  24. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_attrs.xml → attrs.xml} +0 -0
  25. data/libs/crosswalk/ext/platform/android/adds/res/values/attrs_03.xml +18 -0
  26. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_colors.xml → colors_xwalk.xml} +0 -0
  27. data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_dimens.xml → dimens_03.xml} +1 -3
  28. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_dimens.xml → dimens_xwalk.xml} +0 -0
  29. data/libs/crosswalk/ext/platform/android/adds/res/values/ids_xwalk.xml +12 -0
  30. data/libs/crosswalk/ext/platform/android/adds/res/values/strings_00.xml +16 -0
  31. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_internal_java_strings.xml → strings_01.xml} +0 -0
  32. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_java_strings.xml → strings_02.xml} +0 -0
  33. data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_strings.xml → strings_03.xml} +0 -0
  34. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_styles.xml → styles_00.xml} +0 -0
  35. data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_styles.xml → styles_03.xml} +0 -0
  36. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_values.xml → values_00.xml} +0 -0
  37. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_app_strings.xml +7 -10
  38. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_resources_list.xml +2 -1
  39. data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_ui_strings.xml +1 -0
  40. data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_ui_strings.xml +1 -0
  41. data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_ui_strings.xml +1 -0
  42. data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_ui_strings.xml +1 -0
  43. data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_ui_strings.xml +1 -0
  44. data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_ui_strings.xml +4 -3
  45. data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_ui_strings.xml +1 -0
  46. data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_ui_strings.xml +1 -0
  47. data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_ui_strings.xml +1 -0
  48. data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_ui_strings.xml +1 -0
  49. data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_ui_strings.xml +1 -0
  50. data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_ui_strings.xml +2 -1
  51. data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_ui_strings.xml +1 -0
  52. data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_ui_strings.xml +1 -0
  53. data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_ui_strings.xml +2 -1
  54. data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_ui_strings.xml +1 -0
  55. data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_ui_strings.xml +1 -0
  56. data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_ui_strings.xml +1 -0
  57. data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_ui_strings.xml +1 -0
  58. data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_ui_strings.xml +1 -0
  59. data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_ui_strings.xml +1 -0
  60. data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_ui_strings.xml +1 -0
  61. data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_ui_strings.xml +1 -0
  62. data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_ui_strings.xml +1 -0
  63. data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_ui_strings.xml +1 -0
  64. data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_ui_strings.xml +1 -0
  65. data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_ui_strings.xml +1 -0
  66. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_ui_strings.xml +1 -0
  67. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_ui_strings.xml +1 -0
  68. data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_ui_strings.xml +1 -0
  69. data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_ui_strings.xml +1 -0
  70. data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_ui_strings.xml +1 -0
  71. data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_ui_strings.xml +1 -0
  72. data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_ui_strings.xml +1 -0
  73. data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_ui_strings.xml +1 -0
  74. data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_ui_strings.xml +2 -1
  75. data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_ui_strings.xml +1 -0
  76. data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_ui_strings.xml +1 -0
  77. data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_ui_strings.xml +1 -0
  78. data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_ui_strings.xml +1 -0
  79. data/libs/crosswalk/ext/platform/android/adds/res/values-v17/{ui_java_styles.xml → styles_03.xml} +0 -0
  80. data/libs/crosswalk/ext/platform/android/adds/res/values-v21/{ui_java_styles.xml → styles_03.xml} +0 -0
  81. data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_ui_strings.xml +1 -0
  82. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_ui_strings.xml +1 -0
  83. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_ui_strings.xml +1 -0
  84. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWalkWebView.java +18 -1
  85. data/libs/enterprise-barcode/ext/platform/android/adds/lib/aarch64/liballbarcode.a +0 -0
  86. data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
  87. data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
  88. data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
  89. data/libs/enterprise-barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +8 -4
  90. data/libs/enterprise-barcode/ext/platform/iphone/Rakefile +9 -58
  91. data/libs/fcm-push-18/ext/android/AndroidManifest.rb +10 -0
  92. data/libs/fcm-push-18/ext/android/ApplicationManifestAdds.erb +39 -0
  93. data/libs/fcm-push-18/ext/android/Rakefile +187 -0
  94. data/libs/fcm-push-18/ext/android/ext_java.files +3 -0
  95. data/libs/fcm-push-18/ext/android/ext_native.files +1 -0
  96. data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.cpp +215 -0
  97. data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.h +74 -0
  98. data/libs/fcm-push-18/ext/android/res/res/values/fireBaseValues.xml +5 -0
  99. data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMFacade.java +164 -0
  100. data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +219 -0
  101. data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMListener.java +88 -0
  102. data/libs/fcm-push-18/ext/build +16 -0
  103. data/libs/fcm-push-18/ext/build.bat +8 -0
  104. data/libs/fcm-push-18/ext/fcm.xml +9 -0
  105. data/libs/fcm-push-18/ext/iphone/ApplePush_Prefix.pch +7 -0
  106. data/libs/fcm-push-18/ext/iphone/Firebase.h +68 -0
  107. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics +0 -0
  108. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h +62 -0
  109. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +115 -0
  110. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h +1 -0
  111. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h +13 -0
  112. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h +1 -0
  113. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h +1 -0
  114. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h +389 -0
  115. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h +1 -0
  116. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h +485 -0
  117. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h +15 -0
  118. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h +10 -0
  119. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap +10 -0
  120. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/FirebaseCore +0 -0
  121. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h +52 -0
  122. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRApp.h +130 -0
  123. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h +78 -0
  124. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h +35 -0
  125. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIROptions.h +133 -0
  126. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h +5 -0
  127. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Modules/module.modulemap +7 -0
  128. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics +0 -0
  129. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/Modules/module.modulemap +6 -0
  130. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID +0 -0
  131. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +276 -0
  132. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +1 -0
  133. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap +7 -0
  134. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/FirebaseMessaging +0 -0
  135. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h +508 -0
  136. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h +1 -0
  137. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap +8 -0
  138. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseNanoPB.framework/FirebaseNanoPB +0 -0
  139. data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac +0 -0
  140. data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/Modules/module.modulemap +5 -0
  141. data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Modules/module.modulemap +5 -0
  142. data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Protobuf +0 -0
  143. data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/Modules/module.modulemap +5 -0
  144. data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/nanopb +0 -0
  145. data/libs/fcm-push-18/ext/iphone/Rakefile +30 -0
  146. data/libs/fcm-push-18/ext/iphone/fcm-push.xcodeproj/project.pbxproj +370 -0
  147. data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.h +28 -0
  148. data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.m +27 -0
  149. data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.mm +234 -0
  150. data/libs/fcm-push-18/ext/iphone/impl/applePushSetup.c +10 -0
  151. data/libs/fcm-push-18/ext/iphone/impl/applepushclient.h +69 -0
  152. data/libs/fcm-push-18/ext/iphone/impl/applepushclient.mm +164 -0
  153. data/libs/fcm-push-18/ext/iphone/impl/readme.txt +7 -0
  154. data/libs/fcm-push-18/ext/platform/iphone/impl/readme.txt +7 -0
  155. data/libs/fcm-push-18/ext.yml +20 -0
  156. data/libs/nodejs/ext/platform/android/jxCore/jx.h +17 -1
  157. data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
  158. data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
  159. data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
  160. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
  161. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
  162. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
  163. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
  164. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
  165. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
  166. data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
  167. data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
  168. data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
  169. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
  170. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
  171. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
  172. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
  173. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
  174. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
  175. data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
  176. data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
  177. data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
  178. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
  179. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
  180. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
  181. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
  182. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
  183. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
  184. data/libs/nodejs/ext/platform/iphone/Nodejs.xcodeproj/project.pbxproj +8 -4
  185. data/libs/nodejs/ext/platform/iphone/Rakefile +9 -62
  186. data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +17 -1
  187. data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
  188. data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
  189. data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
  190. data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
  191. data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
  192. data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
  193. data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
  194. data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
  195. data/libs/openssl.so-edge/ext/android/armeabi/libcrypto.a +0 -0
  196. data/libs/openssl.so-edge/ext/android/armeabi/libssl.a +0 -0
  197. data/libs/openssl.so-edge/ext/android/x86/libcrypto.a +0 -0
  198. data/libs/openssl.so-edge/ext/android/x86/libssl.a +0 -0
  199. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/asn1t.h +19 -0
  200. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dso.h +23 -0
  201. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/thread_once.h +5 -2
  202. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1.h +5 -2
  203. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1t.h +5 -0
  204. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bio.h +9 -12
  205. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bn.h +1 -1
  206. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/buffer.h +1 -4
  207. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf.h +1 -0
  208. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/crypto.h +5 -1
  209. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ct.h +17 -2
  210. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dh.h +24 -6
  211. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dsa.h +1 -0
  212. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/e_os2.h +3 -16
  213. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ec.h +7 -12
  214. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/engine.h +0 -2
  215. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/err.h +3 -2
  216. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/evp.h +11 -1
  217. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/lhash.h +13 -0
  218. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/objects.h +2 -2
  219. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ocsp.h +3 -16
  220. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h +20 -8
  221. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslv.h +3 -3
  222. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rsa.h +2 -0
  223. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/seed.h +1 -3
  224. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srtp.h +1 -1
  225. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl.h +85 -52
  226. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl3.h +4 -1
  227. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/tls1.h +6 -6
  228. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ui.h +10 -0
  229. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509.h +1 -1
  230. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509_vfy.h +5 -0
  231. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509v3.h +1 -0
  232. data/libs/rexml-edge/rexml/attlistdecl.rb +63 -0
  233. data/libs/rexml-edge/rexml/attribute.rb +192 -0
  234. data/libs/rexml-edge/rexml/cdata.rb +68 -0
  235. data/libs/rexml-edge/rexml/child.rb +97 -0
  236. data/libs/rexml-edge/rexml/comment.rb +80 -0
  237. data/libs/rexml-edge/rexml/doctype.rb +270 -0
  238. data/libs/rexml-edge/rexml/document.rb +291 -0
  239. data/libs/rexml-edge/rexml/dtd/attlistdecl.rb +11 -0
  240. data/libs/rexml-edge/rexml/dtd/dtd.rb +47 -0
  241. data/libs/rexml-edge/rexml/dtd/elementdecl.rb +18 -0
  242. data/libs/rexml-edge/rexml/dtd/entitydecl.rb +57 -0
  243. data/libs/rexml-edge/rexml/dtd/notationdecl.rb +40 -0
  244. data/libs/rexml-edge/rexml/element.rb +1241 -0
  245. data/libs/rexml-edge/rexml/encoding.rb +51 -0
  246. data/libs/rexml-edge/rexml/entity.rb +174 -0
  247. data/libs/rexml-edge/rexml/formatters/default.rb +112 -0
  248. data/libs/rexml-edge/rexml/formatters/pretty.rb +142 -0
  249. data/libs/rexml-edge/rexml/formatters/transitive.rb +58 -0
  250. data/libs/rexml-edge/rexml/functions.rb +418 -0
  251. data/libs/rexml-edge/rexml/instruction.rb +71 -0
  252. data/libs/rexml-edge/rexml/light/node.rb +196 -0
  253. data/libs/rexml-edge/rexml/namespace.rb +48 -0
  254. data/libs/rexml-edge/rexml/node.rb +76 -0
  255. data/libs/rexml-edge/rexml/output.rb +30 -0
  256. data/libs/rexml-edge/rexml/parent.rb +166 -0
  257. data/libs/rexml-edge/rexml/parseexception.rb +52 -0
  258. data/libs/rexml-edge/rexml/parsers/baseparser.rb +533 -0
  259. data/libs/rexml-edge/rexml/parsers/lightparser.rb +59 -0
  260. data/libs/rexml-edge/rexml/parsers/pullparser.rb +197 -0
  261. data/libs/rexml-edge/rexml/parsers/sax2parser.rb +273 -0
  262. data/libs/rexml-edge/rexml/parsers/streamparser.rb +61 -0
  263. data/libs/rexml-edge/rexml/parsers/treeparser.rb +101 -0
  264. data/libs/rexml-edge/rexml/parsers/ultralightparser.rb +57 -0
  265. data/libs/rexml-edge/rexml/parsers/xpathparser.rb +657 -0
  266. data/libs/rexml-edge/rexml/quickpath.rb +266 -0
  267. data/libs/rexml-edge/rexml/rexml.rb +32 -0
  268. data/libs/rexml-edge/rexml/sax2listener.rb +98 -0
  269. data/libs/rexml-edge/rexml/security.rb +28 -0
  270. data/libs/rexml-edge/rexml/source.rb +297 -0
  271. data/libs/rexml-edge/rexml/streamlistener.rb +93 -0
  272. data/libs/rexml-edge/rexml/syncenumerator.rb +33 -0
  273. data/libs/rexml-edge/rexml/text.rb +426 -0
  274. data/libs/rexml-edge/rexml/undefinednamespaceexception.rb +9 -0
  275. data/libs/rexml-edge/rexml/validation/relaxng.rb +539 -0
  276. data/libs/rexml-edge/rexml/validation/validation.rb +144 -0
  277. data/libs/rexml-edge/rexml/validation/validationexception.rb +10 -0
  278. data/libs/rexml-edge/rexml/xmldecl.rb +116 -0
  279. data/libs/rexml-edge/rexml/xmltokens.rb +85 -0
  280. data/libs/rexml-edge/rexml/xpath.rb +81 -0
  281. data/libs/rexml-edge/rexml/xpath_parser.rb +704 -0
  282. data/version +1 -1
  283. metadata +144 -27
  284. data/libs/crosswalk/ext/platform/android/adds/res/drawable/launchscreen_bg.xml +0 -19
  285. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/crosswalk.png +0 -0
  286. data/libs/crosswalk/ext/platform/android/adds/res/drawable-ldpi/crosswalk.png +0 -0
  287. data/libs/crosswalk/ext/platform/android/adds/res/drawable-mdpi/crosswalk.png +0 -0
  288. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/crosswalk.png +0 -0
  289. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_suggestion_item.xml +0 -7
  290. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_suggestion_item.xml +0 -18
  291. data/libs/crosswalk/ext/platform/android/adds/res/raw/contacts_api.js +0 -206
  292. data/libs/crosswalk/ext/platform/android/adds/res/raw/device_capabilities_api.js +0 -231
  293. data/libs/crosswalk/ext/platform/android/adds/res/raw/messaging_api.js +0 -359
  294. data/libs/crosswalk/ext/platform/android/adds/res/raw/presentation_api.js +0 -144
  295. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_attrs.xml +0 -9
  296. data/libs/crosswalk/ext/platform/android/adds/res/values-v14/theme.xml +0 -16
@@ -0,0 +1,215 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2012 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ #include "rhodes/JNIRhodes.h"
28
+ #include "common/RhoConf.h"
29
+ #include "Push.h"
30
+ #include "sync/RhoconnectClientManager.h"
31
+ #include "sync/ILoginListener.h"
32
+ #include "ruby/ext/rho/rhoruby.h"
33
+
34
+ #include "logging/RhoLog.h"
35
+
36
+ #include "fcmpushclient.h"
37
+
38
+ //----------------------------------------------------------------------------------------------------------------------
39
+ extern "C" void Init_FCMPush_extension()
40
+ {
41
+ // create FCM push client
42
+ RAWTRACEC("Init_FCMPush_extension", "creating FCM client >>>>>>>>>>>>>>");
43
+
44
+ rho::fcm::FcmPushClient* pClient = new rho::fcm::FcmPushClient();
45
+
46
+ RAWTRACEC("Init_FCMPush_extension", "adding FCM client >>>>>>>>>>>>>>>>");
47
+
48
+ rho::push::CPushManager::getInstance()->addClient(pClient);
49
+ }
50
+ //----------------------------------------------------------------------------------------------------------------------
51
+
52
+ namespace rho { namespace fcm {
53
+
54
+ IMPLEMENT_LOGCLASS(FcmPushClient, "FcmPushClient");
55
+
56
+ //----------------------------------------------------------------------------------------------------------------------
57
+
58
+ const char* const FcmPushClient::s_FCM_FACADE_CLASS = "com.rhomobile.rhodes.fcm.FCMFacade";
59
+
60
+ //----------------------------------------------------------------------------------------------------------------------
61
+
62
+ const String FcmPushClient::s_Type = "fcm";
63
+ String FcmPushClient::token = "";
64
+
65
+ FcmPushClient::FcmPushClient()
66
+ {
67
+ LOG(TRACE) + "FcmPushInit()";
68
+ canExecuteNotifications = false;
69
+ JNIEnv *env = jnienv();
70
+
71
+ static jclass cls = rho_find_class(env, s_FCM_FACADE_CLASS);
72
+ if (!cls) {
73
+ LOG(ERROR) + "Cannot find class: " + s_FCM_FACADE_CLASS;
74
+ return;
75
+ }
76
+
77
+ static jmethodID mid = env->GetStaticMethodID(cls, "initFireBase", "()V");
78
+ if (!mid) {
79
+ LOG(ERROR) + "Cannot get " + s_FCM_FACADE_CLASS + ".initFireBase() method";
80
+ return;
81
+ }
82
+
83
+ env->CallStaticVoidMethod(cls, mid);
84
+
85
+ CMethodResult result;
86
+ setProperty("id", s_Type, result);
87
+ setProperty("type", IPush::PUSH_TYPE_NATIVE, result);
88
+ setProperty("senderId", RHOCONF().getString("Push.fcm.senderId"), result);
89
+ setPropertyFromMethod("google_app_id", result);
90
+ //setPropertyFromMethod("google_api_key", result);
91
+ setPropertyFromMethod("gcm_defaultSenderId", result);
92
+
93
+ }
94
+
95
+ //----------------------------------------------------------------------------------------------------------------------
96
+
97
+ void FcmPushClient::setPropertyFromMethod(const char* methodName, CMethodResult &result) {
98
+
99
+ JNIEnv *env = jnienv();
100
+ jclass cls = rho_find_class(env, s_FCM_FACADE_CLASS);
101
+ if (!cls) {
102
+ LOG(ERROR) + "Cannot get " + s_FCM_FACADE_CLASS;
103
+ return;
104
+ }
105
+
106
+ jmethodID mid = env->GetStaticMethodID( cls, methodName, "()Ljava/lang/String;");
107
+ if (!mid){
108
+ LOG(ERROR) + "Cannot get " + s_FCM_FACADE_CLASS + "." + methodName + " method";
109
+ return;
110
+ }
111
+
112
+ jstring jstr = (jstring)env->CallStaticObjectMethod(cls, mid);
113
+ const char* buf = env->GetStringUTFChars(jstr,0);
114
+
115
+ setProperty(methodName, buf, result);
116
+ env->ReleaseStringUTFChars(jstr, buf);
117
+ }
118
+
119
+ void FcmPushClient::refreshToken(){
120
+ LOG(TRACE) + "refreshToken()";
121
+ JNIEnv *env = jnienv();
122
+
123
+ static jclass cls = rho_find_class(env, s_FCM_FACADE_CLASS);
124
+ if (!cls) {
125
+ LOG(ERROR) + "Cannot find class: " + s_FCM_FACADE_CLASS;
126
+ return;
127
+ }
128
+
129
+ static jmethodID mid = env->GetStaticMethodID(cls, "refreshToken", "()V");
130
+ if (!mid) {
131
+ LOG(ERROR) + "Cannot get " + s_FCM_FACADE_CLASS + ".refreshToken() method";
132
+ return;
133
+ }
134
+
135
+ env->CallStaticVoidMethod(cls, mid);
136
+
137
+ }
138
+
139
+ void FcmPushClient::getDeviceId(CMethodResult& result)
140
+ {
141
+ String deviceId = m_hashProps["deviceId"];
142
+
143
+ if(deviceId.length() != 0)
144
+ {
145
+ LOG(TRACE) + "FCM deviceId: " + deviceId;
146
+ result.set(deviceId);
147
+ }
148
+ else
149
+ {
150
+ LOG(TRACE) + "Still waiting for FCM deviceId";
151
+ m_deviceIdResult = result;
152
+ }
153
+ }
154
+
155
+ //----------------------------------------------------------------------------------------------------------------------
156
+ void FcmPushClient::startNotifications(CMethodResult& result)
157
+ {
158
+ LOG(TRACE) + "Start FCM push notifications";
159
+ m_oResult = result;
160
+ canExecuteNotifications = true;
161
+ executeCallBacks();
162
+ }
163
+
164
+ //----------------------------------------------------------------------------------------------------------------------
165
+ void FcmPushClient::stopNotifications(CMethodResult& result)
166
+ {
167
+ LOG(TRACE) + "Stop FCM push notifications";
168
+ canExecuteNotifications = false;
169
+ m_oResult = CMethodResult();
170
+
171
+ }
172
+
173
+ //----------------------------------------------------------------------------------------------------------------------
174
+ void FcmPushClient::setDeviceId(const String& deviceId)
175
+ {
176
+ CMethodResult result;
177
+ setProperty("deviceId", deviceId, result);
178
+
179
+ LOG(TRACE) + "creating client register";
180
+ rho::sync::RhoconnectClientManager::clientRegisterCreate(deviceId.c_str());
181
+
182
+ getDeviceId(m_deviceIdResult);
183
+ m_deviceIdResult = CMethodResult();
184
+
185
+ }
186
+
187
+ //----------------------------------------------------------------------------------------------------------------------
188
+ bool FcmPushClient::callBack(const String& json)
189
+ {
190
+ LOG(TRACE) + "FCM push notification: " + json;
191
+
192
+ if (canExecuteNotifications){
193
+ m_oResult.setJSON(json);
194
+ }else{
195
+ if (callBacksQueue.size() < 1024){
196
+ callBacksQueue.push(json);
197
+ }
198
+ }
199
+
200
+ return true;
201
+ }
202
+
203
+ void FcmPushClient::executeCallBacks()
204
+ {
205
+
206
+ while (!callBacksQueue.empty()){
207
+ callBack(callBacksQueue.front());
208
+ callBacksQueue.pop();
209
+ }
210
+
211
+ }
212
+
213
+
214
+ }}
215
+
@@ -0,0 +1,74 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2012 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ #ifndef FCMPUSHCLIENT_H_
28
+ #define FCMPUSHCLIENT_H_
29
+
30
+ //#include "common/push/IRhoPushClient.h"
31
+ #include "Push.h"
32
+
33
+ #include "logging/RhoLog.h"
34
+ #include "common/RhoStd.h"
35
+ #include <queue>
36
+
37
+ namespace rho { namespace fcm {
38
+
39
+ using namespace rho::common;
40
+
41
+ class FcmPushClient: public push::CPushClient
42
+ {
43
+ class SyncLoginListener;
44
+ private:
45
+ static const char* const s_FCM_FACADE_CLASS;
46
+ static const String s_Type;
47
+ static String token;
48
+ CMethodResult m_oResult;
49
+ CMethodResult m_deviceIdResult;
50
+ void setPropertyFromMethod(const char* methodName, CMethodResult &result);
51
+ void refreshToken();
52
+
53
+ std::queue<String> callBacksQueue;
54
+ void executeCallBacks();
55
+ bool canExecuteNotifications;
56
+ public:
57
+ DEFINE_LOGCLASS;
58
+
59
+ FcmPushClient();
60
+ virtual ~FcmPushClient() {}
61
+
62
+ virtual const String& getId() const { return s_Type; }
63
+ virtual void setDeviceId(const String& deviceId);
64
+ virtual void getDeviceId(CMethodResult& result);
65
+ virtual void startNotifications(CMethodResult& result);
66
+ virtual void stopNotifications(CMethodResult& result);
67
+ virtual bool callBack(const String& json);
68
+
69
+ };
70
+
71
+
72
+ }}
73
+
74
+ #endif /* FCMPUSHCLIENT_H_ */
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <string name="gcm_defaultSenderId" translatable="false">946233903142</string>
4
+ <string name="google_app_id" translatable="false">1:946233903142:android:f30764748b001126</string>
5
+ </resources>
@@ -0,0 +1,164 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2012 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ package com.rhomobile.rhodes.fcm;
28
+
29
+ import com.rhomobile.rhodes.Push;
30
+ import com.rhomobile.rhodes.Logger;
31
+ import com.rhomobile.rhodes.PushContract;
32
+ import com.rhomobile.rhodes.util.ContextFactory;
33
+ import com.rhomobile.rhodes.fcm.FCMIntentService;
34
+ import android.content.Intent;
35
+ import com.google.firebase.messaging.FirebaseMessagingService;
36
+ import com.google.firebase.messaging.RemoteMessage;
37
+ import com.google.firebase.FirebaseApp;
38
+ import com.google.firebase.FirebaseOptions;
39
+ import com.google.firebase.messaging.FirebaseMessaging;
40
+ import com.google.firebase.iid.FirebaseInstanceId;
41
+ import com.rhomobile.rhodes.R;
42
+ import java.lang.Throwable;
43
+ import com.rhomobile.rhodes.extmanager.AbstractRhoListener;
44
+ import com.rhomobile.rhodes.RhodesActivity;
45
+ import com.rhomobile.rhodes.RhodesService;
46
+ import com.rhomobile.rhodes.extmanager.RhoExtManager;
47
+ import com.rhomobile.rhodes.extmanager.RhoExtManagerImpl;
48
+ import com.rhomobile.rhodes.extmanager.IRhoExtManager;
49
+ import com.google.firebase.iid.InstanceIdResult;
50
+ import com.google.android.gms.tasks.OnCompleteListener;
51
+ import com.google.android.gms.tasks.Task;
52
+
53
+ public final class FCMFacade {
54
+ private static final String TAG = FCMFacade.class.getSimpleName();
55
+ public static final FCMListener listener = FCMListener.getInstance();
56
+
57
+ static final String FCM_PUSH_CLIENT = "fcm";
58
+ static String clientToken = "";
59
+
60
+ private static String gStr(int key){
61
+ String value = "";
62
+ try{
63
+ value = ContextFactory.getContext().getResources().getString(key);
64
+ }catch(Exception e){
65
+ Logger.W(TAG, "FCM: key " + key + " does not exist");
66
+ }
67
+ return value;
68
+ }
69
+
70
+ public static String google_app_id(){
71
+ return gStr(R.string.google_app_id);
72
+ }
73
+
74
+ public static String gcm_defaultSenderId() {
75
+ return gStr(R.string.gcm_defaultSenderId);
76
+ }
77
+
78
+ /*
79
+ public static String google_api_key(){
80
+ return gStr(R.string.google_api_key);
81
+ }
82
+ */
83
+
84
+ public static void initFireBase() {
85
+
86
+ Logger.W(TAG, "FCM: Send FCM push register req");
87
+
88
+ try{
89
+ FirebaseApp.getInstance();
90
+ Logger.T(TAG, "FCM: Firebase inited");
91
+ }catch(Exception exc){
92
+ FirebaseOptions options = null;
93
+ try {
94
+ options = new FirebaseOptions.Builder()
95
+ .setApplicationId(gStr(R.string.google_app_id))
96
+ //.setApiKey(gStr(R.string.google_api_key))
97
+ //.setDatabaseUrl(gStr(R.string.firebase_database_url))
98
+ //.setStorageBucket(gStr(R.string.google_storage_bucket))
99
+ .setGcmSenderId(gStr(R.string.gcm_defaultSenderId))
100
+ .build();
101
+ } catch( Throwable e ) {
102
+ Logger.E(TAG, "FCM: poblems on building options: " + e);
103
+ e.printStackTrace();
104
+ }
105
+ try{
106
+ FirebaseApp.initializeApp(ContextFactory.getContext(), options);
107
+ Logger.T(TAG, "FCM: initialization of application");
108
+ }catch(Exception e){
109
+ Logger.E(TAG, "FCM: poblems on initialization app: " + e);
110
+ e.printStackTrace();
111
+ }
112
+ try{
113
+ if (FirebaseApp.getInstance()==null){
114
+ Logger.T(TAG, "FCM: firebase app is null");
115
+ }
116
+ Logger.T(TAG, "FCM: Firebase Inited");
117
+ }catch(Exception e){
118
+ Logger.E(TAG, "FCM: poblems on getting instance: " + e);
119
+ e.printStackTrace();
120
+ }
121
+ }
122
+
123
+ refreshToken();
124
+
125
+ }
126
+ public static void refreshToken(){
127
+ try{
128
+ Logger.T(TAG, "FCM: registation of application");
129
+ clientToken = "";
130
+
131
+ new Thread(new Runnable() {
132
+ public void run() {
133
+ while (FirebaseInstanceId.getInstance(FirebaseApp.getInstance()) == null){
134
+ try{
135
+ Thread.sleep(1000);
136
+ }catch(Exception e){
137
+
138
+ }
139
+ Logger.T(TAG, "FCM: FirebaseInstanceId is null");
140
+ }
141
+ FirebaseInstanceId.getInstance(FirebaseApp.getInstance()).getInstanceId().addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
142
+ @Override
143
+ public void onComplete(Task<InstanceIdResult> task) {
144
+ if (task == null || !task.isSuccessful()) {
145
+ Logger.T(TAG, "FCM: can't get token, try to refresh later: " + task.getException());
146
+ return;
147
+ }
148
+ clientToken = task.getResult().getToken();
149
+ PushContract.handleRegistration(ContextFactory.getContext(), clientToken, FCMFacade.FCM_PUSH_CLIENT);
150
+ Logger.T(TAG, "FCM: registation successfully, token = " + clientToken);
151
+ }
152
+ });
153
+ }
154
+ }).start();
155
+
156
+
157
+
158
+ }catch(Exception exc){
159
+ Logger.T(TAG, "FCM: can't handle registation: " + exc);
160
+ }
161
+
162
+ }
163
+
164
+ }
@@ -0,0 +1,219 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2012 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ package com.rhomobile.rhodes.fcm;
28
+
29
+ import android.content.Context;
30
+ import android.content.Intent;
31
+ import android.graphics.BitmapFactory;
32
+ import android.media.RingtoneManager;
33
+ import android.net.Uri;
34
+
35
+ import android.app.Notification;
36
+ import android.app.NotificationChannel;
37
+ import android.app.NotificationManager;
38
+ import android.support.v4.app.NotificationCompat;
39
+
40
+ import android.app.PendingIntent;
41
+ import android.net.Uri;
42
+ import android.util.Log;
43
+ import android.os.Build;
44
+
45
+ import com.google.firebase.messaging.FirebaseMessagingService;
46
+ import com.google.firebase.messaging.RemoteMessage;
47
+ import com.rhomobile.rhodes.util.ContextFactory;
48
+ import com.rhomobile.rhodes.Logger;
49
+ import com.rhomobile.rhodes.PushContract;
50
+ import com.rhomobile.rhodes.R;
51
+ import com.rhomobile.rhodes.RhodesActivity;
52
+ import com.rhomobile.rhodes.R;
53
+
54
+
55
+ import com.google.firebase.FirebaseApp;
56
+ import com.google.firebase.FirebaseOptions;
57
+ import android.util.Log;
58
+ import java.util.HashMap;
59
+ import java.util.Map;
60
+ import java.util.Set;
61
+ import java.util.HashSet;
62
+ import org.json.JSONException;
63
+ import org.json.JSONObject;
64
+ import java.util.Timer;
65
+ import java.util.TimerTask;
66
+ import java.util.concurrent.TimeUnit;
67
+ import android.os.Handler;
68
+ import com.rhomobile.rhodes.fcm.FCMFacade;
69
+ import com.google.firebase.iid.FirebaseInstanceId;
70
+
71
+
72
+ public class FCMIntentService extends FirebaseMessagingService {
73
+
74
+ private static final String TAG = FCMIntentService.class.getSimpleName();
75
+ public static final FCMListener listener = FCMListener.getInstance();
76
+
77
+ private static final String CHANNEL_ID = "default";
78
+ private static Map<String, JSONObject> savedMessages = new HashMap<String, JSONObject>();
79
+
80
+ @Override
81
+ public void onNewToken(String token) {
82
+ Logger.I(TAG, "FCM: on new token: " + token);
83
+ super.onNewToken(token);
84
+ FCMFacade.refreshToken();
85
+ }
86
+
87
+ @Override
88
+ public void onCreate() {
89
+ super.onCreate();
90
+ if (Build.VERSION.SDK_INT >= 26) {
91
+ NotificationChannel channel = new NotificationChannel(CHANNEL_ID, getPackageName(), NotificationManager.IMPORTANCE_DEFAULT);
92
+ NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
93
+ notificationManager.createNotificationChannel(channel);
94
+ }
95
+ }
96
+
97
+
98
+ @Override
99
+ public void onMessageReceived(RemoteMessage remoteMessage) {
100
+ //savedIntents.remove(remoteMessage.getMessageId());
101
+
102
+ Logger.I(TAG, "FCM: onMessageReceived()");
103
+ Map<String, String> params = new HashMap<String, String>();
104
+
105
+ if (remoteMessage.getMessageId() != null) params.put("id", remoteMessage.getMessageId());
106
+ Logger.I(TAG, "FCM: id - " + remoteMessage.getMessageId());
107
+
108
+ if (remoteMessage.getFrom() != null) params.put("from", remoteMessage.getFrom());
109
+ Logger.I(TAG, "FCM: from - " + remoteMessage.getFrom());
110
+
111
+ if (remoteMessage.getTo() != null) params.put("to", remoteMessage.getTo());
112
+ Logger.I(TAG, "FCM: to - " + remoteMessage.getTo());
113
+
114
+ if (remoteMessage.getNotification() != null){
115
+ if (remoteMessage.getNotification().getBody() != null) params.put("body", remoteMessage.getNotification().getBody());
116
+ Logger.I(TAG, "FCM: body - " + remoteMessage.getNotification().getBody());
117
+
118
+ if (remoteMessage.getNotification().getTitle() != null) params.put("title", remoteMessage.getNotification().getTitle());
119
+ Logger.I(TAG, "FCM: title - " + remoteMessage.getNotification().getTitle());
120
+
121
+ if (remoteMessage.getNotification().getTag() != null) params.put("tag", remoteMessage.getNotification().getTag());
122
+ Logger.I(TAG, "FCM: tag - " + remoteMessage.getNotification().getTag());
123
+ }
124
+
125
+ String title = null;
126
+ String text = null;
127
+
128
+ try{
129
+ JSONObject jsonObject = new JSONObject(params);
130
+
131
+ try {
132
+ jsonObject.put("data", new JSONObject(remoteMessage.getData()));
133
+ Logger.I(TAG, "FCM: data - " + remoteMessage.getData());
134
+ title = remoteMessage.getData().get("notification_title");
135
+ text = remoteMessage.getData().get("notification_text");
136
+ } catch (JSONException e) {
137
+ Logger.I(TAG, "FCM: jsonObject generation error");
138
+ e.printStackTrace();
139
+ }
140
+
141
+ Logger.W(TAG, "FCM: push message in JSON: " + jsonObject.toString());
142
+ try{
143
+ PushContract.handleMessage(ContextFactory.getContext(), jsonObject.toString(), FCMFacade.FCM_PUSH_CLIENT);
144
+ }catch(Exception e){
145
+ if (params.containsKey("id")){
146
+ savedMessages.put(params.get("id"), jsonObject);
147
+ }
148
+ }
149
+ }catch(Exception e){
150
+ Logger.E(TAG, "FCM: can't create object for handleMessage");
151
+ e.printStackTrace();
152
+ }
153
+
154
+ if (title != null && text != null && !listener.applicationVisible()){
155
+ Intent resultIntent = new Intent(this, RhodesActivity.class);
156
+ PendingIntent resultPendingIntent = PendingIntent.getActivity(this, 0, resultIntent,
157
+ PendingIntent.FLAG_UPDATE_CURRENT);
158
+
159
+
160
+ NotificationCompat.Builder notificationBuilder = null;
161
+ if (Build.VERSION.SDK_INT >= 26) {
162
+ notificationBuilder = new NotificationCompat.Builder(this, "default");
163
+ }else{
164
+ notificationBuilder = new NotificationCompat.Builder(this);
165
+
166
+ }
167
+ notificationBuilder.setSmallIcon(R.mipmap.icon)
168
+ .setContentTitle(title)
169
+ .setContentText(text)
170
+ .setAutoCancel(true)
171
+ .setContentIntent(resultPendingIntent);
172
+
173
+ Notification notification = notificationBuilder.build();
174
+
175
+ NotificationManager notificationManager =
176
+ (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
177
+
178
+ notificationManager.notify(1, notification);
179
+ }
180
+
181
+
182
+ }
183
+
184
+ public static boolean tryToHandleMessage(JSONObject jsonObject){
185
+ try{
186
+ Logger.W(TAG, "FCM: tryToHandleMessage() - trying to handle saved JSONObject");
187
+ PushContract.handleMessage(ContextFactory.getContext(), jsonObject.toString(), FCMFacade.FCM_PUSH_CLIENT);
188
+ return true;
189
+ }catch(Exception e){
190
+ Logger.W(TAG, "FCM: tryToHandleMessage() - can't handle JSONObject");
191
+ }
192
+ return false;
193
+ }
194
+
195
+
196
+ static public void resume()
197
+ {
198
+ if (savedMessages.size() > 0){
199
+
200
+ Timer timerObj = new Timer();
201
+ TimerTask timerTaskObj = new TimerTask() {
202
+ public void run() {
203
+ Set<String> keySet = new HashSet<String>(savedMessages.keySet());
204
+ for (String key : keySet){
205
+ try{
206
+ if (tryToHandleMessage(savedMessages.get(key))){
207
+ savedMessages.remove(key);
208
+ }
209
+ }catch(Exception e){
210
+ Logger.W(TAG, "FCM: can't handle saved message " + key);
211
+ }
212
+ }
213
+ }
214
+ };
215
+ timerObj.schedule(timerTaskObj, 2000);
216
+ }
217
+ }
218
+
219
+ }