Android Question Newbie Question on JCIF and SMB Libraries

GGS

Member
Licensed User
Longtime User
I am an experienced VB6 programmer and new to B4A. I need to be able to copy a file from a shared folder on a PC based lan and display the contents. I've installed SMB and the associated .xml file in the library but have not been able to get JCIFS-1.3.17 to appear in the library tab in the IDE. From the docs. I have read it appears both are needed to copy a file from a shared folder to the Android device. I have copied the JCIFS1.3.17.jar file to the library folder, but no joy. My code for testing this is pretty simple:

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
If FirstTime Then
SMB1.Initialize("SMB1")
End If
SMB1.DownloadFile("smb://ROBIN-PC/Genesis/","YourInvoice.txt", File.DirRootExternal,"YourInvoice.txt")

End Sub

Sub SMB1_DownloadCompleted (Url As String, RemoteFile As String, Success As Boolean)
If Success Then
Msgbox (Url, "Success")
Else
Msgbox (Url , "Failed")
End If
End Sub


It always fails. The URL on the PC is shared to Everyone on the network (running Vista, ugh).

Any tips or pointers would be much appreciated.

Thanks,
Gary
 

GGS

Member
Licensed User
Longtime User
The log doesn't show any exceptions. The log repeats these two lines several times over:

** Activity (main) Create, isFirst = true **
** Activity (Main) Resume **.

This is the log (with Filter off):

>>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
CheckJNI is ON


Trying to load lib libjavacore.so 0x0
Added shared lib libjavacore.so 0x0
Trying to load lib libnativehelper.so 0x0
Added shared lib libnativehelper.so 0x0
No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
Couldn't load memtrack module (No such file or directory)
failed to load memtrack module: -2
Calling main entry com.android.commands.am.Am
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=b4a.example/.main} from pid 1233
Registering a buffer in the process that created it. This may cause memory ordering problems.
called unimplemented OpenGL ES API
called unimplemented OpenGL ES API
called unimplemented OpenGL ES API
called unimplemented OpenGL ES API
glCheckFramebufferStatusOES error -1915693015
got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
called unimplemented OpenGL ES API
called unimplemented OpenGL ES API
Screenshot failure taking screenshot for (237x148) to layer 21005
Shutting down VM
GC_CONCURRENT freed 96K, 15% free 586K/684K, paused 1ms+15ms, total 24ms
Start proc b4a.example for activity b4a.example/.main: pid=1244 uid=10052 gids={50052, 1028, 1015, 3003, 3002, 3001}
GC_CONCURRENT freed 583K, 14% free 5833K/6740K, paused 74ms+106ms, total 884ms


GC_CONCURRENT freed 99K, 6% free 3026K/3200K, paused 17ms+4ms, total 65ms


WAIT_FOR_CONCURRENT_GC blocked 33ms
Switching to real app window: Window{b3f957a8 u0 b4a.example/b4a.example.main}


Skipped 30 frames! The application may be doing too much work on its main thread.


Emulator without GPU emulation detected.


Displayed b4a.example/.main: +3s331ms


** Activity (main) Create, isFirst = true **


GC_CONCURRENT freed 43K, 4% free 3407K/3520K, paused 9ms+5ms, total 389ms


** Activity (main) Resume **


Skipped 127 frames! The application may be doing too much work on its main thread.


Skipped 46 frames! The application may be doing too much work on its main thread.


Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b40e0a10 attribute=null, token = android.os.BinderProxy@b401e3c0


Excessive delay setting light: 96ms


error loading /system/media/audio/ui/Effect_Tick.ogg


Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg


error loading /system/media/audio/ui/Effect_Tick.ogg
Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg


error loading /system/media/audio/ui/Effect_Tick.ogg
Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
error loading /system/media/audio/ui/Effect_Tick.ogg
Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
error loading /system/media/audio/ui/Effect_Tick.ogg
Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
error loading /system/media/audio/ui/KeypressStandard.ogg
Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
error loading /system/media/audio/ui/KeypressSpacebar.ogg
Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
error loading /system/media/audio/ui/KeypressDelete.ogg
Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
error loading /system/media/audio/ui/KeypressReturn.ogg


Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
error loading /system/media/audio/ui/KeypressInvalid.ogg
Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
onLoadSoundEffects(), Error -1 while loading samples
Excessive delay setting light: 380ms


Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b40e4be0 attribute=null, token = android.os.BinderProxy@b401e3c0


I'm running this through the emulator. Does that make a difference? I have also tried this process using a text file in the Public folder on networked PC, but I get the same result.

Thanks,
Gary
 
Upvote 0
Top