Skip to content

Commit

Permalink
(#648) Added preOnStartCommand and preOnBind; condition preOnCreate t…
Browse files Browse the repository at this point in the history
…o only function if not using RubotoService
  • Loading branch information
rscottm committed Jul 21, 2014
1 parent a117a92 commit 92db191
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions assets/src/RubotoService.java
Expand Up @@ -9,8 +9,24 @@ public class THE_RUBOTO_CLASS THE_ACTION THE_ANDROID_CLASS {
* Called at the start of onCreate() to prepare the Activity. * Called at the start of onCreate() to prepare the Activity.
*/ */
private void preOnCreate() { private void preOnCreate() {
System.out.println("RubotoService onCreate(): " + getClass().getName()); if (!getClass().getSimpleName().equals("RubotoService")) {
getScriptInfo().setRubyClassName(getClass().getSimpleName()); System.out.println("RubotoService onCreate(): " + getClass().getName());
getScriptInfo().setRubyClassName(getClass().getSimpleName());
}
}

private void preOnStartCommand(android.content.Intent intent) {
if (getClass().getSimpleName().equals("RubotoService")) {
System.out.println("RubotoService onStartCommand(): " + getClass().getName());
scriptInfo.setFromIntent(intent);
}
}

private void preOnBind(android.content.Intent intent) {
if (getClass().getSimpleName().equals("RubotoService")) {
System.out.println("RubotoService onBind(): " + getClass().getName());
scriptInfo.setFromIntent(intent);
}
} }


THE_METHODS THE_METHODS
Expand Down

0 comments on commit 92db191

Please sign in to comment.