Question: I'm doing my first Android app. When I run my application on my Galaxy S4 which is connected with an USB cable it crashes. Before adding the second Activity it doesn't crashes.

My Code including logcat: <http://pastebin.com/JMKpY859>

I also added this code to the AndroidManifest.xml

```
<activity
        android:name=".ActivityByDate"
        android:label="@string/title_activity_activity_by_date" >
</activity>

```

Answer: 
The `hadoop:*` EL functions are only available for Oozie MapReduce actions, so you won't be able to use them for your Java action even though it presumably ran a MapReduce job.

Instead, you can use the `<capture-output/>` tag in your Java action to pass output into the Oozie workflow context. In your driver class you write a Java Properties file to the location found in `oozie.action.output.properties` containing the data you would like to pass back (in this case your desired counter), and then read it from the workflow using `${wf:actionData('action_name')['property_name']}`. More information on this technique can be found [here](http://blog.cloudera.com/blog/2013/03/how-to-use-oozie-shell-and-java-actions/).
Given an oozie job ID and a counter name, the following shell script may work for you:

```sh
#!/bin/bash

if [ $# != 2 ]; then
    echo "Usage: get-job-counter-for-oozie.sh OOZIE_JOB COUNTER"
    exit 1
fi

OOZIE_JOB=$1
COUNTER=$2

OOZIE_URL=http://${JOBTRACKER}:11000/oozie
JOBS=`oozie job -oozie $OOZIE_URL -info $OOZIE_JOB -verbose | grep 'http' | cut -f2 -d$'\t'`

for job in ${JOBS}
do
    TASK_URL=http://${JOBTRACKER}:50030/
    JOBTASK=`curl "${job}" 2>/dev/null | grep '&type=map&pagenum=1' | cut -f2 -d'"' | sed -e 's/-int:/:/g'`
    TASKATTEMPT=`curl ${TASK_URL}${JOBTASK} 2>/dev/null | grep 'taskdetails.jsp' | sed -e 's/.*a href="\([^"]*\)".*$/\1/'`
    ATTEMPT_LOG=`curl ${TASK_URL}${TASKATTEMPT} 2>/dev/null | grep 'all=true' | cut -f6 -d'"'`
    COUNT=`curl $ATTEMPT_LOG 2>/dev/null | grep " ${COUNTER}=" | sed -e "s/.* ${COUNTER}=\([0-9]*\)/\1/g"`
    if [ "${COUNT}" != "" ]; then
        echo "${COUNTER}=${COUNT}"
    fi
done

```