Hello,
I was looking at the native.showPopup for sending SMS messages. Is there any way to add an attachment to this instead of just text?
Hello,
I was looking at the native.showPopup for sending SMS messages. Is there any way to add an attachment to this instead of just text?
No. There is currently no way to do this. (It would technically be MMS if it did.)
On Android, you can kind of work-around this by using the “mail” native popup instead. Notice that Android will list the “Messaging” app as an option along with the other mail apps that are installed on the device. This is because the Android OS prefers to handle posting messages and images much more generically instead of targeting a specific kind of app (mail, messaging, google+, twitter, etc.).
Thanks. I used the showPopup for this. I wish I could have assigned an image to the attachment. The attachment button is there which i have to use now manually.
You mentioned Android to do this for a work-around. Does this work for an iPhone?
Warren
I’m pretty sure that iOS does not show an attachment button on the SMS popup. I remember our iOS developers looking into this a year ago and they didn’t see an option at the native level to make attachments an option. So, this work-around will only work on Android.
But if they launch the text through the phone and not through the app they can attach the image that way right?
>> But if they launch the text through the phone and not through the app they can attach the image that way right?
Yes. The iOS messaging app will always show the attachment option. But I don’t know if you can launch that app with pre-populated with text. I think you can only launch the Messaging app via a URL with a phone number. I don’t think the URL supports a text message URL argument. If you go through a SMS popup, then you’re displaying it within your own app and there are less options available, such as the attachment button.
Now, this is all based on what I remember. I’m not an iOS developer here. You can give it a go on your end to confirm.
Thanks. Using this feature built into the app is not madatory but would have been nice.
Btw, if I take a picture with the camera inside the app and make change to the picture, can I save it back into the photo album on the phone? If so, what do I set for the path when saving the image to file?
Thanks!
Yes, you can save/export an image file to the Photo Library via our media.save() function…
Thanks. I’m trying to find a way to add a watermark to an image and save it back. The only way I see is to do it on the screen and use the capture method. Only negative thing is I lose resolution because I have to resize the image to fit on the screen. Any way around this? Anything with the new graphics that might allow me to update a larger image and save it?
Yeah, I think the only way to do this in Corona is via a screen capture using display.save(), which unfortunately does lower the resolution of the image to fit within OpenGL’s max texture size limit. If I remember right, modern iOS devices are typically at least 4096x4096. However, Android devices are typically 2048x2048. This is mostly based on my personal experience.
When I create an app project with CL I start it as 320x480. So will that be the resolution of the image if I use the full screen? Or is there a more standard starting size I should set the app to so I get more resolution?
If you use Corona’s “dynamic content scaling” feature, then images loaded via display.newImage() will be scaled up to the resolution of the device. So, if you’ve set up a content width and height of 320x480, then you should set the pixel width and height of your image relative to the 320x480 dimensions.
You can also create multiple resolutions of your one image and Corona will dynamically select the closest match based on the resolution of the screen if you use our display.newImageRect() function. Details of this can be found here…
http://docs.coronalabs.com/guide/basics/configSettings/index.html#dynamic-image-selection
Regarding screen captures, a captured object will always be relative to the resolution of the device. For example, the pixel width and height of your captured object will be larger on an retina display compared to a non-retina display. This means the capture image size will vary on different devices having different resolution. This is especially noticeable on Android devices. But in this case, I think this is what you really want because odds are a high resolution device also has a larger OpenGL max texture size.
No. There is currently no way to do this. (It would technically be MMS if it did.)
On Android, you can kind of work-around this by using the “mail” native popup instead. Notice that Android will list the “Messaging” app as an option along with the other mail apps that are installed on the device. This is because the Android OS prefers to handle posting messages and images much more generically instead of targeting a specific kind of app (mail, messaging, google+, twitter, etc.).
Thanks. I used the showPopup for this. I wish I could have assigned an image to the attachment. The attachment button is there which i have to use now manually.
You mentioned Android to do this for a work-around. Does this work for an iPhone?
Warren
I’m pretty sure that iOS does not show an attachment button on the SMS popup. I remember our iOS developers looking into this a year ago and they didn’t see an option at the native level to make attachments an option. So, this work-around will only work on Android.
But if they launch the text through the phone and not through the app they can attach the image that way right?
>> But if they launch the text through the phone and not through the app they can attach the image that way right?
Yes. The iOS messaging app will always show the attachment option. But I don’t know if you can launch that app with pre-populated with text. I think you can only launch the Messaging app via a URL with a phone number. I don’t think the URL supports a text message URL argument. If you go through a SMS popup, then you’re displaying it within your own app and there are less options available, such as the attachment button.
Now, this is all based on what I remember. I’m not an iOS developer here. You can give it a go on your end to confirm.
Thanks. Using this feature built into the app is not madatory but would have been nice.
Btw, if I take a picture with the camera inside the app and make change to the picture, can I save it back into the photo album on the phone? If so, what do I set for the path when saving the image to file?
Thanks!
Yes, you can save/export an image file to the Photo Library via our media.save() function…
Thanks. I’m trying to find a way to add a watermark to an image and save it back. The only way I see is to do it on the screen and use the capture method. Only negative thing is I lose resolution because I have to resize the image to fit on the screen. Any way around this? Anything with the new graphics that might allow me to update a larger image and save it?