2

I'm using Titanium SDK 7.0.0 GA and I installed benCoding.AlarmManager (version-1.0.0) module from here. When I add the module to the tiapp.xml module list like below image and run app then app crashes. I need to install this module for scheduling alarm. Pls let me know, how to install this module in Titanium studio ?

enter image description here

Here is the log message that I'm getting in console -

Start application log -----------------------------------------------------
[ERROR] :  Zygote: MountEmulatedStorage()
[INFO] :   SELinux: Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_GT-I9505_5.0.1-1_0070
[ERROR] :  Zygote: v2
[ERROR] :  SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
[INFO] :   TiApplication: (main) [0,0] checkpoint, app created.
[INFO] :   TiApplication: (main) [242,242] Titanium 7.1.1 (2018/04/19 11:11 undefined)
[INFO] :   MultiDex: VM with version 2.1.0 has multidex support
[INFO] :   MultiDex: install
[INFO] :   MultiDex: VM has multidex support, MultiDex support library is disabled.
[WARN] :   ContextImpl: Failed to ensure directory: /storage/extSdCard/Android/data/com.mobioapp.bod/cache
[WARN] :   TiAndroid: (main) [1965,2207] Application instance no longer available. Unable to get current activity.
[WARN] :   TiAndroid: (main) [2,2209] Application instance no longer available. Unable to get current activity.
[WARN] :   TiAndroid: (main) [0,2209] Application instance no longer available. Unable to get current activity.
[WARN] :   ContextImpl: Failed to ensure directory: /storage/extSdCard/Android/data/com.mobioapp.bod/cache
[ERROR] :  art: dlopen("/data/app/com.mobioapp.bod-1/lib/arm/libbencoding.alarmmanager.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_ZNSt3__112__next_primeEj" referenced by "libbencoding.alarmmanager.so"...
[ERROR] :  TiApplication: (main) [51,2260] Sending event: exception on thread: main msg:java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt3__112__next_primeEj" referenced by "libbencoding.alarmmanager.so"...; Titanium 7.1.1,2018/04/19 11:11,undefined
[ERROR] :  TiApplication: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt3__112__next_primeEj" referenced by "libbencoding.alarmmanager.so"...
[ERROR] :  TiApplication:   at java.lang.Runtime.loadLibrary(Runtime.java:371)
[ERROR] :  TiApplication:   at java.lang.System.loadLibrary(System.java:989)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:142)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:109)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135)
[ERROR] :  TiApplication:   at com.mobioapp.bod.BodApplication.onCreate(BodApplication.java:95)
[ERROR] :  TiApplication:   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1020)
[ERROR] :  TiApplication:   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5122)
[ERROR] :  TiApplication:   at android.app.ActivityThread.access$1600(ActivityThread.java:177)
[ERROR] :  TiApplication:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1510)
[ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:145)
[ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:5951)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
[ERROR] :  AndroidRuntime: FATAL EXCEPTION: main
[ERROR] :  AndroidRuntime: Process: com.mobioapp.bod, PID: 25583
[ERROR] :  AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt3__112__next_primeEj" referenced by "libbencoding.alarmmanager.so"...
[ERROR] :  AndroidRuntime:  at java.lang.Runtime.loadLibrary(Runtime.java:371)
[ERROR] :  AndroidRuntime:  at java.lang.System.loadLibrary(System.java:989)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:142)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:109)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113)
[ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135)
[ERROR] :  AndroidRuntime:  at com.mobioapp.bod.BodApplication.onCreate(BodApplication.java:95)
[ERROR] :  AndroidRuntime:  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1020)
[ERROR] :  AndroidRuntime:  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5122)
[ERROR] :  AndroidRuntime:  at android.app.ActivityThread.access$1600(ActivityThread.java:177)
[ERROR] :  AndroidRuntime:  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1510)
[ERROR] :  AndroidRuntime:  at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  AndroidRuntime:  at android.os.Looper.loop(Looper.java:145)
[ERROR] :  AndroidRuntime:  at android.app.ActivityThread.main(ActivityThread.java:5951)
[ERROR] :  AndroidRuntime:  at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  AndroidRuntime:  at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] :  AndroidRuntime:  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
[ERROR] :  AndroidRuntime:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Here is my android xlm layout in tiapp.xml -

<android xmlns:android="http://schemas.android.com/apk/res/android"/>
    <modules>
        <module platform="android">hyperloop</module>
        <module platform="iphone">hyperloop</module>
        <module platform="commonjs">ti.cloud</module>
        <module platform="android">bencoding.alarmmanager</module> 
Nuibb
  • 1,800
  • 2
  • 22
  • 36

2 Answers2

0

Looking at the error message, and the last update in the git repository (this is a pretty old and might not be an maintained/relevant). In order for it to run correctly in SDK 7 you would need to download the source code update the manifest and recompile it.

Before getting into that, you should first check if you could the SDK answer your needs. Have a look at the following docs about Android push notifications in Titanium:

https://docs.appcelerator.com/platform/latest/#!/guide/Android_Notifications

https://docs.appcelerator.com/platform/latest/#!/guide/Sending_and_Scheduling_Push_Notifications

developer82
  • 13,237
  • 21
  • 88
  • 153
  • Actually I'm doubt about my purpose can be fulfilled with Tiatanium's Android_Notifications. What I want to in my app is, I have implemented pubnub for push notification. After getting the push notification, I want to notify the user about the push using local notification repeatedly. Currently I can notify user only for once but can't notify repeatedly for multiple notification. How can I achive this ? – Nuibb May 29 '18 at 10:33
  • After getting the push, I can sent notification for only once. If i get another push, another notification can't sent and that doesn't appear in the device's notification panel. What should I do ? and is it possible to schedule the same notification for different time ? – Nuibb May 29 '18 at 10:37
  • Sounds like you would need to write your own module that listens to that acts on push intent and then runs your own business logic accordingly. As for scheduled push, see answer and code example here: https://stackoverflow.com/questions/36902667/how-to-schedule-notification-in-android – developer82 May 29 '18 at 10:59
-1

This is exactly the same issue that has bugged the latest version of my Radio Caroline app up on Google Play. Only it does work on a number of devices (like my test ones) but fails to get past the splash screen on a significant number of other devices. Most odd. And the only fix we've found is to remove the module and attempt to use Appcelerator's Calendar module as a replacement (still working on that one!)

Patrick M
  • 1
  • 1
  • 2