Android Question Intent Based Camera not working

mshafiee110

Active Member
Licensed User
Longtime User
Can you post the full logs?
Of course, this video is tested in the NOX 7.1.2 simulator ... Also, I tested on my Samsung J7 with Android 8.1...
 
Upvote 0

mshafiee110

Active Member
Licensed User
Longtime User
Please post the logs as text. Not screenshot or video.
Log of Debug mode...
B4X:
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Unexpected event (missing RaiseSynchronousEvents): ion_event
Check the unfiltered logs for the full stack trace.
** Activity (main) Pause, UserClosed = false **
onActivityResult: wi is null
** Activity (main) Resume **
 
Upvote 0

mshafiee110

Active Member
Licensed User
Longtime User
Works fine here, tested on Android 9.

1. Have you made any changes?
2. Can you post the unfiltered logs in debug mode?
3. What happens in release mode?

1.no ,i use sample ...
2.
B4X:
HostConnection::get() New Host Connection established 0xb70832e0, tid 4897
*** Debugger waiting for connection (1) ***
Displayed b4a.example3/.main: +914ms
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
launcher onstop
onTrimMemory level:20
Attempted to remove non-existing token: android.os.Binder@271563b
[79] com.google.android.play.b.x.a(20): Failed to connect to server for server timestamp: java.net.UnknownHostException: Unable to resolve host "play.googleapis.com": No address associated with hostname
[79] com.google.android.play.b.g.a(473): No account for auth token provided
[79] com.google.android.play.b.g.a(325): Connecting to server: https://play.googleapis.com/play/log?format=raw&proto_v2=true
[79] com.google.android.play.b.g.a(360): Failed to connect to server: java.net.UnknownHostException: Unable to resolve host "play.googleapis.com": No address associated with hostname
START u0 {act=android.media.action.IMAGE_CAPTURE flg=0x3 clip={text/uri-list U:content://b4a.example3.provider/name/tempimage.jpg} (has extras)} from uid 10057 on display 0
Unexpected event (missing RaiseSynchronousEvents): ion_event
Check the unfiltered logs for the full stack trace.
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1376)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:318)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at anywheresoftware.b4j.object.JavaObject$1.invoke(JavaObject.java:237)
    at java.lang.reflect.Proxy.invoke(Proxy.java:813)
    at $Proxy0.ResultArrived(Unknown Source)
    at anywheresoftware.b4a.BA.startActivityForResult(BA.java:540)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
    at b4a.example3.main._startactivityforresult(main.java:631)
    at b4a.example3.main._takepicture(main.java:483)
    at b4a.example3.main._button1_click(main.java:429)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:733)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:352)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:5637)
    at android.view.View$PerformClick.run(View.java:22429)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6169)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
** Activity (main) Pause, UserClosed = false **
onActivityResult: wi is null
** Activity (main) Resume **
write error (Broken pipe)
3.
B4X:
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: Db-scheduled_acquisitions.db com.google.android.finsky.bn.ao@1e3c07f[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
GCM_HB_ALARM release without a matched acquire!
reportNetworkConnectivity(100, false) by 10011
Forcing reevaluation for UID 10011
Validation disabled.
NetworkAgentInfo [WIFI () - 100] validation passed
saving network history: "WiredSSID"NONE gw: 52:54:00:12:35:02 Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:0 nid:0 hasEverConnected: true
writeKnownNetworkHistory write config "WiredSSID"NONE
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: Db-auto_update.db com.google.android.finsky.bn.ao@894a9fa[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: Db-frosting.db com.google.android.finsky.bn.ao@472bbab[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 14]
Force stopping b4a.example3 appid=10057 user=-1: installPackageLI
Package b4a.example3 codePath changed from /data/app/b4a.example3-1 to /data/app/b4a.example3-2; Retaining data and using new
Code path for b4a.example3 changing from /data/app/b4a.example3-1 to /data/app/b4a.example3-2
Resource path for b4a.example3 changing from /data/app/b4a.example3-1 to /data/app/b4a.example3-2
Starting a blocking GC Explicit
Explicit concurrent mark sweep GC freed 60561(3MB) AllocSpace objects, 20(516KB) LOS objects, 33% free, 8MB/12MB, paused 1.246ms total 61.753ms
Couldn't opendir /data/app/vmdl171886083.tmp: No such file or directory
Force stopping b4a.example3 appid=10057 user=0: pkg removed
Reconfiguring input devices.  changes=0x00000010
Reconfiguring input devices.  changes=0x00000010
Reconfiguring input devices.  changes=0x00000010
Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1371 android.content.ContextWrapper.startService:613 android.content.ContextWrapper.startService:613 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:3043
[1] com.google.android.finsky.packagemanager.impl.PackageMonitorReceiverImpl.a(12): PackageMonitor received: android.intent.action.PACKAGE_REMOVED
No carrier app for: 0
No carrier app for: 0
[1] com.google.android.finsky.p2p.e.b(20): Frosting ID looked up on UI thread. Caller should move to a background thread.
mHandler: 9 phoneId: 0
[123] com.google.android.finsky.installqueue.impl.o.b(295): Cannot find install request for b4a.example3
[200] com.google.android.finsky.p2p.f.run(3): Wrote row to frosting DB: 196
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: Db-user_languages_store com.google.android.finsky.bn.ao@b4a3208[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
No global search activity found
No global search activity found
no available voice recognition services found for user 0
setApplicationContext called twice! old=com.vphone.launcher.LauncherApplicationEx@d5ba45c new=com.vphone.launcher.LauncherApplicationEx@d5ba45c
[1] com.google.android.finsky.packagemanager.impl.PackageMonitorReceiverImpl.a(12): PackageMonitor received: android.intent.action.PACKAGE_ADDED
[1] com.google.android.finsky.wear.eh.a(18): Do not start WearSupportService due to Wear service optimization
[1] com.google.android.finsky.p2p.e.b(20): Frosting ID looked up on UI thread. Caller should move to a background thread.
[1] com.google.android.finsky.scheduler.bp.b(89): Jobs in database: 1-1337 12-1 26-1414141414
[200] com.google.android.finsky.p2p.f.run(3): Wrote row to frosting DB: 197
[1] com.google.android.finsky.scheduler.k.a(69): ConstraintMapping: 12-1, 1-1337,  -> L: 14738ms, D: 57151884ms, C: false, I: false, N: 1
[1] com.google.android.finsky.scheduler.k.a(69): ConstraintMapping: 26-1414141414,  -> L: 41766862ms, D: 42666862ms, C: false, I: false, N: 0
[SupervisedAccountIntentOperation] onHandleIntent(): android.intent.action.PACKAGE_ADDED
[SupervisedAccountIntentOperation] This operation is disabled
[1] com.google.android.finsky.scheduler.JobSchedulerEngine.a(109): Cancelling existing job with id: 9001
setApplicationContext called twice! old=com.vphone.launcher.LauncherApplicationEx@d5ba45c new=com.vphone.launcher.LauncherApplicationEx@d5ba45c
[Sync,SyncIntentOperation] Handling the intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:b4a.example3 flg=0x4000010 cmp=com.google.android.gms/.chimera.GmsIntentOperationService (has extras) }.
[1] com.google.android.finsky.scheduler.JobSchedulerEngine.a(109): Cancelling existing job with id: 9002
[1] com.google.android.finsky.scheduler.JobSchedulerEngine.a(48): Scheduling job Id: 9000, L: 14738, D: 57151884, C: false, I: false, N: 1
[1] com.google.android.finsky.scheduler.JobSchedulerEngine.a(48): Scheduling job Id: 9003, L: 41766862, D: 42666862, C: false, I: false, N: 0
Package b4a.example3 has no metadata
triggerPendingContactsCleanup: no accounts
IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=AppsCorpus serviceId=32
IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=AppsCorpus serviceId=36
Usage reports ok 1, Failed Usage reports 0, indexed 0, rejected 0, imm upload false
Usage reports ok 0, Failed Usage reports 0, indexed 0, rejected 0, imm upload false
IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=AppsCorpus serviceId=32
IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=AppsCorpus serviceId=36
Usage reports ok 0, Failed Usage reports 0, indexed 0, rejected 0, imm upload false
Usage reports ok 0, Failed Usage reports 0, indexed 0, rejected 0, imm upload false
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: Db-scheduled_acquisitions.db com.google.android.finsky.bn.ao@405eda1[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
>>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
Indexing com.google.android.gms-internal.3p:MobileApplication from com.google.android.gms
Indexing done com.google.android.gms-internal.3p:MobileApplication
Indexing com.google.android.gms-apps from com.google.android.gms
Indexing com.google.android.gms-internal.3p:DigitalDocument from com.google.android.gms
Indexing done com.google.android.gms-apps
Indexing done com.google.android.gms-internal.3p:DigitalDocument
Indexing com.google.android.gms-apps from com.google.android.gms
Indexing done com.google.android.gms-apps
CheckJNI is OFF
No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
Unexpected CPU variant for X86 using defaults: x86
/system/bin/dex2oat --dex-file=/system/framework/am.jar --oat-fd=9 --oat-location=/data/dalvik-cache/x86/system@framework@am.jar@classes.dex --compiler-filter=speed
dex2oat took 515.961us (threads: 2)
Failed to bind-mount /system/lib/x86/cpuinfo as /proc/cpuinfo: No such file or directory
Couldn't load memtrack module (No such file or directory)
failed to load memtrack module: -2
register_android_hardware_Radio DONE
Calling main entry com.android.commands.am.Am
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=b4a.example3/.main} from uid 0 on display 0
launcher onpause
Shutting down VM
Start proc 5007:b4a.example3/u0a57 for activity b4a.example3/.main
[5007] Initialize library(version: 6.1.2d_x.48748 RELEASE)... successfully.
Bridge logger not enabled.
loaded /system/lib/egl/libEGL_adreno.so
HostConnection::get() New Host Connection established 0xa4f83670, tid 5007
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
HostConnection::get() New Host Connection established 0xa4f83890, tid 5021
loaded /system/lib/egl/libGLESv1_CM_adreno.so
** Activity (main) Resume **
Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:877 com.android.server.InputMethodManagerService.hideCurrentInputLocked:2250 com.android.server.InputMethodManagerService.windowGainedFocus:2389 com.android.server.InputMethodManagerService.startInputOrWindowGainedFocus:2263 com.android.internal.view.IInputMethodManager$Stub.onTransact:198
loaded /system/lib/egl/libGLESv2_adreno.so
Initialized EGL, version 1.4
Swap behavior 1
HostConnection::get() New Host Connection established 0xb70832e0, tid 5022
Displayed b4a.example3/.main: +750ms
launcher onstop
onTrimMemory level:20
START u0 {act=android.media.action.IMAGE_CAPTURE flg=0x3 clip={text/uri-list U:content://b4a.example3.provider/name/tempimage.jpg} (has extras)} from uid 10057 on display 0
** Activity (main) Pause, UserClosed = false **
onActivityResult: wi is null
** Activity (main) Resume **
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: InstallBackgroundThread com.google.android.finsky.bn.ao@736bc6[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: InstallBackgroundThread com.google.android.finsky.bn.ao@d1f6787[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
[70] com.google.android.finsky.bn.an.run(6): Stats for Executor: InstallBackgroundThread com.google.android.finsky.bn.ao@15466b4[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
write error (Broken pipe)
 
Upvote 0

mshafiee110

Active Member
Licensed User
Longtime User
I think that the process is being killed while the app is in the background. Add a service to your app and make it a foreground service before you call StartActivity to send the intent.
can you send a sample ???
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…