Wednesday, 11 March 2015

How to make an Android app? Install the Development Environment

I had the idea I want to make an app, a quiz app. I like playing on quiz apps on my phone as I feel it improve my memory and knowledge.

I wonder how you go about it? I thought I need to make sure that the idea I have isn't already available but not necessarily. I am just curious how to do it, so maybe I need to search for that and see if it is possible to teach myself, in incremental steps. I want to see if it is possible with some technical competence, but no previous experience to teach myself how to do it.

So Google "How to make an android app" and top of the list is https://developer.android.com/training/basics/firstapp/index.html

I had to download Android Studio. Installing instructions are here:
https://developer.android.com/sdk/installing/index.html?pkg=studio

Terms I don't know:
IDE = Integrated Development Environment
SDK tools = Software Development Kit tools
Android APIs = Application Programming Interface "a set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service."

"open a terminal" = in Windows this means open Command Prompt - I have Windows 8 - I googled "how to open a terminal in Windows 8"
http://pcsupport.about.com/od/windows-8/a/command-prompt-windows-8.htm
But that is not what it meant? As the Windows terminal doesn't recognise the suggested syntax to test the version of JDK installed. Probably relates to Linux?

This bit didn't make any sense to me:
"Before you set up Android Studio, be sure you have installed JDK 6 or higher (the JRE alone is not sufficient)—JDK 7 is required when developing for Android 5.0 and higher. To check if you have JDK installed (and which version), open a terminal and type javac -version. If the JDK is not available or the version is lower than 6, go download JDK"

JDK = Java Development Kit "a program development environment for writing Java applets and applications".

When I came to install it said that could not detect JDK. Message box has a link to install it. It took ages where it appeared that nothing was happening before this message came up.

Downloaded http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

There was a note on the Java download page that said "The April 2015 CPU release will be the last Oracle JDK 7 publicly available update." So what will happen after that? Don't get diverted...

Installed JDK7 then clicked back on Android Studio set up.

On my computer I have 2 Program Files folders - one has (x86). I downloaded the JDK 68 version, did I need the 86?

Example folder C:\Program Files\Java\jdk1.7.0_21. My folder C:\Program Files\Java\jdk1.7.0_75
I put it in manually into the Android Studio install and it didn't seem to work. Cancelled the install.
Ran the install exe again and it worked OK without needing to put in the path, so the install found the right place itself.

Took 2 hours to get to this point.

Friday, 31 January 2014

Time for change

Education isn't about earning potential, it's about freedom - freedom of thought, freedom of action.

Now is a time for the educated classes to take charge. Rather than simply stepping into the shoes of old 'masters' and doing things the same way, now is the time to use the collected power of free thought and inventiveness to come up with new ways of doing things.

Religions are on the decline because we do not have the need for controlling dogma and simplistic lessons by fear any more. Yet the values that are woven within all religious still hold true:
  • Respect for others.
  • Caring for others.
  • Not doing harm to others.
  • Not doing harm to self.
  • Accepting things we cannot change.
  • Striving for good over evil.
  • Forming bonds of family and community and honouring these bonds.
  • Understanding our insignificance in the big picture and yet seeing that the chain linking the past to the future is connected by single links that can hold or break.
Human beings have multi skills and I believe where we go wrong is too much specialisation and wedging ourselves into labelled boxes, the most significant being that of what we 'do' for a living. Instead in my world of greater balance, I think everyone should have 2 'works'. Half of time doing paid work which makes a contribution to society, the economy, etc, and the other half doing their creative vocation. The first half concept is easier to understand much the same as now with some tweaks, but the second half I need to expand on. I see it as each person has their 'work' as described by this.

It could be expanding one's mind, or developing ones skills. It could be gardening, making, creating. Things we think of as hobbies. Things we think of as Arts. Things we think of as craft, but also building, making cars, furniture, decorating, or research, science or anything.

Coincidences and energies

I've been sorting some boxes. I found a notebook with the title book reviews, in which I'd written four reviews from December 1998 and January 1999. Of the 4 books, I only have any memory of reading one of them. "The Celestine Prophecy - An Adventure" by James Redfield (1993) Warner Books www.celestinevision.com. The following is what I wrote in 1999.

Story a bit silly, but some interesting concepts. Like the idea of a quest for knowledge.
  1. Everyone and everything has an energy field.
  2. We can gain energy from our surroundings or other people, or lose it to them.
  3. Many interactions between people are power struggles fighting for dominance over the other person's energy.
  4. Relationships between men and women that are attracted to each other start out as both freely giving and then can develop into a battle of taking.
  5. We are the product of 2 parents and can only evolve if we can go back and understand what was going on with our parents and what we are supposed to learn from it.
  6. Things don't happen by chance. If we have a coincidental encounter with someone we should be aware of why that encounter happened. Particularly if you meet someone who reminds you of someone you already know or who seems familiar to you.

Thursday, 19 September 2013

Tattoos are a triumph of optimism over foresight


Imagine if we all had the same hair style when we're 30 or 40 or 50 as we had when we were 20.  Imagine that we all had the same bodies at those ages and wore the same clothes. OK a rare few do, but the nature of fashion is that it changes and it dates. And yet now there is a fashion of permanently marking your body.


It seems very unwise to me. As we grow older, our lives, our responsibilities, our choices, our interests and our tastes all change.  Why would anyone want to permanently limit themselves in this way with a body decoration? Would you want to wear the same jewellery/watch/make-up/nail polish day in day out? We wear different clothes for different occasions and accessorize to match.  Doesn't having a huge skin adornment limit your choices for self expression rather than represent it?

Aside from that, the people who tattoo themselves are doing the police a favour in many ways. It makes it very easy to identify you if you have committed a minor or major crime and/or if your body turns up after some misdemeanour.  All of these optimistic young people assume within their lifetime that they will never be stuck in a totalitarian state where they want to slip under the radar or not be picked out in a crowd. Or even in a more open state where they want to protest and make a political stand without standing out for special 'treatment'. There are only a few people still alive who have the tattoos that they didn't choose themselves, but surely that is a time and a lesson we should not forget:



If that isn't enough, then there's the risk of infection:


But of course if you change your mind you can always have laser treatment and a bit of scarring, or can you...? (see: http://regrettingink.wordpress.com/2008/08/13/how-it-all-started/)


So if you really want to express yourself on your skin, be more creative about it and change it frequently using temporary decal tattoos - paper for inkjet and laser printers available from decalpaper.com and craftycomputerpaper.co.uk

Sunday, 4 August 2013

Planning laws and the way planners interpret them need to be reconsidered

I believe there should be planning control to protect the land from being over developed and turned into one mass of concrete.  This is to protect us all. Too large a proportion of hard surfaces that do not absorb water causes problems with climate and flooding.  So planning control is good.  Also to protect the country from becoming one homogenous mass of the same steel framed boxes and indistinct shells.

Meanwhile there are many people facing poverty, caught in traps unable to afford a home of their own, ending up in over crowded soulless spaces.  I believe that any dwelling created by the person who then lives in it from locally sourced materials, unique and individual, should not be judged on the same criteria as a developer coming in to make profit and leave.

If this story is correct, that as of the 1st August 2013 Pembrokeshire County Council's enforcement say the property must be demolished within 2 months because,

"benefits of the development did not outweigh the harm to the character and appearance of the countryside".  The planners have gone mad.  To destroy this beautiful property would be a travesty and the planners involved should be ashamed. It should be considered a temporary structure and be given a length of time that it can be there.  I would suggest 25 years.  That is time for the family who live there to grow up and leave to make homes of their own and then the elements that last that long can be reclaimed for another structure.

Sunday, 14 July 2013

Microwave Raspberry Sponge in a Plastic Pan

I've never made a cake in the microwave before, but I foresee I will be making more. I made this from ingredients I had in to use them up and it turned out so well I am recording the recipe since I heavily adapted it from a number that I found.  These are the amounts I used:

Ingredients

2.6 oz butter (all that was left of a packet - out of date)
2.6 oz caster sugar (ie same as butter)
2.6 oz SR flour - wholemeal best before March 2013
1.5 oz ground almonds - use by last week - was aiming for 1.3 oz but slipped
0.5 tsp baking powder (just in case SR flour had no R left)
1 med egg
Bit of milk
6.2 oz raspberries (picked last night, washed and left in fridge) with teaspoon of sugar

Method

1 Put raspberries in plastic microwave pan and mashed down a bit with potato masher and sprinkled in sugar and stirred that in a bit.

2 Softened butter by cutting up and putting in warm water then draining off warm water. Added sugar. Beat with electric whisk.

3 Mixed together flour, almonds and baking powder. 

4 Beat egg in a cup. 

5 Added egg and flour mix into bowl with butter/sugar and mixed more with electric whisk.  Added a bit more milk to get to right consistency (soft dropping).

6 Spooned mix onto fruit in the pan.

7 Cooked in microwave on high for 5 mins (= 3+1+1 as wasn't really sure how long - that seemed to be ready, solid sponge come away from the sides a bit).  Put lid of pan on to start but then sponge rose and lifted it so took it off mid way through the cooking.

If I was doing it again.

I'd probably use a bit less fruit and not add any sugar to it.  Should work with other berries.
Would perhaps go for 2.5 oz of each thing that's at 2.6 oz, so slightly less sponge mix for that size pan (felt a bit scary when rising as might go over top of pan)
Maybe add cinamon to the dry ingredients or vanilla?
Maybe not need baking powder if SR flour within date, could of course use white instead of wholemeal.
Worth trying with jams and syrup but maybe syrup would explode?

Verdict

Taste 5 stars
Ease of make 5 stars