Categories
Android iOS Development Phonegap Twilio

Twilio PhoneGap/Cordova Plugin Updated to 1.0.4 Support

For those of you using the Twilio PhoneGap/Cordova Plugin https://github.com/jefflinwood/twilio_client_phonegap, I have just updated with Marco Padillo‘s pull request to fix a deprecated Cordova iOS method that was preventing compiling with the 4.1.0 version of the Cordova iOS plugin.

I’ve tested out the plugin with the latest Twilio Client libraries, and everything is great except on the Android side with Marshmallow – the latest Twilio Android Client SDK supports the new runtime permissions, so I’ll need to integrate that and test with my Nexus 7 for Marshmallow support. In the meantime, just target API 22 on the Android side.

Categories
Android App Components iOS Development

Keeping your Mobile App Libraries Up to Date

As a mobile app developer, I use many third-party libraries in my Android and iOS applications. Most of them are open source, but a few are closed source, commercial libraries (such as Flurry, a mobile app analytics SDK).

One of the problems that I’m running into, especially as I have plenty of apps that are now past the “active development” stage, is that these third party libraries don’t necessarily function well on the latest versions of the mobile operating systems. This usually doesn’t affect the shipped version of the apps – iOS in particular does a great job of simulating older operating systems, so that an app that was compiled for iOS 4 will run fine on an iOS 9 device, although the screen size won’t be the best for the newer iPhones. Android lets you specify which SDK version you are targeting, as well as the minimum SDK version you support – you can probably safely get away with supporting Android 4.0 and above for new projects, ignoring the older Android phones running on Android 2.3 (Gingerbread).

The catch comes when it’s time to update these apps – new content, a new visual style, even just an upgrade to support the latest screen sizes. Now a lot of the libraries that may have been ok in 2012 have started to show their age, in particular with iOS’s Adaptive Layout for responsive designs on iOS. Various quirks surface that need to be worked around, and a simple project to update something can take more time than is really needed.

What if you weren’t stressed about upgrading your apps? What if you’d just made updating the app’s libraries part of an ongoing process – some upgrades are necessary (security fixes, new operating system updates), and others weren’t? It’s not like it’s terribly hard to do with either CocoaPods on iOS or Gradle on Android – but out of sight, out of mind, until you get that hard deadline.

I’m building a service that takes your CocoaPods Podfiles, and your Android build.gradle files, and monitors all of this for you. I’m starting with CocoaPods first, as I think the need is greater there due to the way iOS breaks compatibility at the view layer, and then doing Gradle later. You’ll simply get an email any time a CocoaPod or Android library gets updated at the central repository, and you can decide when to upgrade. You can monitor the status of all of your projects on a dashboard to get a quick view of any technical debt that may have started to accumulate.

If you’re using continuous integration, you’ll be able to fire off a quick API call to the service to update your Podfile.lock or build.gradle to keep your project up to date.

Are you a mobile app developer who’s currently stuck in maintenance mode? Would you like to be on top of things, instead of constantly working from behind? Email me at jlinwood@gmail.com so that I can put you into the beta version of the application. I’m just as excited about this as you are!

Categories
Android iPhone Development Phonegap Talks Twilio

Twilio Signal 2015: Video of my Talk

My Talk at Twilio’s Signal 2015 Conference, Using your web development skills to build Twilio-powered apps for Android and iOS, is now up as a video. If you’re interested in adding voice to your mobile apps using the Twilio Client Plugin for PhoneGap, this video is a short intro to the topic. If you have any questions about mobile app development with Twilio, I’d be happy to talk about it!

Categories
Android iPhone Development Phonegap Talks Twilio

Twilio Signal 2015: Build Twilio-Powered Apps for Android and iOS

Categories
Android iPhone Development

App allows tourists to experience ‘12 Years a Slave’

Here’s a nice write-up from the Baton Rouge Advocate on an app for Android and iOS that I worked on with Frank Eakin and Justine Boyer. I did the software development for both apps, in Java and Objective-C.

TwelveYearsApp

App allows tourists to experience ‘12 Years a Slave’

The app officially launches at noon on Saturday, November 1, 2014 at the Louisiana Book Fair on the grounds of the State Capitol in Baton Rouge. Steve McQueen, the director of the movie “Twelve Years a Slave”, and Louis Gossett, Jr., actor and the narrator of the audiobook, are helping to kick off the app launch. On Sunday, November 2, 2014 Frank Eakin and the descendants of many of the characters in the book will take a tour of the app sites, followed by a celebration in Marksville, Louisiana.

I had a great time working on these apps, as they combined my love of history with a great design, great content, and a very interesting story. Many were introduced to the story of Solomon Northup through the movie, Twelve Years a Slave, and I hope they can now easily visit the historical sites associated with his story of being kidnapped as a free man in New York and brought to slavery in Louisiana.

Purchase the Twelve Years a Slave Tour Guide app for the iPhone and the Twelve Years a Slave Tour Guide app for Android.

Categories
Android

Web Speed Analyzer App on the Google Play Store

Download Web Speed Analyzer from Google Play.

I was pretty excited when Google PageSpeed came out for checking web site front end performance, but I was surprised they didn’t release an Android app – just a web page and an API.

webspeedanalyzer-logo-512

I thought it might be fun to work on an Android app that called the Google PageSpeed Insights API, and showed your score and which rules you needed help with. I have a lot of different web sites, most of which are based off themes I get from ThemeForest, WrapBootstrap, MediaLoot, or similar web sites. These themes aren’t always optimized for loading speed and performance, so it’s nice to have a set of things to fix to increase performance.

If you’re a web developer, you can use this to check the front-end performance of your sites, and generate quick score cards. There are a few other Android apps on the Play Store that do the same thing, so you don’t have to just use this one – you can also just use Google’s site as well, of course.ScreenshotNexus10-1ScreenshotNexus10-1

I optimized the app for tablets, and supposedly, it will work on Honeycomb/Android 3.2, although I don’t have access to any tablets from that era for testing – just 4.0 and above. It works well on both the 7-inch, and 10-inch form factors, although I didn’t do anything to differentiate between the two – the next version is going to show more details for each rule, so I may do a 3-pane layout on the 10-inch in landscape.

Probably the most interesting development challenges with this app came from allowing the orientation of the app to change – in Android, that tears down and rebuilds the Activity, so you lose any state information you were holding onto but didn’t explicitly save. You also need to be careful with any network connections you are making, as they could be tied to an Activity that no longer exists.

I’d like to extend the basics of this app to do other metrics/reporting solutions – one idea I had was to create an email deliverability dashboard for SendGrid I could give to clients to see how their generated emails are being delivered (or not delivered, for instance with a bad email address). Another idea would be to provide analytics or metrics for the Drupal CMS. if this sounds interesting to you, feel free to get in touch.

Categories
Android Hackathon Talks Training

Android Training Class: AppHack Austin – November 9, 2013

I’ll be giving a training class on Android development as part of the AppHack Austin hackathon on November 9 from 3pm-5pm.

It’s a mobile app hackathon, so you can enter an iOS, Android, Windows Phone, Blackberry, or HTML5 mobile app if you want to. Don’t know how to do any of those? Take my intro class on Android development – focusing on what you need to know to create an Android app that calls out to a REST API. From there, you can do a lot of cool mashups with APIs.

https://apphack13austin.eventbrite.com/

Bring a recent laptop (4 gigs or more of ram is nice) – and preinstall the Android developer tools (http://developer.android.com/tools/index.html) – it’s a big download. You can use OS X, Windows, or Linux. Also bring your Android ohone or tablet and it’s charger, and you can start building apps for your own device with no signup or payment required!

There’s a discount code embedded on the Eventbrite page as a riddle.

If you can’t make it to the class, keep an eye out for my new project – Building Mobile Apps – online courses for iOS and Android app development.

Feel free to email me at jlinwood at gmail.com with any questions!

Categories
Android Phonegap Twilio

Android PhoneGap Plugin for Twilio Client

I recently got the chance to help out another developer (BetterVoicemail.com) by developing an open source PhoneGap/Cordova plugin for the Twilio Client SDK. If you’re not familiar with Twilio Client, it’s a Voice-over-IP (VoIP) library for web, iOS, and Android that lets you build web pages and mobile apps that can make outgoing phone calls, receive phone calls, chat through the browser, and all kinds of other interesting projects.

One of the interesting things about its implementation is that the JavaScript web Twilio Client SDK does not currently work on either Android or iOS web browsers. This means that to have voice-enabled mobile applications, you need to use the iOS or Android SDK’s. Those are written for developers using the native languages of the platform – either Objective-C, or Android – so it’s not really very easy to have a cross-platform solution.

One way to bridge this gap is to use PhoneGap to build your applications in HTML5/CSS/JavaScript – Steve Graham had built a PhoneGap Plugin for the Twilio Client for iOS at https://github.com/stevegraham/twilio_client_phonegap that shared the same Javascript API as the Twilio web client. There wasn’t an Android implementation, so it wasn’t truly cross-platform.

The first thing I did was to bring the current iOS code base up to PhoneGap 2.9 compatibility – PhoneGap moves quickly and breaks existing plugins, though they do publish a plugin upgrade guide to follow. After using that as a base, I built a test iOS PhoneGap app that exercised the iOS plugin, because the idea was that the Android plugin would work identically to the iOS plugin.

The Twilio Android Client SDK doesn’t have the same API as the iOS version – in particular, to handle incoming calls, you need to construct a PendingIntent for the Twilio Client SDK to fire off, instead of just registering a delegate with the SDK. So for the Android plugin to work, you need to add an activity to your Android manifest XML file. I used the LocalBroadcastManager to communicate with the plugin, so I could implement a listener that worked exactly like the iOS version. You’ll also need to follow the Twilio Client for Android installation instructions (after using PhoneGap/Cordova to generate your project), which are more complicated than the Twilio Client for iOS installation instructions.

If you want to use the  Twilio Client plugin for PhoneGap for Android or iOS, it hasn’t yet been merged back into the original repo yet – so clone it from my GitHub for the time being: (https://github.com/jefflinwood/twilio_client_phonegap)

 

Categories
Android

Repeating Android Animations with AnimatorSet

The Android Honeycomb 3.0 (and newer) animation library has a nice little class called AnimatorSet (not to be confused with the older AnimationSet) that lets you organize animations either to be played together, or to be played sequentially. In this case, I needed to create an infinitely looping image fader that cycled through ImageView objects on the screen.

The ValueAnimator class has a nice setRepeatCount() method that would let me just set up my animation as running forever – but AnimatorSet extends Animator, not ValueAnimator, so you don’t get access to that. Setting the repeat to infinite for each Animator you put in the AnimationSet won’t work if you’re sequencing some animations (fade image 1, fade image 2, fade image 3, repeat), but it would work for two images if you set it to reverse itself.

Instead, the solution is to use an AnimatorListenerAdapter that listens for your animation set ending, and then starts the animation again. Make the animation a member of your fragment or activity, and then just put something similar to this in your listener:

[code lang=”java”]
mAnimationSet.addListener(new AnimatorListenerAdapter() {

@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
mAnimationSet.start();
}

});
mAnimationSet.start();
[/code]

Categories
Android

New Android App: NMC Horizon EdTech Weekly

I’m happy to announce that the NMC Horizon EdTech Weekly app just launched for Android. I built the original app for NMC for iPhone and iPad last year, and it was a lot of fun to build an Android version of the same app  – a lot of things are the same, but there are a lot of differences in user experience between iOS and Android.

NMCAppLibrary NMCAppMap