Android Tips and Tricks (Part 1)

Filed under: Android Development — Alexander Troy @ 25. July 2011 10:40 | Comments (1)

+

After a good feedback for our Monotouch / iOS  Tips and Tricks series I decided to start the same thing for Android. This means I try to provide solutions for some common pitfalls during the Android development of our amazing product Fusonic Event Guide.

Please be aware that we do not use Monodroid here, we just use the native way to code the APP, this means all sample code is written in java and our IDE is Eclipse.

In the first part we go after:

  1. “Could not execute method of the activity”
  2. My development phone does not get found by adb
  3. Useful Emulator commands
  4. Start Facebook-App via intent + mobile alternative

If you have problems with the AlarmManager and BroadcastReceiver you can read about this in our last blog entry here. There is also some sample code included.
Read more …


Why we chose PHPStorm over ZendStudio and Eclipse PDT

Filed under: Web-Development — Matthias Burtscher @ 21. July 2011 12:33 | Comments (3)

As a software development company we are primarily focused on web based applications such as our Social Intranet Software Fusonic Connect. For the last five years we have used Eclipse PDT as our favorite IDE. We have always been happy with the features it provided and did not have the time to do an intense investigation on other IDEs. A few months ago, we had some free time and decided to take a look at some other IDEs and compare them in detail. We picked PHPStorm, ZendStudio and Eclipse PDT to be compared in detail. And here are the reasons we finally chose PHPStorm over ZendStudio and Eclipse PDT:

Read more …

Tags: ,

Chive 0.5.1 released

Filed under: Chive mySQL-Admin,Web-Development — David Roth @ 12:28 | Comments (0)

I’m pleased to announce the release of chive 0.5.0 / 0.5.1, a next generation mysql-management software which brings joy to web developers.

Since the last release of the 0.4 series we fixed 11 Bugs including some nice improvements.
Some Key changes are:

- Improved import
- Improved search+edit handling
- Submit SQL-Query with CTRL+Enter + visual feedback

Read more …

Tags: , , ,

Monotouch – Tips and Tricks (Part 2)

Filed under: .Net,General,Mono,Monotouch,iOS Development — David Roth @ 14. July 2011 14:59 | Comments (2)
eventguide
+

Part 2

This is the second part of my “Monotouch – Tips and Tricks” series. I will write about the following topics:

  • How to create reminders using NSNotifications + use of my UIAlertHelper class.
  • How to simulate reminders/alerts using NSNotifications when the application has already been killed. (handling it in the FinishedLaunching method)

A cool feature of the Fusonic EventGuide application is the ability to star your favourite events/gigs. All starred gigs are not only available on your personal running-order, you will also get a notification shortly before the event starts so that you don’t miss your favourite bands. So I needed a solution to show notifications some minutes before the gig starts and to allow the user to jump directly to the event info page (alert action buttons).

Read more …

Tags: , , ,

Monotouch – Tips and Tricks (Part 1)

Filed under: .Net,Mono,Monotouch,iOS Development — David Roth @ 6. July 2011 09:44 | Comments (1)
eventguide
+

I recently had the joy of writing the IPhone-implementation of our amazing Fusonic EventGuide Product.
Because of my C# .NET/Mono experience and love it was obvious to reuse skills and libraries and so we bought a licence of MonoTouch. This was after the lay-off of the monotouch team, but luckily mtouch 4.0 is very mature and from my point of view it is definitely worth investing this money even though you will have to buy the Xamarin IOS version sooner or later.

Although programming against the Monotouch APIs using monodevelop was a real joy and really straight forward, you will come over some problems or nasty bugs from time to time. The goal of my blog series is to summarize my experiences in the last two weeks, show you up some common pitfalls and tell you some tips + tricks and useful libraries I used for our product.

Read more …

Tags: , , ,

Why my BroadcastReceiver does not get called?

Filed under: Android Development — Alexander Troy @ 5. July 2011 14:37 | Comments (0)

The Problem

If you want to call a function at a specific time or interval even if the smartphone is sleeping you have to use the AlarmManager.  But now the funny part starts! There could be several reasons that your receiver doesn’t get called. This blog post could save you hours of frustration!

The possible reasons

1. Receiver not declared in AndroidManifest.xml
Declare the receiver in the Manifest-file:

<receiver android:name=”net.fusonic.testapp.receivers.TestAlarmReceiver”></receiver>

2. Receiver in the Manifest xml is misspelled
Always remember that the whole Android-System is case sensitive. So check your spelling is correct in the AndroidMainfest.xml. Remember that the eclipse refactoring functions do not change packagename correctly if you use the short form like “.receivers.TestAlarmReceiver“.

3. PendingIntent requestCode missing?
If you create a PendingIntent for your Receiver, please add an “requestCode” – even it is a random number! Without your “onReceive” code never get called!

4. AVD running for a long time (very tricky)
Be aware of using the AVDs especially if your working with “REALTIME_WAKEUP”  and SystemClock… So if you try to test your alarm, please restart the AVD or test on a real device!

Sample Code

BroadcastReceiver called by an AlarmManager:

public static void scheduleTestAlarmReceiver(Context context) {

   Intent receiverIntent = new Intent(context, TestAlarmReceiver.class);
   PendingIntent sender = PendingIntent.getBroadcast(context, 123456789, receiverIntent, 0);

   AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
   alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+startDelay, someDelay, sender);

}

BroadcastReceiver class:

public class TestAlarmReceiver extends BroadcastReceiver {

      @Override
      public void onReceive(Context context, Intent arg1) {
         // your code here!
      }

}

AndroidManifest.xml (insert inside the application-node)

<receiver android:name="net.fusonic.testapp.receivers.TestAlarmReceiver"></receiver>