Flex Mobile – Preventing the Back Button Event Android

Hi Guys, There are many occasions when you would like to prevent or override default back button event for android devices. One of them is say when your present user with a login screen and they log in successfully and then you push a target view to the view stack, what if someone press hardware back button? Some questions that may arise in this situation is if you are offering in built session support or something equivalent to "remember me" functionality what happens? I guess user log-in View is shown again because the hardware Back button behaves a little bit different to your in view "popView" handler. To prevent the default Back button event is really simple? Override backKeyUpHandler  function of your ViewNavigatorApplication Here is how its done: In your application main file enter the following code [geshi lang="mxml" nums="1" target="_self" ] [crayon-58d5247dc63bc956985729/] Above code is enough to stop default event to occur. Even better what If you would like to ask your user a question (when they hit hardware back key say) "do you want to Exit this application?" how you go about this? Lets find out how? To start with create a SkinnablePopUpContainer and save it as PopUp.mxml under your components package or may be anywhere you like. [geshi lang="mxml" nums="1" target="_self" ] [crayon-58d5247dc63cf254793262/] [crayon-58d5247dc63d6959195491/] Now edit the overridden  backKeyUpHandler function to include this code [geshi lang="mxml" nums="1" target="_self" ] [crayon-58d5247dc63dd640824485/] [crayon-58d5247dc63e3580671924/] [crayon-58d5247dc63e8448314587/] and thats it you get the following result                   I hope this helps. If it does answer your question please leave your comments as a feedback, Ta!   Cheers … [Read more...]

Flex mobile app portrait landscape only single orientation

So guys there are times when you want your flex mobile application to be either in portrait OR landscape orientation. The reason why we want to do it this way can be many. Lets see how its done In your Adobe AIR Application Descriptor File XML file Look for XML element called initialWindow. Under this element if not already uncommented, uncomment aspectRatio and autoOrients elements For landscape use this [crayon-58d5247dc7565906010218/] and for portrait use this [crayon-58d5247dc7571044375668/]   I hope this helps … [Read more...]

Flex mobile – how to open email, contact, url, punctuation keyboard keypad on textfield focus

One of the coolest features of Flex SDK 4.6 comes in form of Soft Keyboard types. There are few of them as stated below contact default email number punctuation url All of them serves specific needs, say for example if you accept user email addresses from within your mobile app then its a good move to show a specific keyboard just for that purpose. so how is it done? Flex SDK introduces a new class called SoftKeyboardType. You select the keyboard type with the softKeyboardType  property on the text input control. example is shown below as to how we can make use of the soft keyboards [crayon-58d5247dc7b0c400124283/] Also if you would want to force user input to be in capital letters only then you can set another helpful property "autoCapitalize" to true,  You can also check for spelling setting the property autoCorrect to true. so the above code can be re-written as below [crayon-58d5247dc7b17777546471/] [crayon-58d5247dc7b1e591535409/] You can read more about the Soft keyboards here http://help.adobe.com/en_US/flex/mobileapps/WS82181550ec4a666a39bafe0312d9a274c00-8000.html#WS19f279b149e7481c-33fab5fe1331cc6b62f-8000 I would also recommend this article written by Holy Schinsky http://devgirl.org/2011/11/29/flex-mobile-development-flex-4-6-cool-new-soft-keyboard-features-sample-w-source/ All in all I am loving the soft keyboard types introduced in Flex 4.6 If you have any question please share with everyone by leaving your comments I hope this helps   Cheers             … [Read more...]

how to open numeric keypad keyboard flex mobile application text field focus

Well with Flex SDK 4.6 it is a possibility and very easy to do so. Flex SDK 4.6 introduces many types of soft keyboard types, out of all those one type is type "Number". Generally we would want a numeric only keypad for text field where we are expecting people to fill only numeric values such as Age, Date of birth fields, IDs etc etc Without wasting any more time lets see how this is done [crayon-58d5247dc835b831243335/] [crayon-58d5247dc8367225922090/] If you want to specify whether a virtual keyboard should be displayed when this Interactive Object instance receives focus the you can set "needsSoftKeyboard" property to true so the above logic can be re written as [crayon-58d5247dc836d782712965/] [crayon-58d5247dc8373328857053/] Read more about this option here http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/display/InteractiveObject.html#needsSoftKeyboard So now when you launch your application then you will get the numeric keypad when your textfield get the focus as shown below In iPhone 4           In Galaxy Tab (Android)                 I will discuss about other keyboard types in my next post I hope this helps … [Read more...]

Flex latest SDK 4.6 rocks

Woo hoo So finally its here Below are few things that we've been waiting for Performance boost across all devices SplitViewNavigator gives you more power the way you navigate your App. SoftKeyboard types to launch say Numeric, URL, Email etc SpinnerList DateSpinner Dynamic spash screens and so many other thing that you can write a book on it :) but to know what new you have to download it and try it yourself   You can get it by clicking on link below http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.6 List of improvements can be found here http://www.adobe.com/content/dotcom/en/devnet/flex/articles/introducing-flex46sdk.html Full SDK documentation can be found here http://www.adobe.com/devnet/flex/documentation.html I think this is THE most important release till date in Flex SDK branch for mobile app developers     Cheers           … [Read more...]

Flex SDK mobile app close or shutdown on Back button press

Everyday we learn something new and today I learned how to close my Flex App on pressing a Back button on Android devices. You can however change the code to perform a application shut down on a button press from within your mobile application. Because I have to search a lot for this and it wasn't easy to find an answer so I thought I should write an article and pin point what exactly is required to achieve this. First thing is to register an event on Application activation. My application is View based so here is what I've done [geshi  nums="1" highlight="4] [crayon-58d5247dc8a96073888185/] [crayon-58d5247dc8aa3007575255/] Now in the viewnavigatorapplication1_activateHandler function add the following code, we are basically registering an event [geshi lang="actionscript3" nums="1" target="_self" ] [crayon-58d5247dc8aa9082445485/]   and then we write function called handleBKey [geshi lang="actionscript3" nums="1" target="_self" ] private function handleKeys(event:KeyboardEvent):void [crayon-58d5247dc8aaf255699941/] [crayon-58d5247dc8ab5606688140/] [crayon-58d5247dc8aba286527768/] thats it you are done. This is generally important in many cases where you are compiling your code for both iOS and Android devices and Hardware Back button is something of a pain in many scenarios. I hope this will help   … [Read more...]

Prerequisites or Checklist for iPhone iPad iPod iTunes App Submission

[sam_ad id="20" codes="true"]I have been submitting apps to Apple in recent months so I've prepared a checklist for myself for my own reference. Lot of the content comes from Apple guidelines itself and other lot comes from different people that had trouble getting an approval from Apple with their first submission, all RnD searching Google. This is follow up to my previous post where I discussed how long does it take to get an approval from Apple for you App. Read that post here  So lets see what I think should give you over 95% chance of getting an Approval with your first submission. Ask yourself these questions that are below: Does your App Crash? Verdict: Rejection, Any App that crash on its launch or while browsing has high chance of getting rejected Does your App have bugs that are obvious to a fool like me? :) Verdict: Rejection, Any App that exhibit bugs has high chance of getting rejected Does your App not work as per advertised? Verdict: Rejection, Apps that do not perform as advertised by the developer will be rejected Does your App include undocumented or any hidden features? Verdict: Rejection, You should always tell Apple how hidden features can be unlocked. These details are kept safe with Apple and never get published. Does your App read or write data outside its designated container? Verdict: Rejection, You should never try to do this Does your App download code in anyway or form? Verdict: Rejection, You should never do this Does your App install or execute any other executable? Verdict: Rejection, You should never try to do this  Does your App version include  "Beta", "Demo", "Test", "Trial", "Initial fun release" etc Verdict: Rejection, App must be fully tested and should be version 1.0+, try not version your App as 0.8,0.9 etc  Does your App duplicate any other App that is already in iTunes? Verdict: Rejection, You should never try to do this, bring on your creative side, do not copy.  Does your App … [Read more...]

how long does it take to get iPhone app approved and show up in App store iTunes?

Ok this is the question that pop up in every developers brain when they are working on or have finished their iPhone/iPad app. First of all let me tell you that if all depends how busy Apple review team is. You should check the throughput of the review team. Recently when I submitted my App to Apple for review the throughput was 99% for September. What this means is that I was virtually guaranteed that the App will be reviewed within 7 days (estimate only) but instead it got reviewed within 4 days. Here are some stats for my personal submissions Apps Complexity: Normal Legalities (such as copyrights issues): None Avergare review time taken for each App: 5 days iTunes Availability: within 1 day after Approval. So I would say that lot depends on the complexity of your App and how heavy it is. I guess if it is a business App chances of Approval are quite high on first submission, but don't take my word, you have to comply with the long list of rules set by Apple for your App, If you App fails on any single one of them then your App will be rejected. Rough estimates vary from 4 days to 20 days for your application to get reviewed and further 2-few hours  for it to be included in iTunes store considering that all goes well. Keep in mind, It all depends on app's complexity, app content, app legal implication for Apple such as if you are using any copyrighted material then you could be asked for proof that you have permission to show the copyrighted content in your App or if your app stream music then off course you will need to present legal docs to say that you own the rights to broadcast such and such song etc etc. I found that the Apple's initial estimation on their site is quite reliable (3-6 weeks), but again, that's not always the case. Finally I have to say that there is no simple and straight forward answer to when your App will be reviewed because there are so many things that could go wrong thus delaying you App, because say for … [Read more...]

The App was not installed on the iPhone iPad iPod because the signer is not valid

This happens when you are trying to install and App which is not yet approved by Apple and you are trying to install it with the distribution profile. Now I know you are in the same boat as me to test the final distribution release on your iDevice but YOU SIMPLE CANNOT DO THIS because of the restrictions Apple impose through iTunes. The only way I can suggest you is to Jailbreak your iDevice (Which I am not in favor) and then try installing your distribution App on. When you JailBreak your phone one thing you must keep in mind is that you lose you warranty and and future update to the iOS. So be careful. I am not aware if there is any workaround to this. If you know any please leave a comment. Once you Jailbreak your phone of pad then all the restrictions imposed by Apple are gone and you can use other third party sync programs to install your app onto your device. One thing you must do is that once you do any change to your App do create a new distribution profile and build you App with that. Ad-hoc provisioning is pretty near to the actual distribution profiles so do test with them too. The worst thing is that you cannot test your App with the actual distribution profile. Now the above is applicable for the devs who are sort of trying to test their distribution release in the iDevice, but what about when you are trying to install an App and  you get Signer not valid error. This error started to originate I believe in iTunes 10 onwards, This could be a False Positive as well. What I recommend is to remove iTunes from your system and do a clean install. some of the error iTunes throw are bound with incorrect upgrade. I am not saying that upgrade is buggy or anything but I believe that you should give it a go. If you would like to add something to my opinion please do so by commenting. If you've purchased the App from iTunes and are getting this error, there is an official article available from Apple's website which can be found … [Read more...]

How long does it take for an App to be approved and available in the Android and Amazon Market?

Some questions that has possible answers below: android market is not showing my published application My app not appearing in Android Market Android Market not working Same question, different ways to ask :) Fir of all lets answer  "How long does it take for an App to be approved and available in the Android and Amazon Market?" Quick answer from my experience Android Market (roughly Instantly i.e. In between 3-5 minutes) Amazon Droid market (roughly 1 hour - 5 days) What if it doesn't show up instantly even though the status of you application shows up as Published Here are quick tips from me In your manifest file check if all support screen setting is correct i.e. something like this Check if the sdk version is properly set e.g. If the above value is too high then that could be the issue  Check if your apk build does not have a /lib folder Do NOT forget to hit Save button at the top for Google Android Market. One Last thing make sure that you put a decent description to the App. I am not sure if that works or not but let me tell ya, It could be timing but when I released my first App to Droid market it had on 1 Line of description but then I wrote some more lines to make it like 300 characters+ And within a minute It was up and running. Now this could be totally a timing thing, but I did not retest the time it took to make my app live by removing the extra description that I wrote to see what happens as I didn't want to take a Chance :) I hope this helps Cheers . … [Read more...]