Wednesday, 12 November 2014

Testing with ExactTarget MobilePush - a couple of gotchas

It was with some reluctance I had to re-enter the world of ExactTarget's MobilePush today, something I've previously had a very poor experience with. This time round was initially met with some frustration (things not doing what you expect them to do) but seeking support was actually a pleasant experience, getting concise accurate answers to my queries within minutes.

The support guy helpfully alerted me to a gotcha, and I picked another one up myself. These together cost me a lot of time:
  1. In your development environment the ET device ID for your device changes regularly. This means that each time you deploy to your device you should check the ET ID, so that when you're sending push messages from the Interactive Marketing Hub you know you have the correct device ID in your audience list. The easiest way to check the ET ID is thus: 
  2. //iOS
    NSLog(@"== DEVICE ID ==\nThe ExactTarget Device ID is: %@\n", [ETPush safeDeviceIdentifier]);
    
    //Android
    Log.v("ETPUSH", new DeviceData().uniqueDeviceIdentifier(getApplicationContext()));
    
  3. The registration database updates on a 15 minute cycle. This means that when your device registers with ET it will take anywhere between 0 and 15 minutes for you to be able to find it in the contacts list.

Once these things were considered, and once I'd fixed my dev app which had mysteriously become unprovisioned (what happened to my APNS certificate that used to be there?) then things looked a lot brighter.

Monday, 10 November 2014

CordovaActivity cannot be resolved to a type

Another problem I had updating my Cordova framework cam with this message:

CordovaActivity cannot be resolved to a type

To resolve this, I went to project Properties -> Java Build Path -> Source and Add Folder, to include the CordovaLib\src folder.

invalid resource directory name: /Applications/AndroidSDK/ [...] /google-play-services_lib/bin/res/crunch

I just updated to the latest Cordova by doing the following:

npm update -g cordova
cordova platform update android 

Which took my Cordova CLI to v4 and my Cordova for Android to 3.6.4.

 I then had a problem building:

     [aapt] invalid resource directory name: /Applications/AndroidSDK/sdk/extras/google/google_play_services/libproject/google-play-services_lib/bin/res/crunch

 The fix turned out to be simple; I deleted the crunch directory and then all was good.