Can't open another activity in android - android

when i am attempting to press the button to open a another activity
first click it looks,
02-03 20:48:42.489 17665-17665/? D/dalvikvm: Late-enabling CheckJNI
02-03 20:48:42.579 17665-17665/? I/PGA: Attempting to create new SOCKET connectionn pid = 17665, tid = 17665
02-03 20:48:42.619 17665-17665/? I/PGA: New SOCKET connection: com.example.balamasthang.smartattendance (pid 17665, tid 17665)
02-03 20:48:42.619 17665-17665/? W/PGA: [17665] egl: eglCreateWindowSurface (0x4a8937a0, 0x0, 0x7989bc88, 0x77603be0)
02-03 20:48:42.619 17665-17665/? W/PGA: [17665] egl: eglCreateWindowSurface (0x4a8937a0, 0x0, 0x7989bc88, 0x77603be0) returned
02-03 20:48:42.629 17665-17665/? D/OpenGLRenderer: Enabling debug mode 0
When i was clicking second time it looks
something like java.lang ..... error in red color. . but only visible 1 seconds. and it was gone. . and looks like a first click in logcat.
Please help me to solve this problem

You should define activity in android manifest. Can you forget it ?

Related

Closing Activity causes surface buffer errors with monogame

I have a monogame game from which I'm launching an activity in order to login. The game runs fine. When I launch the activity it also runs fine and the gameloop appears to be blocked. The real problem comes when I Finish() the activity or perform OnBackPressed(). I get surface buffer errors, the screen goes black but the game loop resumes. If I try turning off Host GPU in the emulator, the app will instead crash when closing the activity.
When activity opens:
[EGL_emulation] tid 18496: eglSurfaceAttrib(1210): error 0x3009 (EGL_BAD_MATCH)
[OpenGLRenderer] Failed to set EGL_SWAP_BEHAVIOR on surface 0x81448da0, error=EGL_BAD_MATCH
When back pressed in activity or calling Finish():
[EGL_emulation] eglMakeCurrent: 0xa4805a80: ver 2 0 (tinfo 0x82aff0b0)
[EGL_emulation] tid 18496: eglSurfaceAttrib(1210): error 0x3009 (EGL_BAD_MATCH)
[OpenGLRenderer] Failed to set EGL_SWAP_BEHAVIOR on surface 0x81456b00, error=EGL_BAD_MATCH
[EGL_emulation] eglMakeCurrent: 0xa4805a80: ver 2 0 (tinfo 0x82aff0b0)
[Surface] getSlotFromBufferLocked: unknown buffer: 0x0
[EGL_emulation] tid 18458: swapBuffers(531): error 0x300d (EGL_BAD_SURFACE)
[IInputConnectionWrapper] finishComposingText on inactive InputConnection
[EGL_emulation] egl_window_surface_t::swapBuffers called with NULL buffer
[EGL_emulation] tid 18458: swapBuffers(498): error 0x300d (EGL_BAD_SURFACE)
[EGL_emulation] egl_window_surface_t::swapBuffers called with NULL buffer
[EGL_emulation] tid 18458: swapBuffers(498): error 0x300d (EGL_BAD_SURFACE)
[EGL_emulation] egl_window_surface_t::swapBuffers called with NULL buffer
[EGL_emulation] tid 18458: swapBuffers(498): error 0x300d (EGL_BAD_SURFACE)
[EGL_emulation] egl_window_surface_t::swapBuffers called with NULL buffer
[EGL_emulation] tid 18458: swapBuffers(498): error 0x300d (EGL_BAD_SURFACE)
[EGL_emulation] egl_window_surface_t::swapBuffers called with NULL buffer
[EGL_emulation] tid 18458: swapBuffers(498): error 0x300d (EGL_BAD_SURFACE)
Without using host gpu it crashes with:
[Surface] getSlotFromBufferLocked: unknown buffer: 0x7a697320
Unfortunately I ended up having to create my own soft keyboard in monogame and therefore no longer launch any android activities.

Qt - Android app crashes immediately

I am trying to run an android app, I wrote in C++ using Qt, on my smartphone.
I am able to deploy the app and start running. But it immediately shuts down, without any error message or whatsoever on my phone. This is however what I can see in my Qt IDE for the Application output:
Starting remote process.I/ActivityManager( 764): Start proc org.qtproject.example.android for activity org.qtproject.example.android/org.qtproject.qt5.android.bindings.QtActivity: pid=16671 uid=10112 gids={50112, 9997, 3003, 1028, 1015} abi=armeabi-v7a
I/art (16671): Late-enabling -Xcheck:jni
I/art (16671): VMHOOK: rlim_cur : 0 pid:16671
I/QtCore (16671): Start
I/Qt (16671): qt start
D/Atlas (16671): Validating map...
D/FindExtension(16671): FindExtension: before mHardwareRenderer.initialize, mSurface.isValid() = true
I/Adreno-EGL(16671): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.AF.1.1_RB1.05.00.02.006.020 - CR771817 ()
I/Adreno-EGL(16671): OpenGL ES Shader Compiler Version: E031.25.03.06
I/Adreno-EGL(16671): Build Date: 03/04/15 Wed
I/Adreno-EGL(16671): Local Branch:
I/Adreno-EGL(16671): Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.AF.1.1_RB1.05.00.02.006.020
I/Adreno-EGL(16671): Local Patches: NONE
I/Adreno-EGL(16671): Reconstruct Branch: NOTHING
I/InputMethodManagerService( 764): Enable input method client, pid=16671
I/InputMethodManagerService( 764): Disable input method client, pid=16671
I/ActivityManager( 764): Recipient 16671
E/InputEventReceiver( 1202): Looper::removeFd(71) is failed, result(0), input channel 'ClientState{37476efb uid 10112 pid 16671} (c)'
D/Process ( 764): killProcessQuiet, pid=16671
I/ActivityManager( 764): Process org.qtproject.example.android (pid 16671) has died
"org.qtproject.example.android" died.
This also happens when I just deploy a blank project, which only contains a pushbutton which I put using Qtcreator.
This is my bugreport: https://www.dropbox.com/s/ven5pby2dy3x4uw/bugreport-2017-08-31-09-34-57.txt?dl=0
What am I doing incorrectly?
Thanks

How to properly change UI theme?

I want a dark colored theme.
I changed the following in styles.xml:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
to
<style name="AppTheme" parent="android:Theme.Black">
and I also tried many other strings which either don't compile or cause the same crash.
Android monitor shows:
08-11 20:07:00.938 29773-29773/? I/zygote: Not late-enabling -Xcheck:jni (already on)
08-11 20:07:00.956 29773-29773/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
08-11 20:07:01.122 29773-29773/com.example.timothyswan.myapplication I/InstantRun: starting instant run server: is main process
08-11 20:07:01.283 29773-29805/com.example.timothyswan.myapplication D/OpenGLRenderer: HWUI GL Pipeline
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication I/OpenGLRenderer: Initialized EGL, version 1.4
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication D/OpenGLRenderer: Swap behavior 1
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication D/OpenGLRenderer: Swap behavior 0
08-11 20:07:01.459 29773-29805/com.example.timothyswan.myapplication D/EGL_emulation: eglCreateContext: 0xaa4b1920: maj 2 min 0 rcv 2
08-11 20:07:01.461 29773-29805/com.example.timothyswan.myapplication D/EGL_emulation: eglMakeCurrent: 0xaa4b1920: ver 2 0 (tinfo 0x9e4aa9f0)
[ 08-11 20:07:01.479 29773:29805 D/ ]
SurfaceInterface::setAsyncMode: set async mode 1
08-11 20:07:01.493 29773-29805/com.example.timothyswan.myapplication D/EGL_emulation: eglMakeCurrent: 0xaa4b1920: ver 2 0 (tinfo 0x9e4aa9f0)
And the 'run' console shows:
08/11 22:01:07: Launching app
$ adb shell am start -n "com.example.timothyswan.myapplication/com.example.timothyswan.myapplication.InspirationBasic" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 6973 on device emulator-5554
Application terminated.
The theme of an AppCompatActivity (not Activity) must be an descendant of an Theme.AppCompat.
So check if your activity extends AppCompatActivity or not.
If so, change it extends Activity, or make your own theme which inherits from Theme.AppCompat and apply to your activity

Bluetooth keeps disconnecting after being connected to another Android device for a while

I have an Xperia Z3C, Android 5.1.1 and I'm trying to connect it to a Nexus 4 Android 6.0.1 via Bluetooth. Pairing them is OK, but when I try to connect them, it says 'Connected' for less than a second and automatically disconnects.
Is this a known issue? I haven't found anything about this.
Here's what logcat says:
03-14 17:25:55.308: E/bt-btif(14245): bte_scan_filt_param_cfg_evt, 1
03-14 17:25:55.308: E/bt-btif(14245): bte_scan_filt_param_cfg_evt, 1
03-14 17:25:55.990: E/bt-btm(14245): new address: xx:xx:xx:xx:xx:xx
03-14 17:25:55.990: E/bt-btm(14245): new address: xx:xx:xx:xx:xx:xx
03-14 17:25:56.712: E/bt-btm(14245): new address: xx:xx:xx:xx:xx:xx
03-14 17:25:57.464: E/bt-btif(14245): bte_scan_filt_param_cfg_evt, 1
03-14 17:25:57.814: E/bt-btm(14245): Ignoring RNR as the state is not BTM_SEC_STATE_GETTING_NAME
03-14 17:25:57.933: E/NetlinkEvent(318): Unknown ifindex 41 in RTM_DELADDR
03-14 17:25:57.963: E/dhcpcd(15974): bt-pan: interface not found or invalid
03-14 17:25:57.986: E/BluetoothPanServiceJni(14245): ## ERROR : disconnectPanNative(L224): Failed disconnect pan channel, status: 1##
03-14 17:25:58.139: E/BluetoothTetheringNetworkFactory(14245): DHCP request error:DHCP result was failed
03-14 17:26:01.382: E/bt-btm(14245): btm_sec_disconnected - Clearing Pending flag
I had the same problem while trying to scan for Bluetooth devices from my Android application. The interesting thing is that it does not throw any exception (caught or uncaught) and fails silently! The problem occurs for devices with API Level >= 23 (Android 6.0). Here is an extract of my Logcat logs :
03-30 14:07:52.099 192-211/? I/BufferQueueProducer: [org.manios.testbt/org.manios.testbt.printing.BluetoothPrinterDiscovery](this:0x7fa16de400,id:1467,api:1,p:26262,c:192) queueBuffer: fps=0.19 dur=5154.29 max=5154.29 min=5154.29
03-30 14:07:52.114 192-192/? I/SurfaceFlinger: [Built-in Screen (type:0)] fps:1.091767,dur:1831.89,max:999.66,min:832.23
03-30 14:07:52.137 774-1001/? D/InputReader: AP_PROF:AppLaunch_dispatchPtr:Up:89556864, ID:0, Index:2056797440
03-30 14:07:52.137 774-1001/? I/PerfService: PerfServiceNative_boostEnableTimeoutMsAsync:3, 100
03-30 14:07:52.138 26262-26262/org.manios.testbt D/SettingsInterface: from settings cache , name = sound_effects_enabled , value = 0
03-30 14:07:52.138 26262-26262/org.manios.testbt D/BluetoothAdapter: isEnabled
03-30 14:07:52.140 26262-26262/org.manios.testbt D/BluetoothAdapter: getName
03-30 14:07:52.141 774-1636/? D/BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 parentUser=-10000 foregroundUser=0
03-30 14:07:52.142 21807-21818/? D/BluetoothAdapterProperties: getName: mName = Lenovo TAB3 8
03-30 14:07:52.144 26262-666/org.manios.testbt D/BluetoothAdapter: isEnabled
03-30 14:07:52.146 26262-666/org.manios.testbt D/BluetoothAdapter: isDiscovering
03-30 14:07:52.148 26262-666/org.manios.testbt D/BluetoothAdapter: 109507751: getState(). Returning 12
03-30 14:07:52.152 21807-21817/? D/BluetoothAdapterProperties: isDiscovering: mDiscovering = false
03-30 14:07:52.156 26262-666/org.manios.testbt D/BluetoothAdapter: startDiscovery
03-30 14:07:52.158 26262-666/org.manios.testbt D/BluetoothAdapter: 109507751: getState(). Returning 12
03-30 14:07:52.160 21807-21830/? W/bt_btif: bta_dm_check_av:0
03-30 14:07:52.172 21807-21830/? E/bt_btif: bte_scan_filt_param_cfg_evt, 1
03-30 14:07:52.181 21807-21823/? I/BluetoothAdapterProperties: Callback:discoveryStateChangeCallback with state:1
03-30 14:07:52.182 774-2924/? V/ActivityManager: Broadcast: Intent { act=android.bluetooth.adapter.action.DISCOVERY_STARTED flg=0x10 } ordered=false userid=0 callerApp=ProcessRecord{c376192 21807:com.android.bluetooth/1002}
03-30 14:07:52.184 1057-1265/? V/BluetoothEventManager: Received android.bluetooth.adapter.action.DISCOVERY_STARTED
03-30 14:07:52.185 1057-1265/? D/BluetoothEventManager: scanning state change to true
03-30 14:07:52.186 21983-21983/? D/ActivityThread: BDC-Calling onReceive: intent=Intent { act=android.bluetooth.adapter.action.DISCOVERY_STARTED flg=0x10 cmp=com.android.settings/.bluetooth.BluetoothDiscoveryReceiver }, receiver=com.android.settings.bluetooth.BluetoothDiscoveryReceiver#b02fe63
03-30 14:07:52.186 21983-21983/? V/BluetoothDiscoveryReceiver: Received: android.bluetooth.adapter.action.DISCOVERY_STARTED
03-30 14:07:52.187 21983-21983/? D/ActivityThread: BDC-RECEIVER handled : 0 / ReceiverData{intent=Intent { act=android.bluetooth.adapter.action.DISCOVERY_STARTED flg=0x10 cmp=com.android.settings/.bluetooth.BluetoothDiscoveryReceiver } packageName=com.android.settings resultCode=-1 resultData=null resultExtras=null}
03-30 14:07:52.218 774-1001/? D/InputReader: AP_PROF:AppLaunch_dispatchPtr:Down:89556946, ID:0, Index:2056794048
03-30 14:07:52.219 774-1001/? I/PerfService: PerfServiceNative_boostEnableAsync:3
I found after some searching using this issue, that in API Level >= 23 (Android 6.0) we have to add the following permission to AndroidManifext.xml
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
so that scanning and other Bluetooth actions function properly.
In Android documentation it states in BluetoothAdapter.startDiscovery() that it requires BLUETOOTH_ADMIN permission with no further details. But if we take a look into BluetoothLeScanner.startScan(),it states clearly that:
Requires BLUETOOTH_ADMIN permission. An app must hold ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission in order to get results.
Hope this helps!
So two things can be going on here. Either the second device that you are trying to maintain a connection with is having an issue maintaining a connection or there is an interference being caused between the two just long enough to break the connection but not long enough to terminate it completely.

Facebook dialog fails and stops the activity

I'm using the Facebook SDK on Android to post an update to the user's feed. I was able to get it to work when I did not have the Facebook client installed. Now, even after removing the Facebook app, when I try to authorize or open the feed dialog the activity is abrupty killed.
I don't get any message telling me that the app has crashed or anything. It's just destroyed. The only message is Mono telling me that the thread 0x0 has been prematurely finalized, which is odd. Also, there's this odd "Not supported in this case." message from webcore.
I'm using the NativeActivity class. I don't use it directly but I extend it in my activity. Here's the logcat from around where things go wrong:
I/PixelWorldEngine( 6796): Authorizing for Facebook...
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webview.db, flag = 6, cannot stat file, error message: No such file or directory
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webview.db, mode: delete, disk free size: 35 M, handle: 0x801450
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webviewCache.db, flag = 6, cannot stat file, error message: No such file or directory
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webviewCache.db, mode: delete, disk free size: 35 M, handle: 0x7ff128
D/skia ( 6796): htcFlashPlugin::htcFlashPlugin
W/webcore ( 6796): Not supported in this case.
I/PixelWorld-glue( 6796): WindowFocusChanged: 0x333288 -- 0
D/SensorService( 120): disable: connection.get() = 0x9f5c20
D/SensorService( 120): disable: get sensor name = BMA150 3-axis Accelerometer
D/SensorService( 120): SensorDevice::activate: handle = 0x0, enabled = 0x0
D/Sensors ( 120): Enable akm: en = 0
D/SensorService( 120): noteStopSensor: uid = 0x274d, handle = 0x0
D/SensorService( 120): pid=6796, uid=10061
D/SensorService( 120): Active sensors:
D/SensorService( 120): CM3602 Light sensor (handle=0x00000004, connections=1)
W/webcore ( 6796): Not supported in this case.
W/mono ( 6796): Thread 0x0 may have been prematurely finalized
D/SensorGUI( 120): ~SensorChannel: mSendFd = 255, mReceiveFd = -1
D/AudioPolicyService( 72): stopOutput() tid 2223
D/AudioPolicyService( 72): releaseOutput() tid 2223
D/AudioPolicyService( 72): releaseOutput() tid 2223
I/ActivityManager( 120): Process com.ri.BubblingUpLite (pid 6796) has died.
I/WindowManager( 120): WIN DEATH: Window{407e9548 com.ri.BubblingUpLite/com.ri.PixelWorldEngine.GameActivity paused=false}
I think it's an Android bug which seems to manifest on HTC devices.
See http://code.google.com/p/android/issues/detail?id=33612

Categories

Resources