I have one final gift for you guys before I disappear for the holidays.
I just finished adding SMS support to Android. Huzzah!!! This feature will be made available in build #713.
That said, please note that if the Android device does not support SMS, such as the Kindle Fire or Motorola Xoom tablet, then an alert message will be displayed onscreen that it cannot send a message. In the future, we should add a Lua function such as native.canShowPopup(āsmsā) to determine if the device supports that feature. Other than that, this feature was working well for me. Please give it a go and let me know how well it works for you. Have fun! [import]uid: 32256 topic_id: 19297 reply_id: 75238[/import]
If you start the sms composer in landscape the top blue bar saying āNew Messageā is too high and the status bar is over it. Rotating it to portrait and landscape works fine. This only occurs when starting the sms composer in landscape.
Thanks so much for the work, please take a good break and relaxā¦
Iām using an Intent to display the SMS activity with the MIME type set to āvnd.android-dir/mms-smsā. Based on my research, this seemed to be the popular way to do it and it worked on the devices I tested it on. This way your app does not require any special permissions to be set to send an SMS message and the end-user will have access to the deviceās contact list. [import]uid: 32256 topic_id: 19297 reply_id: 75241[/import]
looking at the code above the following should send an email⦠is this on the simulator or device? Iāve tried both BTW I changed the email address to mine!
local mailOptions = {
to = {ārob@omnigeekmedia.comā},
subject=āHow Now Brown Cowā,
body=āThe rain in Spain falls mainly on the plain!ā,
isBodyHtml = false,
listener=onSent
}
native.showPopup(āmailā, mailOptions)
seems simple but doesnāt work for me at all, popup doesnāt show, or email sent
error on simulator but I donāt know how to get errors working on device. Iām using CPM
@dominic.wood, this will be fixed in the next daily build (714). There was a crash bug that occured when you didnāt have the attachment property set. [import]uid: 26 topic_id: 19297 reply_id: 75318[/import]
Hey all thanks for this amazing feature! I started putting together a working sample doing some various tasks and Iām having an issue with an image attachment coming across to the recipient off my iPAD 2, on Android it works great.
Here are the bits if you want to take a look and see if messed up anything, but like I said it works great on Android. Do we need a different MIME type besides āimageā perhaps for iOS? I havenāt done much digging yet as I just got this all together for a tutorial and realized I should check it on Apple and discovered this.
Hereās the bits (its a bit heavy for this, but like I said I was throwing together a tutorial so just check out the README, update the phone and emailTo globals and you are off and runningā¦
Donāt forget you need to run this on a device and Iām using build 714 when making this.
Email and SMS Sample Bits
Let me know if you discover the attachment email and I will update my sample project, thanks!
We may not be able to look into this until the beginning of January because most of the team is out for the holidays. So I hope you wonāt mind waiting for us to look into this issue until then. [import]uid: 32256 topic_id: 19297 reply_id: 75578[/import]
Thank you for understanding⦠and thank you for informing us of this issue. Itās very much appreciated. Great feedback like this helps us make Corona a better product for everyone.
And a happy holidays to you too! [import]uid: 32256 topic_id: 19297 reply_id: 75596[/import]
Being a trial user about to purchase Corona, does the send email support Android ? I noticed in the earlier docs, it says iOS only so far ? [import]uid: 97524 topic_id: 19297 reply_id: 76059[/import]
Yes, itās supported on Android as of daily build 2011.714. Reference docs have been updated. [import]uid: 26 topic_id: 19297 reply_id: 76062[/import]
@Croisened
Was happy to find your sample codeā¦tested on ipad using build 715 and sad to say none seem to work apart from the blank send textā¦no idea why as it only works on the device and getting error feedback is tough for a number of reasonsā¦mainly due to my not upgrading to Lion yetā¦but thats a whole other storyā¦and what do you mean by taking TIMEOFF!! (never heard of such a thing) :) [import]uid: 85717 topic_id: 19297 reply_id: 76528[/import]
Hmmm, I just tried it again on my Ipad 2 (iOS 5) and they all work except for the attachment email example. On my Android Incredible they all work perfectly.
Same code base.
I will double check what is laying on github nowā¦
**UPDATE**
I just pulled the bits straight from github, built (still using build 714) and deployed to the device I mentioned above and I get my same results.
Perhaps you have GPS disabled or no email setup? I donāt have any error checking in this sample, itās just for the How-To part.
If that is not it, perhaps you have flushed out a new issue for us to look into.
i have email set up in your āglobalsā if thats what you meanā¦the odd thing is i dont even get the popupā¦for emailā¦yet for Text i do⦠im running this on an ipad 1ā¦maybe theres some subtle differenceā¦however the popup should have appeared methinksā¦location services are working fine it gave me my location on the text popupā¦the mystery deepens (dan dan daaaaaan)
Its mighty lonesome out here on the snow driven tundraā¦nuthin but polar bears and cayotesā¦and i dont think they use Coronaā¦so noone else that i know of to test the codeā¦dammit!!
UPDATE⦠on attachments (not to helpful im afraid)
I have seen that problem with Blank png files before on IOS .it seems that the OS compresses them in some way that i havenāt been able to figure outā¦if i build an app then go look at whats being stored in the bundle all the pngs appear blankā¦doesnāt seem to do it to jpgās [import]uid: 85717 topic_id: 19297 reply_id: 76541[/import]
I put some err detection and got the following from the blank email popupā¦
āDirector ERROR Failed to load module āhomeā Please check if the file exists and it is correctā
home.lua is present in the projectā¦
(P.S. i dont use Director as the āstoryboardā functions now built in work really well)
im gonna grab the relevant bits of code and test in a fresh projectā¦ill let you know how it goesā¦
UPDATEā¦Entitled āIt popeth NOTā
local ui = require(āuiā)
display.setStatusBar( display.HiddenStatusBar )
function onComplete( event )
if āclickedā == event.action then
local i = event.index
if 1 == i then
ā Do nothing; dialog will simply dismiss
end
end
end
local sendEmail = function(event)
local err = native.showPopup(āmailā)
ā Show alert
if(err)then
local thestr="error "ā¦err
local alert = native.showAlert( āblank email testā, thestr, { āOKā }, onComplete )
end
end
function main()
local mailButton1 = ui.newButton{
default = āemailbutton.pngā,
over = āemailbuttonover.pngā,
onRelease = sendEmail,
}
mailButton1.x=400
mailButton1.y=400
end
main()
I included your buttons in the projectā¦
this returns no errors simply doesnt workā¦at least not on my ipad 1 running IOS 5.01
hey croisened,
I have email sending with an image attachment working on IPAD2 just fine. I havnāt used your example it was along these lines and works fine
[code]
local options =
{
subject = āSample Messageā,
body = āI have just emailed from IPAD2ā¦ā,
attachment = { baseDir=system.DocumentsDirectory, filename=āemailImage.jpgā, type=āimageā }
}
native.showPopup(āmailā, options)
great that you got attachments to work!!..i did notice the attachment was a jpgā¦i think the issue is with png file you might try that and let people know how that goesā¦
QUESTION: How did you get the jpg file onto the system.DocumentsDirectory on the ipad???
if thats a dumb question then ignore it hehehe [import]uid: 85717 topic_id: 19297 reply_id: 76627[/import]