Tag Archives: mobile app

Xamarin – User interaction with image views

It’s sometimes the simplest of things I tend to overlook when debugging.

While recently working on one of my company’s mobile apps, I came across an issue which had me stomped for a good 30 minutes before realizing how easy it was to resolve.

Part of the work involved creating custom views in our app to display mobile ads.  UIImageViews to be exact.  This view contains a full screen image, and a close button at the top right of the view to dismiss the ad.  Simple, right!  Well, the problem was no matter what I did, the close button did not respond to any touch events.

As you can see from the code sample below we’ve taken the route of using C# to create some of our views.  Here is what the constructor of the subclassed UIImageView looked like before solving the problem.

public FullPageAdView(float adWidth, float adHeight, Ads ads) : base(new RectangleF(0, 0, adWidth, adHeight))
if (ads == null)
throw new ArgumentException("Mobile Ads are missing");

MobileAds = ads;
closeButton = UIButton.FromType(UIButtonType.Custom);
closeButton.SetImage(UIImage.FromBundle(“RedCloseButton.png”), UIControlState.Normal);
closeButton.SetImage(UIImage.FromBundle(“RedCloseButtonClicked.png”), UIControlState.Selected);
closeButton.TouchUpInside += OnCloseButtonClicked;


We’ve properly registered the TouchUpInside button event and added the button to our custom view.  Should just work right…NOPE!  Turns out many of the controls in UIKit, including UIImageView, do not have touch enabled by default.  It has to be turned on as you can see in the snippet below.

public FullPageAdView(float adWidth, float adHeight, Ads ads) : base(new RectangleF(0, 0, adWidth, adHeight))
if (ads == null)
throw new ArgumentException("Mobile Ads are missing");

MobileAds = ads;
closeButton = UIButton.FromType(UIButtonType.Custom);
closeButton.SetImage(UIImage.FromBundle(“RedCloseButton.png”), UIControlState.Normal);
closeButton.SetImage(UIImage.FromBundle(“RedCloseButtonClicked.png”), UIControlState.Selected);
closeButton.TouchUpInside += OnCloseButtonClicked;
this.UserInteractionEnabled = true;

If you are using Xcode to create your image view, here is what the option looks like (borrowed image from here).


And there you have it. Simple solution to a simple problem.

I hope this saves someone else the hassle and time I spent in resolving this issue.

Happy Xamarin trails!

Tagged , , , , ,

Xamarin App Rejected – Position Independent Executable

Recently, my Xamarin mobile app was rejected from the App store with the following error.

Non-PIE Binary – The executable ‘appname.app’ is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.

Turns out Apple recently introduced an extra step in the build process , which now requires your app to be built as Position Independent Executable (PIE).  Position Independent Executable (PIE) applications can be loaded at a random memory address when run. This has security benefits for your application. iOS 4.3 or later, and OS X 10.7 or later, fully support PIE executables.

Fortunately, Xamarin has also updated their framework to support building applications as PIE.  You can find this update via the Beta Channel, Xamarin iOS 6.3.7 to be exact.  So any native executable is now built as PIE by default.

I hope anyone who runs into the PIE issue finds this helpful.

Tagged , , ,

WinRT: FrameState _PageKey Error

While working on my latest Windows store app, I ran across an issue while performing some navigation between pages.  See the error screenshot below.


You need to make sure that the page being navigated to is calling base.OnNavigatedTo in their OnNavigatedTo methods.  This is because that is where the page key is set up, which is required for when you’re navigating away from a page to save its state.


Tagged , , , ,

WinRT: Unable to activate windows store app

I recently came across this error while building my latest Windows Store app, and found it to be extremely frustrating to say the least.  So I thought I’ll post what I did to resolve it.


After several attempts to resolve the problem, some of which included acquiring a new developer license (via the Project -> Store menu in Visual Studio), restarting Visual Studio, and even restarting the machine.  All to no avail.

Finally, I decided to “pretend” I had just created this project, so I went to the BIN and OBJ folders of the project and deleted EVERYTHING under those folders.  And BINGO, it started working again.

I’m sure some folks have already come across this and have been able to resolve it, but I hope this helps the folks who might just be starting out with Windows 8 development

Tagged , , ,

Job Compass for Windows Phone 7

Need an app to help you make that next career decision?  Look no further than Job Compass, a decision-making app to aid you in your next career move.

Job Compass is powered by extensive data from CareerBuilder, Zillow©, and the U.S. Department of Labor, and is currently only available on *Mango* phones.

Here’s what Job Compass does for you:

  • Allows you to search for jobs provided by CareerBuilder (Quick and Advanced options)
    • Multiple search criteria including location, company name, pay, industry, employment type, etc.
    • Easy browsing for large result sets
    • List & Map views of jobs
    • Sort and filter your search results
    • Save search criteria for future viewing
  • Job details
    • Includes infsuch as job title, description, requirements, company contact info, etc.
    • Save jobs as favorites for offline viewing
    • Map of job location with turn-by-turn directions (where available)
    • Neighborhood infbased on job location (Homes for sale, etc.). Powered by Zillow©
    • Visualized career stats in job-related fields (Yearly/Hourly wages & Employment #’s)
    • Share via Email, Twitter, Facebook, etc.
    • Apply for job via Careerbuilder website
    • Live Tiles (Pin job tiles tyour phone)
  • Explore Job/Career Trends
    • Occupations with highest employment
    • Top wage earning occupations (Yearly/Hourly)
    • Visual charts texplore trends
  • Explore recent Job/Career stats
    • Yearly/Hourly Wage Percentile breakdowns
    • Visualized career stats
And of course, can’t forget some screenshots and video.

So go grab your copy of Job Compass.
P.S. Job Compass is participating in the Occupational Employment Stats Challenge.  This is a development competition hosted by the Department of Labor.  I would love if you could show your support by casting a vote for my app.  Thank you so much.  Please see the link below.
Tagged , ,

amCharts for HTML5/JavaScript


I have developed several web and mobile apps, some of which needed some sort of data visualization.  Among my arsenal of charting tools is amCharts.  So far, I have used their charts for Silverlight, WPF, and Windows Phone 7 platform-based applications, and they have always performed great.

With my recent dive into developing apps using HTML5/Javascript/JQuery, I needed to make sure I had a decent option for charting data.  And sure enough, with the recent release of amChart’s charting controls for Javascript/HTML5, I know I have a reliable option for charting.

Check out their website here for a closer look at all their tools and controls.

Tagged ,

Amber Central wins Microsoft State/Local Govt App contest

Download Amber Central

In December,  Microsoft launched the Windows Phone Government Apps Contest for state and local government partners to create and submit apps to be deployed into immediate production.

With the recent launch of the new Windows Phone, this contest provided an excellent opportunity for partners, developers, and hobbyists to showcase their skills by creating a Windows Phone application that meets real world needs of citizens or government customers.

Through this effort, a good mix of apps came about, that facilitates citizen engagement, increase transparency and improve access to government services—all while improving the customer experience for citizens and productivity for government employees.

The final deliberations have been made, and at the 2011 US Public Sector CIO Summit the contest judges announced the winning entries.  50 app entries were accepted, and only 10 were chosen.   And yours truly was on that favored list.

Thanks to Microsoft for hosting this competition, and if you are interested in developing for the Windows Phone 7 platform, Microsoft has launched another apps contest for Health and Life Sciences.  Click here for more info.

Tagged , , ,

SvFx for Windows Phone 7 (Beta)

Are you currently developing for the Windows Phone Platform?  If you are like me, creating sleek UI animations and controls isn’t your greatest gift.  So, enter SvFx controls for the Windows Phone 7.

According to their website:


SvFx for Windows Phone includes all SvFx controls ported to Windows Phone platform. You can use Carousel, TransitionControl, SlideShow and TextAnimation controls to build applications for Windows Phone mobile devices.
About 500 ready animation patterns included.

There are several notes about this release:

  • Currently there is no toolbox items registered inside VisualStudio.
  • It is not possible to use single “cellbi” XAML namespace prefix.
  • This release does not include samples.
  • There is no documentation included.

Their development team would like to get your feedback.
Let’s help make SvFx controls better.

See some of the controls in action here.  And if you are a fellow blogger, check out on of their special offers.

SvFx for Windows Phone Beta is now available for free. Please request your free download via support@cellbi.com

Tagged , ,

Amber Central for the Windows Phone 7

Amber Central for the Windows Phone 7 (a free app) is designed to help in the search for, and safe recovery of missing children.

It includes:

  • A real-time feed of active AMBER Alerts from the National Center for Missing & Exploited Children® (NCMEC) including some information about the victim, when and where they were reported missing, and the type of alert.
  • A listing of missing children from NCMEC organized by the states from where they are missing.
  • A listing of missing children from NCMEC reported missing in proximity to your current location.
  • The ability to share the active AMBER Alerts via Twitter, Facebook, Email, and SMS messages.

If a user has information about a case or has seen one of the missing children, they can press a button and automatically call NCMEC’s toll-free 24-hour hotline 1-800-THE-LOST (800-843-5678), or contact the local authority in charge of the missing child case.
Although this application includes a listing of all active AMBER Alerts, it does not currently actively notify the user when a new AMBER Alert is issued (Live Tile feature coming soon). For active notification, NCMEC encourages all wireless subscribers to register to receive Wireless AMBER Alerts™. Through that initiative, they can sign up at www.wirelessamberalerts.org to receive text message notices about AMBER Alerts that have been issued in their area.
Please consider downloading the Amber Central Application and signing up for Wireless AMBER Alerts. You might be able to help an abducted or missing child come home safely. For other ways that you can get involved, please visit NCMEC’s website here.

Check out the video walk-through of Amber Central below.

I had some great resources that made Amber Central possible.  Many thanks to:

Ramesh – My colleague at work.  For great input and advice.  Extremely great guy to be working with.  He has also successfully published his apps (discountCalc & Health Caddy).

Telerik – For their “Rad” Windows Phone controls.

Laurent Bugnion, Microsoft MVP (Silverlight) creator of MVVMLight, a Model-View-View-Model framework for WPF, Silverlight and Windows Phone 7 applications. Always enjoy working with MVVMLight, AND

National Center for Missing & Exploited Children® (NCMEC) – For the great Amber Alert Feeds

Download Amber Central

Tagged ,

Easy Diary for Windows Phone 7

I have always wanted to get into the mobile space.  Particularly with developing apps.  So when the Windows Phone 7 was announced, as a newbie Silverlight developer (a year ago), I thought this would be a great chance to do so.  And so, I dove in.

The Win Phone 7, a Silverlight & XNA developer platform makes it fairly easy for current Silverlight/XNA developers to transition into the mobile space.  And I have to say, it’s been very exciting.

Easy Diary, a diary/journal application, was my first (of many apps to come) for the Windows Phone 7.  It gives potential users a quick and easy way to record moments throughout their day.  They can also connect with popular social sites like Twitter & Facebook, and display their online activity as part of their diary.  The app took about two weeks of total work, and was released to the Windows Marketplace a few months ago prior to the release of the phone. 

I will soon be posting more info on my current and future apps on my site here.  In the meantime, you can click here to view my app in the marketplace (Zune software required).  There was also a small article posted about my app here.

While I would like to say I figured everything out on my own while developing my app, that just won’t be right.  So I have to give credit where credit is due.  See below for credit(s), resources, and screenshots of the app.


Laurent Bugnion created a very light, flexible and versatile MVVM framework for the Windows Phone 7 (dubbed MVVM Light), Silverlight, and WPF.  It made my life very easy while developing this app and it will come in very handy in the many apps to come.


There are many valuable resources pertaining to developing apps for the Windows Phone.  Ranging from beginner to expert levels.  Here are just a few of them:


There are currently over 3,000 apps in the windows marketplace, and it’s going to be very exciting to see many talented developers come up brilliant ideas and even more great apps in times to come.

Good move Microsoft…good move.

Tagged , , , , , , , ,
%d bloggers like this: