{"id":1605,"date":"2013-09-15T12:02:18","date_gmt":"2013-09-15T00:02:18","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=1605"},"modified":"2013-09-15T12:02:18","modified_gmt":"2013-09-15T00:02:18","slug":"anatomy-of-a-camera-app","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/1605\/","title":{"rendered":"Anatomy of a Camera App"},"content":{"rendered":"<span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\">7<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p><strong>Part 1<\/strong> in an as yet unknown number of articles using a (very) simple camera application to demonstrate building first class <strong>Android<\/strong> applications using &#8220;<em>Pascal for Java<\/em>&#8221; &#8211; i.e. <strong>Oxygene <em>Cooper<\/em><\/strong>.  In this first instalment we will look at the basics &#8211; the components we are going to need and the basic UI of the application.<\/p>\n<p><!--more--><\/p>\n<p>As I said, this will be a very simply camera application.  As such it will have the bare minimum of user interface elements, consisting of simply a preview or viewfinder and a button for actually capturing the photo.<\/p>\n<p>So first, let&#8217;s create a new project.<\/p>\n<h3>Getting Started<\/h3>\n<figure id=\"attachment_1606\" aria-describedby=\"caption-attachment-1606\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.01-.png?ssl=1\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.01-.png?resize=300%2C61&#038;ssl=1\" alt=\"Starting a new Android Project\" width=\"300\" height=\"61\" class=\"size-medium wp-image-1606\" srcset=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.01-.png?resize=300%2C61&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.01-.png?resize=500%2C102&amp;ssl=1 500w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.01-.png?w=936&amp;ssl=1 936w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-1606\" class=\"wp-caption-text\">Starting a new Android Project<\/figcaption><\/figure>\n<p>This is very straightforward.  We simply choose the Android application template provided with Oxygene.  I named it &#8220;<strong>nz.co.deltics.demo.camera<\/strong>&#8220;.  The default project template actually contains some layout and some code that we will not need, but initially it&#8217;s the only template we have.  Being VisualStudio we can of course create our own project template for future use if we prefer to start with something completely &#8220;empty&#8221;.<\/p>\n<p>For now though, this will do and we are created a project consisting of almost everything we need for our app:<\/p>\n<figure id=\"attachment_1607\" aria-describedby=\"caption-attachment-1607\" style=\"width: 234px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.32-.png?ssl=1\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.32-.png?resize=234%2C219&#038;ssl=1\" alt=\"The Initial Project Contents\" width=\"234\" height=\"219\" class=\"size-full wp-image-1607\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-1607\" class=\"wp-caption-text\">The Initial Project Contents<\/figcaption><\/figure>\n<p>The &#8220;Properties&#8221; item in our project contains the Android manifest for our app but is also the item that provides access to various configurable aspects of our project such as the target Android version, the location of asset and resource folders, compiler settings etc etc.<\/p>\n<p>For our purposes the manifest, layout and the initial activity of our app are our first areas of interest.<\/p>\n<h3>Manifest Declarations<\/h3>\n<p>First we must add some permissions and features to the manifest that our application is going to need.  Since we are implementing a camera application we must ensure that our app indicates it&#8217;s reliance on camera hardware being present and requests permission to use it.  The two might seem to go hand in hand, but we might be writing an app which can use an existing camera app to take pictures in which case we would want to be sure that a camera exists but don&#8217;t need permission to use it ourselves since we would be asking another app to take pictures for us.<\/p>\n<p>But in this case we will be taking the pictures ourselves so we need both the hardware and the permission to use it.<\/p>\n<p>Also, since we intend capturing images and saving them, we will need permission to write to storage on the Android device.  These are all declared in the application manifest.  This is an XML file <strong>AndroidManifest.android-xml<\/strong>, and in this project initially looks like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;manifest xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n\t\tpackage=&quot;nz.co.deltics.demo.camera&quot;&gt;\r\n  &lt;!-- the android:debuggable=&quot;true&quot; attribute is overwritten by the compiler when the debug info option is set --&gt;\r\n  &lt;application \r\n        android:label=&quot;@string\/app_name&quot;\r\n        android:icon=&quot;@drawable\/icon&quot;\r\n        android:debuggable=&quot;true&quot;&gt;\r\n    &lt;activity android:label=&quot;@string\/app_name&quot; android:name=&quot;nz.co.deltics.demo.camera.MainActivity&quot;&gt;\r\n      &lt;intent-filter&gt;\r\n        &lt;action android:name=&quot;android.intent.action.MAIN&quot; \/&gt;\r\n        &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; \/&gt;\r\n      &lt;\/intent-filter&gt;\r\n    &lt;\/activity&gt;\r\n  &lt;\/application&gt;\r\n  &lt;uses-sdk android:minSdkVersion=&quot;4&quot; \/&gt;\r\n&lt;\/manifest&gt;\r\n<\/pre>\n<p>First we add the camera hardware feature that we need.  <strong>Oxygene<\/strong> provides code completion support for <strong>Android<\/strong> XML files in the Visual Studio editor.  In this case the entry we need is a <strong>uses-feature<\/strong>:<\/p>\n<figure id=\"attachment_1612\" aria-describedby=\"caption-attachment-1612\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.41.32-.png?ssl=1\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.41.32-.png?resize=300%2C205&#038;ssl=1\" alt=\"Adding a feature dependency\" width=\"300\" height=\"205\" class=\"size-medium wp-image-1612\" srcset=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.41.32-.png?resize=300%2C205&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.41.32-.png?w=326&amp;ssl=1 326w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-1612\" class=\"wp-caption-text\">Adding a feature dependency<\/figcaption><\/figure>\n<p>We also need to add two <strong>uses-permission<\/strong> entries, one for <strong>CAMERA<\/strong> (to be given permission to access the camera that we said must exist) and the other for <strong>WRITE_EXTERNAL_STORAGE<\/strong>.  When we&#8217;re done, our manifest now looks like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;manifest xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n\t\tpackage=&quot;nz.co.deltics.demo.camera&quot;&gt;\r\n  &lt;!-- the android:debuggable=&quot;true&quot; attribute is overwritten by the compiler when the debug info option is set --&gt;\r\n  &lt;application \r\n        android:label=&quot;@string\/app_name&quot;\r\n        android:icon=&quot;@drawable\/icon&quot;\r\n        android:debuggable=&quot;true&quot;&gt;\r\n    &lt;activity android:label=&quot;@string\/app_name&quot; android:name=&quot;nz.co.deltics.demo.camera.MainActivity&quot;&gt;\r\n      &lt;intent-filter&gt;\r\n        &lt;action android:name=&quot;android.intent.action.MAIN&quot; \/&gt;\r\n        &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; \/&gt;\r\n      &lt;\/intent-filter&gt;\r\n    &lt;\/activity&gt;\r\n  &lt;\/application&gt;\r\n  &lt;uses-sdk android:minSdkVersion=&quot;4&quot; \/&gt;\r\n  &lt;uses-feature android:name=&quot;android.hardware.camera&quot; \/&gt;\r\n  &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; \/&gt;\r\n  &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;\/&gt;\r\n&lt;\/manifest&gt;\r\n<\/pre>\n<p>One last thing to look at in the manifest is the <strong>label<\/strong> attribute of the <strong>Application<\/strong> element.  This is the name of our application as it will appear on screen in the Android launcher.  The value of this attribute indicates that the text for the name will be taken from a string resource called &#8220;<strong>app_name<\/strong>&#8220;.<\/p>\n<p>In our project there is a &#8220;<strong>values<\/strong>&#8221; item and within that a <strong>strings.android-xml<\/strong> file.  Opening that in the editor we find:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;resources&gt;\r\n  &lt;string name=&quot;app_name&quot;&gt;nz.co.deltics.demo.camera&lt;\/string&gt;\r\n  &lt;string name=&quot;my_button_text&quot;&gt;Click Me!&lt;\/string&gt;\r\n  &lt;string name=&quot;my_button_text_2&quot;&gt;%1$d clicks!&lt;\/string&gt;\r\n&lt;\/resources&gt;\r\n<\/pre>\n<p>Here we can change the name of our application to something a little more user friendly and we won&#8217;t be needing the other two entries so we can simply remove those, leaving us with:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;resources&gt;\r\n  &lt;string name=&quot;app_name&quot;&gt;Demo Camera&lt;\/string&gt;\r\n&lt;\/resources&gt;\r\n<\/pre>\n<p>Now we can turn our attention to the user interface.<\/p>\n<h3>The User Interface<\/h3>\n<p>On Android, just as with iOS, the user interface can be assembled programmatically in code or pre-defined in a resource file.  On Android these resources are XML files called a <strong>layout<\/strong> and in our project we have a layout item and within that we can see that we already have a <strong>layout<\/strong> file created for us called <strong>main.layout-xml<\/strong>.  Opening that we find:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n  &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n    android:orientation=&quot;vertical&quot;\r\n    android:layout_width=&quot;fill_parent&quot;\r\n    android:layout_height=&quot;fill_parent&quot;\r\n    android:gravity=&quot;center_vertical|center_horizontal&quot;&gt;\r\n\r\n    &lt;Button\r\n      android:id=&quot;@+id\/MyButton&quot;\r\n      android:text=&quot;@string\/my_button_text&quot;\r\n      android:layout_width=&quot;wrap_content&quot;\r\n      android:layout_height=&quot;wrap_content&quot; \/&gt;\r\n\r\n  &lt;\/LinearLayout&gt;\r\n<\/pre>\n<p>This layout consists of a <strong>LinearLayout<\/strong> element configured to center any content both vertically and horizontally.  Being the root element of the layout, this will fill the screen and so it&#8217;s content &#8211; a single button &#8211; will be centered on the screen.  We see that the <strong>text<\/strong> (i.e. caption) for the button is a reference to one of those string entries that we removed from the strings xml file.<\/p>\n<p>We need something a little different.  I want the majority of the screen to be dedicated to a preview of the camera, with a button to capture an image tucked to one side.  As far as I know, there is no specific &#8220;<strong>Camera Preview<\/strong>&#8221; control as such as there is for a &#8220;<strong>Button<\/strong>&#8221; for example.  So for the preview\/viewfinder we will place a <strong>FrameLayout<\/strong> which we will later configure in code.<\/p>\n<p>I&#8217;m still learning Layout techniques (one reason for keeping things very simple in this example) so the layout I ended up with may not be the ideal way to define what I want, but it works (or seems to) and this is what I have:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n    android:orientation=&quot;horizontal&quot;\r\n    android:layout_width=&quot;fill_parent&quot;\r\n    android:layout_height=&quot;fill_parent&quot;\r\n    &gt;\r\n &lt;FrameLayout\r\n   android:id=&quot;@+id\/camera_preview&quot;\r\n   android:layout_width=&quot;fill_parent&quot;\r\n   android:layout_height=&quot;fill_parent&quot;\r\n   android:layout_weight=&quot;1&quot;\r\n    \/&gt;\r\n\r\n  &lt;Button\r\n   android:id=&quot;@+id\/button_capture&quot;\r\n   android:text=&quot;Capture&quot;\r\n   android:layout_width=&quot;wrap_content&quot;\r\n   android:layout_height=&quot;wrap_content&quot;\r\n   android:layout_gravity=&quot;center&quot;\r\n    \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p>Just to demonstrate that it&#8217;s possible, the <strong>text<\/strong> of my <strong>Button<\/strong> does not use the &#8220;<strong>@string\/<\/strong>&#8221; format so on this occasion the button text will be simply what I have specified in the layout.  It generally makes sense to use string references to ensure consistent use throughout an application (and to facilitate support for different languages), but it&#8217;s not mandatory.<\/p>\n<p>The &#8220;<strong>id<\/strong>&#8221; attributes of the <strong>FrameLayout<\/strong> and <strong>Button<\/strong> are important as these are how we will identify these layout elements in our code later on.  So far we have been dealing only with the resources in our application.<\/p>\n<p>Now let&#8217;s look at some code.<\/p>\n<h3>The MainActivity<\/h3>\n<p>So far, everything we have looked at will be very familiar to anyone who has done any Android work with Eclipse or Android Studio or any other Java IDE for Android.  The code is where Oxygene set&#8217;s itself apart from the Java world, whilst simultaneously remaining firmly planted within it.  Here is the implementation of the MainActivity class created for us in our project:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n\r\n  namespace nz.co.deltics.demo.camera;\r\n\r\ninterface\r\n\r\n  uses\r\n    java.util,\r\n    android.app,\r\n    android.content,\r\n    android.os,\r\n    android.util,\r\n    android.view,\r\n    android.widget;\r\n\r\n  type\r\n    MainActivity = public class(Activity)\r\n    private\r\n      Count: Integer := 0;\r\n    public\r\n      method onCreate(savedInstanceState: Bundle); override;\r\n      method ButtonOnClick(v: View);\r\n    end;\r\n\r\n\r\nimplementation\r\n\r\n  method MainActivity.onCreate(savedInstanceState: Bundle);\r\n  begin\r\n    inherited;\r\n    \/\/ Set our view from the &quot;main&quot; layout resource\r\n    ContentView := R.layout.main;\r\n\r\n    \/\/ Get our button from the layout resource,\r\n    \/\/ and attach an event to it\r\n    var myButton: Button := Button(findViewById(R.id.MyButton));\r\n    myButton.OnClickListener := new interface View.OnClickListener(onClick := @ButtonOnClick);\r\n  end;\r\n\r\n  method MainActivity.ButtonOnClick(v: View);\r\n  begin\r\n    inc(Count);\r\n    (v as Button).Text := WideString.format(String[R.string.my_button_text_2], Count);\r\n  end;\r\n\r\nend.\r\n<\/pre>\n<p>This is obviously recognisable as Pascal but if you were to show it to an Android developer familiar with Java they would also recognise it as an Android application.<\/p>\n<p>We will take a closer look in the next article in the series.  For now let&#8217;s just remove the code that is part of the project template that we don&#8217;t need.  As we have already seen, the project template consists of an app with a single button.  The code in the MainActivity configures that button to respond to a Click event by incrementing a counter and then updating the button caption to indicate the number of clicks that have taken place.<\/p>\n<p>We aren&#8217;t interested in the counter, but the business of the button responding to clicks is something that we can keep although we will change the names of some things so that they make a bit more sense:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n\r\n  namespace nz.co.deltics.demo.camera;\r\n\r\ninterface\r\n\r\n  uses\r\n    java.util,\r\n    android.app,\r\n    android.content,\r\n    android.os,\r\n    android.util,\r\n    android.view,\r\n    android.widget;\r\n\r\n  type\r\n    MainActivity = public class(Activity)\r\n    public\r\n      method onCreate(savedInstanceState: Bundle); override;\r\n      method CaptureClick(v: View);\r\n    end;\r\n\r\n\r\nimplementation\r\n\r\n  method MainActivity.onCreate(savedInstanceState: Bundle);\r\n  var\r\n    btnCapture: Button;\r\n  begin\r\n    inherited;\r\n\r\n    \/\/ Set our view from the &quot;main&quot; layout resource\r\n    ContentView := R.layout.main;\r\n\r\n    \/\/ Get our button from the layout resource,\r\n    \/\/ and attach an event to it\r\n    btnCapture := Button(findViewById(R.id.button_capture));\r\n    btnCapture.OnClickListener := new interface View.OnClickListener(onClick := @CaptureClick);\r\n  end;\r\n\r\n  method MainActivity.CaptureClick(v: View);\r\n  begin\r\n    \/\/ TODO: Capture image from the camera\r\n  end;\r\n\r\nend.\r\n<\/pre>\n<p>What did we do:<\/p>\n<ul>\n<li>We removed the Count member variable of the MainActivity class<\/li>\n<li>I changed from an inline variable declaration for the Button reference to a more &#8216;traditional&#8217; Pascal pre-declaration.  Oxygene supports both.  This is just my preference.  And I changed the name to btnCapture.  Again, just my preference.<\/li>\n<li>The ID passed to findViewById() was change to the id assigned to the button in the layout.  Notice that this is not a string but a reference to a member of the <strong>id<\/strong> member of an <strong>R<\/strong> object.  The R member is generated for us from the resources in a build step that occurs prior to compilation.  Again, this is identical to &#8220;normal&#8221; Android development.<\/li>\n<li>I changed the name of the method that responds to the button click to <strong>CaptureClick<\/strong> to better reflect it&#8217;s use.<\/li>\n<li>Finally, I removed the code from the CaptureClick() method and put a TODO item to remind me that this is where I need to add code to actually capture the camera image, when the time comes.<\/li>\n<\/ul>\n<p>That&#8217;s it.<\/p>\n<p>We now have an app with a UI ready to function as a very simple camera application.<\/p>\n<p>Next time I will show how I implemented the camera preview to provide a &#8220;viewfinder&#8221; for the camera.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\">7<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span> Part 1 in an as yet unknown number of articles using a (very) simple camera application to demonstrate building first class Android applications using &#8220;Pascal for Java&#8221; &#8211; i.e. Oxygene Cooper. In this first instalment we will look at the basics &#8211; the components we are going to need and the basic UI of the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[212,205,4,180],"tags":[153,215,181],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-pT","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1624,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1624\/","url_meta":{"origin":1605,"position":0},"title":"Exploring Listeners With Oxygene","date":"16 Sep 2013","format":false,"excerpt":"Part 2 in a short series demonstrating the development of a simple camera app for Android using Oxygene. In the previous instalment we looked at the basic framework of our app. For this instalment I was going to show how to implement the camera preview or viewfinder for this instalment,\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1503,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1503\/","url_meta":{"origin":1605,"position":1},"title":"Sharing Code Across Platforms in Oxygene","date":"22 Aug 2013","format":false,"excerpt":"There seems to be a perception among some people that Delphi is in the unique position of allowing developers to share and re-use code across the various platforms that it's compiler can now (and will soon) target. But this is not the case. Oxygene has had this capability right from\u2026","rel":"","context":"In &quot;Cooper&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1658,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1658\/","url_meta":{"origin":1605,"position":2},"title":"Crash Bang Wallop, What a Picture!","date":"19 Sep 2013","format":false,"excerpt":"The fourth and final part in the not-as-short-as-I-thought-it-would be series on building a camera app for Android using Oxygene. In this penultimate instalment we will add the capability to actually take a picture. But that won't take very long, so then we will spend a bit of time tidying up\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"Very Ugly Duckling","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56-1024x640.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2252,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/2252\/","url_meta":{"origin":1605,"position":3},"title":"Making a Noise About on a Thread","date":"13 Aug 2014","format":false,"excerpt":"I'm working on an Android app at the moment, and for a bit of fun I decided to add a startup sound to brighten the day of every user that launches it. Which gives me another opportunity to present some of the advanced language features in Oxygene that make threading\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Audio-Resource.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1634,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1634\/","url_meta":{"origin":1605,"position":4},"title":"An App With View","date":"17 Sep 2013","format":false,"excerpt":"Not a Merchant Ivory production, but Part 3 in the Oxygene for Java camera app for Android series. So far we have seen that we can work directly with the Android platform manifest and layout files and how the Oxygene language is a first class citizen in the Java platform\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1700,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1700\/","url_meta":{"origin":1605,"position":5},"title":"Honourable Intentions","date":"22 Sep 2013","format":false,"excerpt":"This is it. The home straight. The final part of my series on writing a camera app using Oxygene for Android. In this concluding part I shall look at making my application a well behaved Android citizen. As well as pointing out (and fixing) some mistakes I have made along\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"Post a photo from Google+","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Google+-Main-1024x640.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1605"}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=1605"}],"version-history":[{"count":10,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1605\/revisions"}],"predecessor-version":[{"id":1618,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1605\/revisions\/1618"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=1605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=1605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=1605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}