# Development with Xamarin or IntelliJ

**URL:** <https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139>\
**Category:** Users\
**Created:** [March 31, 2015, 7:31am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139 "2015-03-31T07:31:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Egbert\_Jansen](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/e/bbce88/32.png) [@Egbert\_Jansen](https://forum.dimagi.com/u/Egbert_Jansen)\
**Post date:** [March 31, 2015, 7:31am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139/1 "2015-03-31T07:31:42Z")

</div>

Hi,

We are at the beginning of an Android application development which will  
measure some patient data and store this data locally.  
Eventually the data must also be stored using CommCare.

And now maybe a stupid beginners question:  
Is there a reason why we should use Xamarin or IntelliJ for the Android  
development (in relation with the CommCare communication) or will both work  
fine?

Thanks in advance....

---

<div class="post-metadata">

**Author:** ![Charles\_Fleche1](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/c/3ec8ea/32.png) [@Charles\_Fleche1](https://forum.dimagi.com/u/Charles_Fleche1)\
**Post date:** [March 31, 2015, 7:44am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139/2 "2015-03-31T07:44:58Z")

</div>

If you start a new project from scratch, the common way now is to use Android  
studio which is "just" IntelliJ + Android related plugins and tools.

> **[Download Android Studio & App Tools - Android Developers](https://developer.android.com/studio)**
>
> Android Studio provides app builders with an integrated development environment (IDE) optimized for Android apps. Download Android Studio today.

If you base your own software on the CommCareODK code itself, I suggest you  
suggest to the older, Eclipse based Android SDK as Dimagi's build documentation  
and files are based on Eclipse + ADT :

> **[ADT Plugin (UNSUPPORTED)  |  Android Studio  |  Android...](https://developer.android.com/studio/tools/sdk/eclipse-adt)**

What are you trying to achieve ?

Regards,

> **···**
>
> On Tuesday 31 March 2015 00:31:42 Egbert Jansen wrote: \> Is there a reason why we should use Xamarin or IntelliJ for the Android \> development (in relation with the CommCare communication) or will both work
> 
> --  
> Charles Flèche  
> mHealth Advisor  
> Télécoms Sans Frontières [http://www.tsfi.org](http://www.tsfi.org)  
> Première Urgence - Aide Médicale Internationale [http://www.pu-ami.org](http://www.pu-ami.org)

---

<div class="post-metadata">

**Author:** ![Egbert\_Jansen](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/e/bbce88/32.png) [@Egbert\_Jansen](https://forum.dimagi.com/u/Egbert_Jansen)\
**Post date:** [March 31, 2015, 10:38am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139/3 "2015-03-31T10:38:03Z")

</div>

The application will be created from scratch and not based on the  
CommCareODK.

The user can input some patient data, questions and the app will measure  
some data (communication with hardware).  
This will be with no internet connection.

When connected to the internet, data must be stored in the CommCare  
database. (this is a request for the future)

We already have a lot of experience with C#, so maybe Xamarin can be a good  
choice of creating Android apps.  
But if IntelliJ or Android studio is a better way to go, we would like to  
hear that!

Thanks and best regards,  
Egbert

> **···**
>
> Op dinsdag 31 maart 2015 09:45:09 UTC+2 schreef Charles Flèche: \> \> On Tuesday 31 March 2015 00:31:42 Egbert Jansen wrote: \> \> \> Is there a reason why we should use Xamarin or IntelliJ for the Android \> \> \> development (in relation with the CommCare communication) or will both \> work \> \> \> \> \> \> If you start a new project from scratch, the common way now is to use \> Android studio which is "just" IntelliJ + Android related plugins and tools. \> \> \> \> https://developer.android.com/sdk/index.html \> \> \> \> If you base your own software on the CommCareODK code itself, I suggest \> you suggest to the older, Eclipse based Android SDK as Dimagi's build \> documentation and files are based on Eclipse + ADT : \> \> \> \> https://developer.android.com/tools/help/adt.html \> \> \> \> \> \> What are you trying to achieve ? \> \> \> \> Regards, \> \> \> \> -- \> \> Charles Flèche \> \> mHealth Advisor \> \> Télécoms Sans Frontières http://www.tsfi.org \> \> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org \> \> \>

---

<div class="post-metadata">

**Author:** ![Simon\_Kelly](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/simon_kelly/32/494_2.png) [@Simon\_Kelly](https://forum.dimagi.com/u/Simon_Kelly)\
**Post date:** [March 31, 2015, 11:24am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139/4 "2015-03-31T11:24:46Z")

</div>

If you have good C# experience then Xamarin may get you up and running  
faster. I've never looked at it before so can't give any info about how  
good it is or if you'll have trouble communicating with hardware etc. One  
potential problem is that you may end up tied to the Xamarin platform and  
if you do face any difficulties down the line you may not be able to 'port'  
your code to a normal Android dev environment.

On a slightly different topic, since you are thinking about integrating  
with CommCare there are two approaches:

1. Build a custom app that submits the data directly to CommCare HQ.
2. Build a custom app that the CommCare mobile client calls to get the  
additional data you need.

Using the second approach you would install both CommCare and your app on  
the phone and then CommCare would 'call out' to your app from a form to get  
any additional data you require. This option has the advantage of allowing  
you to focus on the data measurement and letting CommCare deal with  
authentication, submitting data, form design etc. This second approach is  
outlined here:  
[https://help.commcarehq.org/display/commcarepublic/Integrating+External+Applications+with+CommCareODK](https://help.commcarehq.org/display/commcarepublic/Integrating+External+Applications+with+CommCareODK)

> **···**
>
> On 31 March 2015 at 12:38, Egbert Jansen wrote:
> 
> > The application will be created from scratch and not based on the  
> > CommCareODK.
> > 
> > The user can input some patient data, questions and the app will measure  
> > some data (communication with hardware).  
> > This will be with no internet connection.
> > 
> > When connected to the internet, data must be stored in the CommCare  
> > database. (this is a request for the future)
> > 
> > We already have a lot of experience with C#, so maybe Xamarin can be a  
> > good choice of creating Android apps.  
> > But if IntelliJ or Android studio is a better way to go, we would like to  
> > hear that!
> > 
> > Thanks and best regards,  
> > Egbert
> > 
> > Op dinsdag 31 maart 2015 09:45:09 UTC+2 schreef Charles Flèche:
> > 
> > > On Tuesday 31 March 2015 00:31:42 Egbert Jansen wrote:
> > > 
> > > > Is there a reason why we should use Xamarin or IntelliJ for the Android
> > > 
> > > > development (in relation with the CommCare communication) or will both  
> > > > work
> > > 
> > > If you start a new project from scratch, the common way now is to use  
> > > Android studio which is "just" IntelliJ + Android related plugins and tools.
> > > 
> > > [Download Android Studio & App Tools - Android Developers](https://developer.android.com/sdk/index.html)
> > > 
> > > If you base your own software on the CommCareODK code itself, I suggest  
> > > you suggest to the older, Eclipse based Android SDK as Dimagi's build  
> > > documentation and files are based on Eclipse + ADT :
> > > 
> > > [ADT 插件（不再受支持） &nbsp;|&nbsp; Android Studio &nbsp;|&nbsp; Android Developers](https://developer.android.com/tools/help/adt.html)
> > > 
> > > What are you trying to achieve ?
> > > 
> > > Regards,
> > > 
> > > --
> > > 
> > > Charles Flèche
> > > 
> > > mHealth Advisor
> > > 
> > > Télécoms Sans Frontières [http://www.tsfi.org](http://www.tsfi.org)
> > > 
> > > Première Urgence - Aide Médicale Internationale [http://www.pu-ami.org](http://www.pu-ami.org)
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Simon Kelly  
> Senior Engineer | Dimagi South Africa

---

<div class="post-metadata">

**Author:** ![Charles\_Fleche1](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/c/3ec8ea/32.png) [@Charles\_Fleche1](https://forum.dimagi.com/u/Charles_Fleche1)\
**Post date:** [March 31, 2015, 10:43am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139/5 "2015-03-31T10:43:09Z")

</div>

Depending on your workflow / project, writing an entire application is maybe not  
required. Maybe you could write just the hardware-reading bit as an Intent and call  
this Intent from CommCare ? That way you'll save yourself the hassle to write a data  
entry / question application as CommCare already does this pretty well ?

Here is the doc for Android Intent integration on the CommCare Wiki:  
[https://confluence.dimagi.com/display/commcarepublic/Integrating+External+App](https://confluence.dimagi.com/display/commcarepublic/Integrating+External+App)  
lications+with+CommCareODK[1]

Just food for thoughts…

> **···**
>
> On Tuesday 31 March 2015 03:38:03 Egbert Jansen wrote: \> The user can input some patient data, questions and the app will measure \> some data (communication with hardware). \> When connected to the internet, data must be stored in the CommCare \> database. (this is a request for the future)
> 
> --  
> Charles Flèche  
> mHealth Advisor  
> Télécoms Sans Frontières [http://www.tsfi.org](http://www.tsfi.org)  
> Première Urgence - Aide Médicale Internationale [http://www.pu-ami.org](http://www.pu-ami.org)
> 
> * * *
> 
> [1]  
> [https://confluence.dimagi.com/display/commcarepublic/Integrating+External+App](https://confluence.dimagi.com/display/commcarepublic/Integrating+External+App)  
> lications+with+CommCareODK

---

<div class="post-metadata">

**Author:** ![Charles\_Fleche1](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/c/3ec8ea/32.png) [@Charles\_Fleche1](https://forum.dimagi.com/u/Charles_Fleche1)\
**Post date:** [March 31, 2015, 11:31am UTC](https://forum.dimagi.com/t/development-with-xamarin-or-intellij/2139/6 "2015-03-31T11:31:06Z")

</div>

Ah, email collision, Simon… Seems like my message has been lost in the  
limbo for a while, sorry about that.

> **···**
>
> On Tuesday 31 March 2015 17:13:09 Charles Flèche wrote: \> Intent and call this Intent from CommCare ? That way you'll save yourself
> 
> --  
> Charles Flèche  
> mHealth Advisor  
> Télécoms Sans Frontières [http://www.tsfi.org](http://www.tsfi.org)  
> Première Urgence - Aide Médicale Internationale [http://www.pu-ami.org](http://www.pu-ami.org)
