can anyone knock up a tutorial ?

Monkey Targets Forums/Android/can anyone knock up a tutorial ?

Paul - Taiphoz(Posted 2014) [#1]
I know this is an ask, and everyone has their own things to get on with, but I was wondering if one of the more java fluent members might take some time and put together a small guide on how to extend something extra to monkey.

Possibly covering something simple be demonstrating how to get at a class or function or method the correct way and what if any manifest changes that might be needed.


therevills(Posted 2014) [#2]
Check out Diddy and the new AdMob module I did, its pretty simple to cross call methods - but for something like the AdMob stuff you need to jump into the Android API.


Paul - Taiphoz(Posted 2014) [#3]
That's actually what I did, used it as a template of sorts and then tried to get a basic Vibrate call working but it just kept kicking my ass with errors I didn't understand, I'm sure if I learn java it wont be an issue but at the moment I need a more step by step with some explanations.


therevills(Posted 2014) [#4]
Alright here's a simple demo for Vibrate to work:

Native code:
vibrate.java


Monkey code:
vibrate.monkey


And you can do it the other way which doesn't use static methods:

Native:
Java code:


Monkey code:


It does get quite messy if you try to keep the Monkey code compatible with the other targets...

Heres the clean version of the Monkey code:


Now of course when you run this in HTML nothing will happen when you click on the screen and it doesn't compile for a few other targets.


Paul - Taiphoz(Posted 2014) [#5]
that's gona take me some time to get through and understand, thanks for posting,

I wonder if anyone knows a good , possibly youtube based like invader jims tutorials but for java/android ? think its time I actually learn some of this.


Paul - Taiphoz(Posted 2014) [#6]
Also while I am here, any thoughts on a simple android class or method or function that I might look at to attempt to import on my own, need some where to start that wont melt my brain with stuff i'm not familiar with.


Paul - Taiphoz(Posted 2014) [#7]
Small note. anyone trying the above, be sure to enable vibrate in your phone lol mine is always off so was scratching my head for a little bit there :P


therevills(Posted 2014) [#8]
How familiar are you with Java in general? I program Java as my day job... And we also do Android development now and again there too.

The whole point of Monkey is that you dont need to "learn" the target languages, of course it does help if you want a feature that is not in Monkey and it helps when trying to debug a strange issue.

You could start by just getting a simple print out working which is the standard "System.out.println" Java command and externing a few commands in Monkey so you can see the output.


Paul - Taiphoz(Posted 2014) [#9]
Java, yeah like ZERO time served, I touched on it at UNI a little but did just enough to pass the assessment and that was YEARS!!! ago now so yeah ZERO!.

So yeah I'm not all that interested in working full time with java I really just need to want to learn enough that I can extend extra functionality out of the andoird and facebook sdks, but after trying to just jump in more than once now I realize I really do need to learn some basics if I'm going to be able to do that at all.