Android Tutorial JumpingSmiley - GameView example III

Status
Not open for further replies.
This is another example of GameView: GameView - Create 2D Android games - Part I

This is a simple "jumping" game where the user controls the movement by tilting the device:

SS-2013-02-07_18.17.28.png


There are two types of objects: Smiley - the main object and Brick which represents a single brick.

When the smiley moves upwards the background moves downwards. Bricks that go out of the screen are removed. A new brick is added instead of each removed brick.

Some of the bricks are moving and some of the bricks shrink when the smiley bounces on them.

All the sizes are scaled based on the device screen size (using percentage units).

Currently the game never ends. You can change it by modifying Smiley.Tick sub.

I think that this example is simpler than the Asteroids example as there are less "moving parts".
 

Attachments

  • JumpingSmiley.zip
    27.7 KB · Views: 1,149
Last edited:

buras3

Active Member
Licensed User
error

hey erel

I got this on running

AndroidManifest.xml:15: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'

tank you
 

Informatix

Expert
Licensed User
You should reference android.jar from platform level 11 or higher. Also note that GameView is only supported on Android 3+ (see the first tutorial for more information).

This example runs well under Gingerbread if you lower the minSDKversion and remove the isHardwareAccelerated condition.
 

Informatix

Expert
Licensed User
Just a word for guys who'd like to use the sensors in their game: some tablets don't have a gyroscope, others don't have an accelerometer (but it's rare because the accelerometer is used to detect the device rotation). The gyroscope is usually missing when the GPS is missing too (and that's not uncommon on tablets). To be short: if you have to choose a sensor for tilting, prefer the accelerometer to the gyroscope.
 

buras3

Active Member
Licensed User
tank you erel
now i get
Copying libraries resources 0.00
Signing package file (private key) 0.23
ZipAlign file. 0.02
Installing file to device. Error
pkg: /data/local/tmp/JumpingSmiley.apk
Failure [INSTALL_FAILED_OLDER_SDK]

Restarting ADB Server may solve this problem.

michael
 

atreyuatnz

New Member
Licensed User
No tilt action?

I am new to Java, I have had no problem running all the demos except this one, bouncing smiley, I have a Nextbook premium 8 tablet with Android ver: 4.0.3, the game loads & runs fine but there seems to be no tilt action happening?

Other tilt games run fine, Ive followed all the posts in this thread to try to get it to work? Help?
 

atreyuatnz

New Member
Licensed User
No tilt action

O.k it says Orientation not supported, so what can I do?:BangHead:

Even thou I am a total noob I understand that my Tablet only supports (ACCELEROMETER) So I followed your guide (http://www.basic4ppc.com/forum/basi...6647-orientation-accelerometer.html#post38780)
& change it from this.

'Class module
Sub Class_Globals
Private animator As SpriteAnimator
Private sensor As PhoneSensors
Private SIZE = 12%x As Float
Private mbd As BitmapData
Private JUMP_SPEED As Float = -4%y
Private bricks As List
Private gm As GameManager
End Sub

Public Sub Initialize (bd As BitmapData, vBricks As List, vGm As GameManager)
mbd = bd
gm = vGm
mbd.DestRect.Initialize(50%x, 85%y, 50%x + SIZE, 90%y + SIZE)
bricks = vBricks
animator.Initialize
Dim r As Rect
animator.SetFrames(bd, Array As Rect(r), Array As Bitmap(LoadBitmap(File.DirAssets, "smiley.gif")))
animator.width = SIZE
animator.height = SIZE
sensor.Initialize2(sensor.TYPE_ORIENTATION, 0)
animator.vy = JUMP_SPEED
End Sub

Private Sub Sensor_SensorChanged (Values() As Float)
animator.vx = -PerXToCurrent(Max(-30, Min(30, Values(2))) / 10)
End Sub

Public Sub Tick
animator.vy = animator.vy + 0.2%y
mbd.Rotate = mbd.Rotate + animator.vx / 1%x
animator.Tick(mbd)
If animator.vy > 0 Then 'check for collisions on the way bottom
For Each brck As Brick In bricks
If brck.bd.DestRect.Left < mbd.DestRect.CenterX AND brck.bd.DestRect.Right > mbd.DestRect.CenterX Then
If mbd.DestRect.Bottom < brck.bd.DestRect.Top AND mbd.DestRect.Bottom + animator.vy + 0.2%y > brck.bd.DestRect.Top Then
'adjust the speed so the smiley will touch the brick on the next tick.
animator.vy = brck.bd.DestRect.Top - mbd.DestRect.Bottom - 0.2%y
Else If mbd.DestRect.Bottom = brck.bd.DestRect.Top Then
animator.vy = JUMP_SPEED
gm.PlaySound(gm.BOUNCE_SOUND, 1)
If brck.disappearing Then
brck.Shrink
End If
Exit
End If
End If
Next
End If
If animator.vy < 0 AND mbd.DestRect.Top < 40%y Then
'scroll the background
gm.ScrollDown(-animator.vy / 1.5)
mbd.DestRect.Top = mbd.DestRect.Top - animator.vy / 2
mbd.DestRect.Bottom = mbd.DestRect.Bottom - animator.vy / 2
End If
'instead of ending the game we bounce the smiley
If mbd.DestRect.Bottom >= 100%y Then animator.vy = JUMP_SPEED
End Sub

Public Sub StartSensor
sensor.StartListening("Sensor")
End Sub

Public Sub StopSensor
sensor.StopListening
End Sub



To this



'Class module
Sub Class_Globals
Private animator As SpriteAnimator
Private Accelerometer As PhoneAccelerometer
Private SIZE = 12%x As Float
Private mbd As BitmapData
Private JUMP_SPEED As Float = -4%y
Private bricks As List
Private gm As GameManager
End Sub

Public Sub Initialize (bd As BitmapData, vBricks As List, vGm As GameManager)
mbd = bd
gm = vGm
mbd.DestRect.Initialize(50%x, 85%y, 50%x + SIZE, 90%y + SIZE)
bricks = vBricks
animator.Initialize
Dim r As Rect
animator.SetFrames(bd, Array As Rect(r), Array As Bitmap(LoadBitmap(File.DirAssets, "smiley.gif")))
animator.width = SIZE
animator.height = SIZE
Accelerometer.Initialize2(Accelerometer.TYPE_ACCELEROMETER, 0)
animator.vy = JUMP_SPEED
End Sub

Private Sub Accelerometer_AccelerometerChanged (Values() As Float)
animator.vx = -PerXToCurrent(Max(-30, Min(30, Values(2))) / 10)
End Sub

Public Sub Tick
animator.vy = animator.vy + 0.2%y
mbd.Rotate = mbd.Rotate + animator.vx / 1%x
animator.Tick(mbd)
If animator.vy > 0 Then 'check for collisions on the way bottom
For Each brck As Brick In bricks
If brck.bd.DestRect.Left < mbd.DestRect.CenterX AND brck.bd.DestRect.Right > mbd.DestRect.CenterX Then
If mbd.DestRect.Bottom < brck.bd.DestRect.Top AND mbd.DestRect.Bottom + animator.vy + 0.2%y > brck.bd.DestRect.Top Then
'adjust the speed so the smiley will touch the brick on the next tick.
animator.vy = brck.bd.DestRect.Top - mbd.DestRect.Bottom - 0.2%y
Else If mbd.DestRect.Bottom = brck.bd.DestRect.Top Then
animator.vy = JUMP_SPEED
gm.PlaySound(gm.BOUNCE_SOUND, 1)
If brck.disappearing Then
brck.Shrink
End If
Exit
End If
End If
Next
End If
If animator.vy < 0 AND mbd.DestRect.Top < 40%y Then
'scroll the background
gm.ScrollDown(-animator.vy / 1.5)
mbd.DestRect.Top = mbd.DestRect.Top - animator.vy / 2
mbd.DestRect.Bottom = mbd.DestRect.Bottom - animator.vy / 2
End If
'instead of ending the game we bounce the smiley
If mbd.DestRect.Bottom >= 100%y Then animator.vy = JUMP_SPEED
End Sub

Public Sub StartAccelerometer
Accelerometer.StartListening("Accelerometer")
End Sub

Public Sub StopAccelerometer
Accelerometer.StopListening
End Sub

But I am getting complie error:

Parsing code. 0.07
Compiling code. Error
Error compiling program.
Error description: Unknown member: initialize2
Occurred on line: 22
Accelerometer.Initialize2(Accelerometer.TYPE_ACCELEROMETER, 0)
Word: initialize2

I am reading as much as I can but would love to have some help thanks
 
Last edited:

atreyuatnz

New Member
Licensed User
No tilt action?

Orientation is supported on my Samsung phone but I get this msg ( There is a problem parsing the package) I suspect that is because the Android version is 2.3.6
 

Douglas Farias

Expert
Licensed User
this game show me some errors on my real device


an error has occured in sub:
java.lang.
illegalargumentexception
continue?

later
an error has occured in sub:
smiley_startsensor
java line 90
continue?

later
smyle_tick have line 105


and stop on this error *-*
 

Douglas Farias

Expert
Licensed User
This error is in your exemple erel
is in the device Galaxy Star Trios

LogCat connected to: B4A-Bridge: samsung GT-S5283B-358417050448855
--------- beginning of /dev/log/main
PackageAdded: package:giga.pipe.com
** Activity (main) Resume **
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:giga.pipe.com
** Activity (main) Create, isFirst = true **
Error occurred on line: 151 (gamemanager)
java.lang.IllegalArgumentException
at java.util.Random.nextInt(Random.java:187)
at anywheresoftware.b4a.keywords.Common.Rnd(Common.java:203)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:485)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 27
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: -36
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
~e: at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 34
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at giga.pipe.com.main.afterFirstLayout(main.java:98)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
Error occurred on line: 151 (gamemanager)
java.lang.NullPointerException
at anywheresoftware.b4a.shell.Shell.getRemoteObjectValue(Shell.java:321)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:238)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at giga.pipe.com.main.afterFirstLayout(main.java:104)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at giga.pipe.com.main.afterFirstLayout(main.java:104)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 73
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at giga.pipe.com.main.afterFirstLayout(main.java:104)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: -24
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at giga.pipe.com.main.afterFirstLayout(main.java:104)
at giga.pipe.com.main.access$100(main.java:16)
at giga.pipe.com.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
running waiting messages (1)
** Activity (main) Resume **
** Service (service1) Destroy **
** Service (service1) Create **
** Service (service1) Start **
Connected to B4A-Bridge (Wifi)
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:b4a.example
** Activity (main) Create, isFirst = true **
Error occurred on line: 151 (gamemanager)
java.lang.IllegalArgumentException
at java.util.Random.nextInt(Random.java:187)
at anywheresoftware.b4a.keywords.Common.Rnd(Common.java:203)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:485)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 27
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: -36
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 34
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
Error occurred on line: 151 (gamemanager)
java.lang.NullPointerException
at anywheresoftware.b4a.shell.Shell.getRemoteObjectValue(Shell.java:321)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:238)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: 73
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Error occurred on line: 151 (gamemanager)
java.lang.RuntimeException: Unexpected command: -24
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:279)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)

** Activity (main) Pause, UserClosed = true **
** Activity (main) Resume **
 
Status
Not open for further replies.
Top