distriqt / ANE-Message

Send messages from AIR using email and SMS
https://airnativeextensions.com/extension/com.distriqt.Message
0 stars 0 forks source link

No longer works on Android #25

Closed izzmeifter closed 7 years ago

izzmeifter commented 7 years ago

This was working for us, but now the Email client won't open anymore. It does work fine on iOS however. Initially we were receiving key errors for Application, but upgraded Application and Core and those went away.

We have the following additions in our descriptor. We don't use SMS so we don't include any of that part from your example.

<manifest android:installLocation="auto">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application>

        <activity android:name="com.distriqt.extension.message.activities.SendMailActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
        <activity android:name="com.distriqt.extension.message.activities.ShareActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>

    </application>
</manifest>

The call is pretty simple.

Message.service.addEventListener(MessageEvent.MESSAGE_MAIL_COMPOSE, onMessageMailComposeComplete, false, 0, true);
Message.service.sendMail(subject, body, to);
izzmeifter commented 7 years ago

This is on Android 6.0.1 (Nexus 5)

marchbold commented 7 years ago

Anything else I need to reproduce? I'll look into this today.

izzmeifter commented 7 years ago

I really don't think so. All we're trying to do is open an email client with a little pre-populated body text, nothing else. Like I said, this was working, but I'm unsure when it stopped as I mostly develop on iOS.

izzmeifter commented 7 years ago

here's the logcat when I try to open an email.

11-03 18:26:37.628 12708 12708 I air.ca.homefolio.messenger: email
11-03 18:26:37.629 12708 12708 D com.distriqt.Message: MessageController::sendMail( Email via Homefolio App, , [darren@homefolio.ca] )
11-03 18:26:37.630   798  4168 I ActivityManager: START u0 {flg=0x4000000 cmp=air.ca.homefolio.messenger/com.distriqt.extension.message.activities.SendMailActivity} from uid 10958 on display 0
11-03 18:26:37.658 12708 12708 D com.distriqt.Application: ApplicationContext::onActivityStateChanged( PAUSED ) android.intent.action.MAIN
11-03 18:26:37.659 12708 12708 D com.distriqt.Maps: NativeMapsContext::onActivityStateChanged( PAUSED ) android.intent.action.MAIN
11-03 18:26:37.659 12708 12708 D com.distriqt.pushnotifications: PushNotificationsContext::onActivityStateChanged( PAUSED ) android.intent.action.MAIN
11-03 18:26:37.663 12708 12708 D com.distriqt.Application: ApplicationStateMonitor::getDeactivateCode(): isScreenOn=true ACTION_SCREEN_OFF=false
11-03 18:26:37.672  4168  4168 W Binder_D: type=1400 audit(0.0:16721): avc: denied { ioctl } for path="socket:[2610844]" dev="sockfs" ino=2610844 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
11-03 18:26:37.672  4168  4168 W Binder_D: type=1400 audit(0.0:16722): avc: denied { ioctl } for path="socket:[2610844]" dev="sockfs" ino=2610844 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
11-03 18:26:37.673 12708 12708 D com.distriqt.Message: SendMailActivity::onCreate()
11-03 18:26:37.678   798  2295 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@7ae3fa1 attribute=null, token = android.os.BinderProxy@ffa4ca4
11-03 18:26:37.683 12708 12708 D com.distriqt.Application: ApplicationContext::onActivityStateChanged( RESUMED ) android.intent.action.MAIN
11-03 18:26:37.683 12708 12708 D com.distriqt.Maps: NativeMapsContext::onActivityStateChanged( RESUMED ) android.intent.action.MAIN
11-03 18:26:37.683 12708 12708 D com.distriqt.pushnotifications: PushNotificationsContext::onActivityStateChanged( RESUMED ) android.intent.action.MAIN
11-03 18:26:37.683 12708 12708 D com.distriqt.pushnotifications: ServicesController::checkStartupData() 
11-03 18:26:37.683 12708 12708 D com.distriqt.pushnotifications: NotificationReceiver::handleIntent(): action = android.intent.action.MAIN
11-03 18:26:37.683 12708 12708 D com.distriqt.pushnotifications: NotificationReceiver::null
11-03 18:26:37.686 12708 13244 D com.distriqt.pushnotifications: NotificationStore::SAVED
11-03 18:27:00.489   798 10258 D NetlinkSocketObserver: NeighborEvent{elapsedMs=1408028638, 192.168.86.1, [F4F26D2633A7], RTM_NEWNEIGH, NUD_STALE}
marchbold commented 7 years ago

Cheers,

I've identified the issue, working on a fix now and will release shortly.

marchbold commented 7 years ago

Let me know if you are still having issues after the update.