YaphetS1/WiFi-Direct-File-Transfer-App

gettign these error while running on emulator

hhumas opened this issue · 8 comments

04-06 12:45:42.601 4458-4497/com.app.wi_fi_direct D/EGL_emulation: eglMakeCurrent: 0x7f2f951658c0: ver 3 1 (tinfo 0x7f2f96b04ee0)
04-06 12:45:42.783 4458-4497/com.app.wi_fi_direct D/EGL_emulation: eglMakeCurrent: 0x7f2f951658c0: ver 3 1 (tinfo 0x7f2f96b04ee0)
04-06 12:45:42.783 4458-4497/com.app.wi_fi_direct E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f2f951660e0

I have got the same issue, it is happened because emulator didn't have a method WifiP2pManager.initialize()

                  --------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.app.wi_fi_direct, PID: 5829
                  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.wi_fi_direct/com.app.wi_fi_direct.pages.SendFileActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.p2p.WifiP2pManager$Channel android.net.wifi.p2p.WifiP2pManager.initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager$ChannelListener)' on a null object reference
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
                      at android.app.ActivityThread.-wrap11(Unknown Source:0)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
                      at android.os.Handler.dispatchMessage(Handler.java:106)
                      at android.os.Looper.loop(Looper.java:164)
                      at android.app.ActivityThread.main(ActivityThread.java:6494)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
                   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.p2p.WifiP2pManager$Channel android.net.wifi.p2p.WifiP2pManager.initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager$ChannelListener)' on a null object reference
                      at com.app.wi_fi_direct.pages.SendFileActivity.onCreate(SendFileActivity.java:116)
                      at android.app.Activity.performCreate(Activity.java:7009)
                      at android.app.Activity.performCreate(Activity.java:7000)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
                      at android.app.ActivityThread.-wrap11(Unknown Source:0) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
                      at android.os.Handler.dispatchMessage(Handler.java:106) 
                      at android.os.Looper.loop(Looper.java:164) 
                      at android.app.ActivityThread.main(ActivityThread.java:6494) 
                      at java.lang.reflect.Method.invoke(Native Method) 
                      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 

I mean, you need to use a real device on the android

i build debug apk then install it on real device its working . . but its language is not in English . is there anyway to change the language to English

I'll change it in application today, in about an hour 2-3

In release/dev - default lang eng

Hi . ty for prompt reply now language is English but its stuck on this menu. its not going any where only this message i get
https://imgur.com/a/LWTei
Do you have its documentation . if both devices are on same network then it will transfer files if there is no network will it create hotspot and send the files

Fully documentation will be ready soon. It works by p2p, it creates a group inside which is selected "implicitly the group owner" and they exchange files among themselves via sockets

Readme updated pls check it :)