distriqt / ANE-Message

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

SMS UI has a black bar on top and bottom (iPhone 6s, iOS11, AIR SDK 27, Flash Builder) #32

Closed Marcophono2 closed 5 years ago

Marcophono2 commented 6 years ago

Hello!

I use the Messenger ANE only for sending SMS on iOS. All works perfect (good job, distriqt!). Only the native iMessage/SMS screen has a black bar at the top and at the bottom. The user isn't able to leave this screen without clicking the home button or without sending the SMS because there is no cancel icon visible. I can imagine that the reason is thast my app is running in full mode and does surpress the the system bars of iOS. Question: Is there a way to display the SMS UI completely? Otherwise I could imagine that the Apple Review team has problems with a restricted screen of its native sms/messenger screen. My code is very simple. I don't think that is has to do with this issue but I'll post it anyway:

`           if (Message.service.smsManager.isSMSSupported)
            {
         Message.service.smsManager.addEventListener( MessageSMSEvent.MESSAGE_SMS_CANCELLED, smsEventHandler );
    Message.service.smsManager.addEventListener( MessageSMSEvent.MESSAGE_SMS_SENT, smsEventHandler );               
                var sms:SMS = new SMS();
                sms.address = "0049xxxxxxxxx";
                sms.message = "xxx";

                Message.service.smsManager.sendSMSWithUI( sms, false );
            }
            `

Best Marc

marchbold commented 6 years ago

Hi,

Could you show a screenshot of what you are seeing?

We are using the Apple provided UI for the message composer so I doubt you'll ever have issues with review based on this UI.

Marcophono2 commented 6 years ago

Yes, sure. ane

marchbold commented 6 years ago

Hmmm,

Are you including all the default png's in your application? You shouldn't have black bars like that unless you are missing them.

Marcophono2 commented 6 years ago

Okay. That seems to be the reason! :) I didn't add them. I thought that the ANE calls up the "real" iOS messenger screen. Very intersting. It seems you are able to request and display only the desired parts of the UI. Respect! 👍

marchbold commented 6 years ago

👍 Nothing secret just an iOS SDK supported method of writing a message from within an app.

Glad that resolved the issue for you.

Marcophono2 commented 6 years ago

Okay, the black bars are gone now. But there is still no way to cancel the SMS screen. Please have a look to the attached screen. ane2

marchbold commented 6 years ago

Right, yeah you are missing some of the view for some reason, it should look like this:

What device and OS version are you testing on? And how have you setup fullscreen in your app?

Marcophono2 commented 6 years ago

This is my first experience with Flash so it is absolutely possible that I missed certain standards. I did not add any .as file excepted the main one. May be that is the reason.. iPhone 6s, iOS 11.1.1

Marcophono2 commented 6 years ago

And yes, fullscreen.

marchbold commented 6 years ago

How are you setting fullscreen though? There are several methods.

Marcophono2 commented 6 years ago

I set up a new AS mobile project and there was a checkbox if the app should run in fullscreen or not. That one I checked. Then I only added the two ANEs and the needed AS code from your "simple example"for just sending out SMS.

Marcophono2 commented 6 years ago

Okay, I implemented the code now into my main app and there the UI looks fine. Don't ask me why. I was not the developer of the AS code for my app but I am forced now to improve the sources to implement a SMS ANE since iOS11 does not support the SMS link correctly currently. Only if the message app is already running in background mode the parameters are correctly passed. Otherwise only the message app opens in the default way. So I learned a bit AS the last days to implement this well working ANE. :-)

marchbold commented 6 years ago

Okay great!

Sounds like it's just something amiss with the configuration of your first app, either missing a default image (which can result in stretching or letterboxing of your app) or not completing setting the fullscreen mode correctly with stage align / scale modes etc.

Marcophono2 commented 6 years ago

Thanks again my dear! You are the best!