{"id":1658,"date":"2013-09-19T23:06:17","date_gmt":"2013-09-19T11:06:17","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=1658"},"modified":"2013-09-19T23:06:17","modified_gmt":"2013-09-19T11:06:17","slug":"crash-bang-wallop-what-a-picture","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/1658\/","title":{"rendered":"Crash Bang Wallop, What a Picture!"},"content":{"rendered":"<span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\">6<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p>The fourth <del>and final<\/del> part in the not-as-short-as-I-thought-it-would be series on building a camera app for <strong>Android<\/strong> using <strong>Oxygene<\/strong>.  In this penultimate instalment we will add the capability to actually take a picture.  But that won&#8217;t take very long, so then we will spend a bit of time tidying up the application UI.<\/p>\n<p><!--more--><\/p>\n<h3>Taking A Picture<\/h3>\n<p>Taking a picture on <strong>Android<\/strong> is actually very straightforward.  Once you have a reference to the <strong>Camera<\/strong> object (which we already have) it is a simple matter of calling the <strong>takePicture()<\/strong> method.  This method requires a reference to an implementation of the <strong>Camera.PictureCallback<\/strong> interface.<\/p>\n<p>This is a simple interface which I chose to implement on the <strong>MainActivity<\/strong> itself, resulting in this new version of the <strong>MainActivity<\/strong> class:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n    MainActivity = public class(Activity, Camera.PictureCallback)\r\n    private\r\n      mCamera: Camera;\r\n      mViewFinder: ViewFinder;\r\n    public\r\n      method onCreate(savedInstanceState: Bundle); override;\r\n      method onDestroy; override;\r\n      method CaptureClick(v: View);\r\n\r\n    private \/\/ Camera.PictureCallback\r\n      method onPictureTaken(aPicture: array of SByte; aCamera: Camera);\r\n    end;\r\n<\/pre>\n<p>The code we need to add to the <strong>CaptureClick<\/strong> method is trivial:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n  method MainActivity.CaptureClick(v: View);\r\n  begin\r\n    \/\/ Stop the preview while we take the picture\r\n\r\n    mViewFinder.stop;\r\n\r\n    mCamera.takePicture(NIL, NIL, self);\r\n  end;\r\n<\/pre>\n<p>This call triggers an asynchronous image capture from the camera.  The three parameters to the method in this call are references to callbacks called at different points in the image capture process.<\/p>\n<p>The first is a <strong>Camera.ShutterCallback<\/strong> &#8211; this is a simple notification that the shutter has fired and a picture taken.  I could use this to play a sound for the user&#8217;s benefit, for example.<\/p>\n<p>The second is a <strong>Camera.PictureCallback<\/strong> &#8211; this is called when the RAW image data is ready.  I could use this if I wished to capture the RAW image data.<\/p>\n<p>The third is also a <strong>Camera.PictureCallback<\/strong> and is called then the JPEG image data is ready.  This is the only notification I am interested in for this app, which is why the first two callbacks are specified as NIL.<\/p>\n<p>Of course, I also need to implement that JPEG callback &#8211; my <strong>onPictureTaken<\/strong> implementation:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n  method MainActivity.onPictureTaken(aPicture: array of SByte; aCamera: Camera);\r\n  var\r\n    timestamp: String;\r\n    dir: File;\r\n    jpegFile: File;\r\n    stream: FileOutputStream;\r\n  begin\r\n    \/\/ Get a string containing formatted datetime as the basis for a unique filename\r\n\r\n    timestamp := new SimpleDateFormat('yyyyMMdd_HHmmss').format(new Date());\r\n\r\n    \/\/ Obtain the location of the pictures storage directory and compose a file\r\n\r\n    dir      := Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\r\n    jpegFile := new File(dir.Path + File.separator + 'IMG_' + timestamp + '.jpg');\r\n\r\n    \/\/ If we have a valid File, open an output stream and write the aPicture data to it\r\n\r\n    if assigned(jpegFile) then\r\n    begin\r\n      stream := new FileOutputStream(jpegFile);\r\n      stream.write(aPicture);\r\n      stream.close;\r\n    end;\r\n\r\n    \/\/ Restart the viewfinder preview\r\n\r\n    mViewFinder.start;\r\n  end;\r\n<\/pre>\n<p>You may have noticed the calls to <strong>start()<\/strong> and <strong>stop()<\/strong> the viewfinder.  These were the result of a simple (manual) refactoring of the existing <strong>ViewFinder<\/strong> code previously contained in the <strong>onSurfaceCreated<\/strong> and <strong>onSurfaceDestroyed<\/strong> methods.<\/p>\n<p>One more finesse and we&#8217;re almost done.<\/p>\n<h3>Maintaining (or rather <strong>Ob<\/strong>taining) Focus<\/h3>\n<p>I thought it would be cute to add a &#8220;touch to autofocus&#8221; feature.  Nothing fancy, just tap the preview to trigger the camera to autofocus.<\/p>\n<p>This will be handled by the <strong>ViewFinder<\/strong> class, so we add the <strong>View.OnTouchListener<\/strong> interface to the list of implemented interfaces and the corresponding <strong>onTouch<\/strong> method to the declaration of that class:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n    ViewFinder = public class(SurfaceView, SurfaceHolder.Callback,\r\n                                           View.OnTouchListener)\r\n      \/\/ ...\r\n\r\n    private \/\/ View.OnTouchListener\r\n      method onTouch(aView: View; aEvent: MotionEvent): Boolean;\r\n\r\n      \/\/ ...\r\n    end;\r\n<\/pre>\n<p>In the existing constructor we add the simple assignment of the <strong>ViewFinder<\/strong> as it&#8217;s own listener for touch events:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n    OnTouchListener := self;\r\n<\/pre>\n<p>And finally of course, implement the <strong>onTouch<\/strong> method itself:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n  method ViewFinder.onTouch(aView: View; aEvent: MotionEvent): Boolean;\r\n  begin\r\n    mCamera.autoFocus(NIL);\r\n  end;\r\n<\/pre>\n<p><strong>autoFocus<\/strong> is another example of an asynchronous method that will notify a callback when the operation is complete, in this case indicating whether focus was successful or not via parameters passed to the call back.  Again, we could use this to provide some audio feedback or perform other processing with a focussed preview image.  But I&#8217;m not going to bother so can simply pass NIL.<\/p>\n<p>That&#8217;s it!<\/p>\n<p>The app is (almost) complete with the following features.<\/p>\n<ul>\n<li>Live, real-time &#8220;viewfinder&#8221; preview<\/li>\n<li>Image capture to Pictures storage on the device<\/li>\n<li>Touch-to-Focus AutoFocus feature<\/li>\n<\/ul>\n<p>By no means perfect, but good enough for now.<\/p>\n<p>There is one last feature I want to add, but that is the subject of the next and absolutely final instalment.<\/p>\n<p>One last thing I do want to do at this point however is tidy up the UI.<\/p>\n<h3>Polishing The Pig<\/h3>\n<p>Our app isn&#8217;t very pretty right now.  In fact, downright ugly would be a more honest appraisal:<\/p>\n<figure id=\"attachment_1699\" aria-describedby=\"caption-attachment-1699\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56.jpg?ssl=1\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56.jpg?resize=500%2C312&#038;ssl=1\" alt=\"Very Ugly Duckling\" width=\"500\" height=\"312\" class=\"size-large wp-image-1699\" srcset=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56.jpg?resize=1024%2C640&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56.jpg?resize=300%2C187&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56.jpg?resize=480%2C300&amp;ssl=1 480w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-19-38-56.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"(max-width: 500px) 100vw, 500px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-1699\" class=\"wp-caption-text\">Very Ugly Duckling<\/figcaption><\/figure>\n<p>(<em>The &#8220;Snapper&#8221; title is because I grabbed this screen shot using an early, experimental version of the app before I changed the name.  The UI was otherwise exactly as described up to now<\/em>)<\/p>\n<p>Horrible.  It doesn&#8217;t even look very &#8220;Android-y&#8221;.  Of course it is strictly speaking entirely and utterly Android.  But the reason it looks a bit &#8220;off&#8221; on my ICS tablet (I think I said before at some point that I was running JellyBean, but I realised I&#8217;m not) is that my app is not using an <a href=\"http:\/\/developer.android.com\/training\/basics\/actionbar\/index.html\">ActionBar<\/a> so familiar from more recent versions of Android (since 3.0).  An ActionBar will actually provide a better place for our capture button as well, allowing the entire screen (apart from the Action Bar area obviously) to be used for the viewfinder.<\/p>\n<p>There are a few steps involved.<\/p>\n<p>First, we set an appropriate minimum SDK version in our manifest.  Action Bars were first introduced in 3.0 (SDK 11).  We can get them on 2.1 devices as well with a little more work, but for my purposes SDK version 11 is good enough. While I&#8217;m at it I may as well also add the intended target version for my device (4.0.3 &#8211; API level 14):<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n   &lt;uses-sdk android:minSdkVersion=&quot;11&quot; android:targetSdkVersion=&quot;14&quot;\/&gt;\r\n<\/pre>\n<p>This is all we need to do to actually enable the Action Bar for the app, but we do need to make it visible which we easily achieve with the addition of a simple call added to the <strong>MainActivity.onCreate<\/strong> method:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n  self.ActionBar.show;\r\n<\/pre>\n<p>While we&#8217;re updating the <strong>onCreate<\/strong> method we can also remove the code that assigns the <strong>onClick<\/strong> listener for the button since we won&#8217;t be needing that anymore.  We keep the CaptureClick method itself though.  All will become clear.<\/p>\n<p>Now we need to change the layout &#8211; it is actually made simpler since we do not need to explicitly declare either the Action Bar or the capture button (for reasons that will become clear in a moment):<\/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;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n    xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;\r\n    android:layout_width=&quot;match_parent&quot;\r\n    android:layout_height=&quot;match_parent&quot;\r\n    tools:context=&quot;.MainActivity&quot;&gt;\r\n\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;wrap_content&quot;\r\n     android:layout_centerVertical=&quot;true&quot;\r\n     android:layout_centerHorizontal=&quot;true&quot;\r\n     android:layout_gravity=&quot;center_horizontal|top&quot;&gt;\r\n &lt;\/FrameLayout&gt;\r\n\r\n&lt;\/RelativeLayout&gt;\r\n<\/pre>\n<p>As I said, the <strong>ActionBar<\/strong> itself is provided for us automatically, displaying the application icon and name.<\/p>\n<p>To add additional items to the bar, we define a menu resource.  This is a further XML file placed in a folder called, funnily enough, <strong>menu<\/strong>, within our project folder (a sibling of the <strong>layout<\/strong> and <strong>values<\/strong> folders, within the <strong>res<\/strong> folder):<\/p>\n<figure id=\"attachment_1703\" aria-describedby=\"caption-attachment-1703\" style=\"width: 211px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-19-at-22.11.23-.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-19-at-22.11.23-.png?resize=211%2C184&#038;ssl=1\" alt=\"On the menu tonight...\" width=\"211\" height=\"184\" class=\"size-full wp-image-1703\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-1703\" class=\"wp-caption-text\">On the menu tonight&#8230;<\/figcaption><\/figure>\n<p>In this folder I create a new XML file which I choose to call <strong>main.xml<\/strong>, with the following content:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;menu xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;\r\n &lt;item android:id=&quot;@+id\/capture_button&quot;\r\n     android:icon=&quot;@android:drawable\/ic_menu_camera&quot;\r\n     android:orderInCategory=&quot;100&quot;\r\n     android:showAsAction=&quot;always&quot;\r\n     android:onClick=&quot;captureClick&quot; \/&gt;\r\n&lt;\/menu&gt;\r\n<\/pre>\n<p>If I understand things correctly, this menu resource defines actions that will appear either on the popup menu of our activity when the device &#8220;menu&#8221; button is pressed, or will be presented in the ActionBar for the activity, or both.  Where and when these menu items appear is governed by the <strong>android:showAsAction<\/strong> attribute.<\/p>\n<p>In this case I have just the one item which I want always to be shown as an action &#8211; i.e. as a button on the ActionBar.  This button has no caption and is represented by an icon representing a camera.  I can provide my own icon image if I wish, but in this case I am simply identifying the stock Android menu icon for the camera.<\/p>\n<p>This menu item replaces my previous button.<\/p>\n<p>I set the <strong>onClick<\/strong> attribute to reference the <strong>captureClick<\/strong> method of my activity.  However, the <strong>onClick<\/strong> for a <strong>MenuItem<\/strong> is slightly different to that for a <strong>Button<\/strong>, so we need to change the signature of the method &#8211; it now accepts a <strong>MenuItem<\/strong> parameter, rather than a <strong>View<\/strong>.  While I&#8217;m at it, I apply the lowercase initial letter convention for methods that I am starting to grow accustomed to and which, it has to be said, is in turn growing on me.  You can see that I already identified the method using this case convention in the menu item declaration.<\/p>\n<p>Unfortunately, this menu is not loaded automatically.  An <strong>Activity<\/strong> must explicitly &#8220;inflate&#8221; the appropriate menu resource at runtime.  This presumably is in order to allow an <strong>Activity<\/strong> to choose the appropriate menu according to the runtime conditions and\/or to make any adjustments that might be appropriate.<\/p>\n<p>Inflating the menu is very simple and involves overriding the <strong>onCreateOptionsMenu<\/strong> method of the MainActivity:<\/p>\n<pre class=\"brush: oxygene; title: ; notranslate\" title=\"\">\r\n  method MainActivity.onCreateOptionsMenu(aMenu: Menu): Boolean;\r\n  begin\r\n    MenuInflater.inflate(R.menu.main, aMenu);\r\n    result := inherited;\r\n  end;\r\n<\/pre>\n<p>And we&#8217;re done.<\/p>\n<p>That might have seemed like a lot of work and very fiddly, but it really wasn&#8217;t.  It took me longer to write it up for this post than it took to research (a one time cost) and implement.<\/p>\n<p>I&#8217;ve learned enough in the process that I could now create myself a new project template for Visual Studio, to create an &#8220;Empty Action Bar&#8221; application in one go.<\/p>\n<p>The result was well worth it I think:<\/p>\n<figure id=\"attachment_1705\" aria-describedby=\"caption-attachment-1705\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-22-35-20.jpg?ssl=1\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-22-35-20.jpg?resize=500%2C312&#038;ssl=1\" alt=\"Small yet massive improvement\" width=\"500\" height=\"312\" class=\"size-large wp-image-1705\" srcset=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-22-35-20.jpg?resize=1024%2C640&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-22-35-20.jpg?resize=300%2C187&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-22-35-20.jpg?resize=480%2C300&amp;ssl=1 480w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screenshot_2013-09-19-22-35-20.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"(max-width: 500px) 100vw, 500px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-1705\" class=\"wp-caption-text\">Small yet massive improvement<\/figcaption><\/figure>\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\">6<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span> 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&#8217;t take very long, so then we will spend a bit of time tidying up the application UI.<\/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,217,181],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-qK","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1624,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1624\/","url_meta":{"origin":1658,"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":1634,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1634\/","url_meta":{"origin":1658,"position":1},"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":2511,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/2511\/","url_meta":{"origin":1658,"position":2},"title":"Anonymous Classes: Implementing Interfaces","date":"11 Feb 2017","format":false,"excerpt":"A few years ago (2011 to be precise) someone asked a question on StackOverflow about support for anonymous classes in Delphi. The reason for the question was that the poster was trying to use Delphi to develop for Android and on that platform the widespread use of callback interfaces makes\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1605,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1605\/","url_meta":{"origin":1658,"position":3},"title":"Anatomy of a Camera App","date":"15 Sep 2013","format":false,"excerpt":"Part 1 in an as yet unknown number of articles using a (very) simple camera application to demonstrate building first class Android applications using \"Pascal for Java\" - i.e. Oxygene Cooper. In this first instalment we will look at the basics - the components we are going to need and\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2013-09-15-at-10.12.32-.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1700,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1700\/","url_meta":{"origin":1658,"position":4},"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":[]},{"id":2240,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/2240\/","url_meta":{"origin":1658,"position":5},"title":"Delayed POST Response","date":"11 Aug 2014","format":false,"excerpt":"Way back in September last year, Mason Wheeler blogged about his first experiences with developing for Android using Oxygene. I said at the time that I would look into reproducing his efforts and respond. I didn't get around to that right away and, as I think I have mentioned previously,\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1658"}],"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=1658"}],"version-history":[{"count":11,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1658\/revisions"}],"predecessor-version":[{"id":1712,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1658\/revisions\/1712"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=1658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=1658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=1658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}