Activity Indicator on "Send" button and "Save Draft" button on MFMailComposeViewController in iPad - objective-c

In my iPad application, I am playing some PDF and Video files. In the application user have option to email these files to himself or a friend. Email functionality is working fine and email gets delivered too. However, when user presses send button to send the email it freezes the application for sometime, also, when user presses Save Draft button to save that email, it freezes too. I think this happens because of large size of the PDF or Video file being attached and since it takes time to attach a file. When app freezes it seems like as if the iPad has hung or the app is crashing. However, it is working fine. But it doesn't look good. That is why I need to apply an activity indicator when Send or Save Draft button is pressed. It should work till the file is attached. I would apply an activity indicator, but not sure how to apply it on Send and Save Draft buttons as they come automatically in Email modal view controller.
Thanks in advance
PC

I have also experienced the same problem. Not because of the size of an attachment. It happens arbitrarily, Here's a workaround:
Enter anything in the "To:" field and then immediately backspace over it.
The "Send" and "Cancel" buttons should start working again.
If not, Quit Mail by double tapping the "Home" key, press and hold the "Mail" icon, when a minus signal shows press it on the "Mail" icon.
Relaunch mail. Your previous work should be intact.
Hope this helps.

Related

Take a screenshot in appcelerator and send it by email

How do I take a screenshot in appcelerator using a click event and send it using email? I have developed a floating action bar and want to associate a click event with it that takes a screenshot of the current screen and then opens an email dialog.
I tried the following:
$.btnScreen.addEventListener("click",function(e){ Ti.Media.takeScreenshot(function(){
I see you're calling the right method, but you're not actually capturing the blob. You should do something along these lines: (keep in mind, email dialog doesn't work in simulator)
Ti.Media.takeScreenshot(function(blob){
var dialog = Ti.UI.createEmailDialog();
dialog.addAttachment(blob.media);
dialog.open();
});

Modifications to VB.NET PDF Viewer

Okay, I know a question LIKE this has been asked before, but none of them covered this certain toolbar. After the top and left toolbars are hidden, this little black window shows up near the bottom of the screen which allows the user to print, save, zoom, etc. They can also even open the top and left toolbars back up by clicking the Adobe logo.
As you can see, at the top of my program I have a toolbar of my own. The way my program works is a user will input data, press the 'Create Report' button and this Report Viewer window will popup. When the user Creates a Report a .PDF file named preview.pdf is created and that's what the user opens up. If the user doesn't like the report he can hit the X to delete it, or if he likes it he can type a File Name and Press Save. Or he can skip the saving and just print it. When the user saves the file it goes to a place that the software can retrieve at a later time. If the user presses the save button on one of the Adobe toolbars he has the option to save it where they want to. I can't have that.
Does anybody know how to disable ALL Adobe toolbars in the .NET PDF Viewer? (And yes, I know that Pressing F8 will bring them back up).
Here's the code I have now:
pdf.src = "C:\Users\Ryan\Desktop\HelloWorld.pdf"
pdf.setShowToolbar(False)
pdf.setView("fitH")
pdf.setLayoutMode("SinglePage")
pdf.setShowScrollbars(False)
pdf.setZoom(68)
Here's a screenshot of the Windows Form:
Acrobat viewer has such switchable options.
this configuration switchs off all navigation:
view=FitH
scrollbar = 0
toolbar= 0
statusbar= 0
messages= 0
navpanes= 0

Slow Response After Clicking Button in VB.NET

I have created a windows form on a Windows Mobile 6.5 application. This screen has a username and password field and a login menu button. After clicking the button, it takes my click event for the login button 6 or 7 seconds to reach the first line of code (an alert). It takes that long to reach the breakpoint as well.
I've tried:
changing the menu button to a login button
using AddHandler in my formLoad event
...and have still not gotten a fast response. What else could be slowing this down?
This delay seemed to happen the first time any button was clicked on the application. The only way I could get this delay to not occur was to force a dummy button click of the login button on load of the application. The delay causes the application to load a little bit longer, but at least that delay won't occur when the user clicks the button.

Application hangs on clicking "Choose" button in IKPictureTaker view

I am facing a strange hang issue with IKPictureTaker and on clicking a "Choose" button. I am doing below operation using IKPictureTaker.
When a user wants to change a profile picture, upon clicking "Change Image" button, I display a IKPictureTaker view along with "Choose" button by setting IKPictureTakerAllowsFileChoosingKey to YES.
First time on clicking the "Choose" button, open panel will be displayed allowing user to select an image of his choice.
Next, on clicking the "Set" button, internally I am calling a profile picture upload function of a server in a separate thread and everything works great.
Next if the user tries to do the operation 1) and 2) again application hangs on clicking the "Choose" button.
After investigation I found that this issue is something to do with the background upload operation I am doing with the server.Because if I comment the upload part of code everything looks good.
I don't see any issues with the upload operation performed in the separate thread and it gives up it s runloop once it is done with its upload operation and all UI related operations again taken care in the main thread.
Application hangs only if I click on the "Choose" button. If I select the recent pictures or take a new photo using the camera everything works great.
Is there anyone who faced the same issue? Is it something to do with the NSOpenPanel displayed when we click on the "Choose" button?

Add email and print facility to Share icon on navigation bar in an iPad application

I am working on an application for iPad. This application has some PDF files and some mp4 videos. I have a share icon on the navigation bar. When the user clicks on the share icon it shows option to email or print that particular file. I want to add both email and print facility to all the pdf files and only email facility to all videos. I need help in getting this done. Help with code would be great.
Any help will be highly appreciated.
Regards
PC
How to send email: How can I send mail from an iPhone application
How to print: http://cocoacoding.com/2011/05/01/airprint-tutorial/
How to create an action sheet: http://ykyuen.wordpress.com/2010/04/14/iphone-uiactionsheet-example/
Put it all together:
Add an Action Sheet button to your UI.
Create action sheet with options for email and printing, depending on the content.
Depending on the clicked button, start sending an email or printing.