Sony Android - app crashing but running fine on other devices - android

I developed my first Android app targeting KitKat ( 4-4-2) with minimum SDK being set to 4.1.2 (JellyBean)
Beside standards UI stuff, this apps is dealing with device sensors end using java multithreading ( standard way, no fancy stuff)
it's now running fine on Nexus5 (kitkat) and Wiko5 ( JellyBean ), however I sent the .apk to a friend for testing on Sony Xperia Z and it's crashing... he si going to send me the device for debugging over tehre...
as I am used to develop w iOS ( one platform, one constructor ) , I'd to know if there is anything to take care before developing for multiple Android devices... additional APIs , should I test locally all these platforms ?

on windows
try
adb logcat -v time > D:\log.txt
then open the log.txt by some editer like notepad++, search 'fatal' and lookup crash stack, you can find the reason app crashed. Or Please post it on, so we can help.

In an ideal world, the Xperia Z should be able to run the app as long as it has the required OS and the sensors your are trying to access. So this looks like something device specific(esp. since it works on your other jellybean device.).
So the way forward would be to look at the logcats.
Also, instead of waiting for the device to reach you, just ask for the logcats - the logs would be the best way to further debug this issue.
Ask your friend to connect the USB to a machine and do the following(assuming android sdk and platform tools are downloaded)
adb logcat
Better still - copy logs to a text file
adb logcat > log.txt

Related

Is it good and possible to always test an android app on real device rather than using android emulator

I am trying to learn android on a dell device having 4gb ram and intel pentium chipset. I am trying to run hello world app on a emulator but it actually take much time(more than 5 minutes) to start the process and at the end give error message "Error while waiting for device: Timed out after 300seconds waiting for emulator to come online". As far as testing on device is considered i find it fast and easy.
So my question is that possible to always test an app on real device and skipping the testing on an emulator.
Also suggest me some tips to make my android studio run faster.
.
Its always better to test on a real device. Its very fast especially when debugging. If your emulator is taking long to load imagine a situation where you are trying to debug and want to check the app's behaviour after each change in code. Just install the usb drivers and sdk tool that your device's api version is running on
Sure it is!
First of all, enable the developer mode in your device (if it's not enabled already). Info for doing this here.
Then just plug your device via USB and it will appear when you run your project in Android Studio.
NOTE: The first time you attempt to run the project, your phone will ask for permissions, make sure you allow it!
It will be good if we are testing the application in real device rather than emulator if you have the device. But we can't buy different density, different dimension, different android version devices for testing so for that purpose we need to use emulator.
To improve the speed of android emulator install HAXM in your system, it will speed up the emulators.

Titanium can't find my Android Nexus device

Hi I'm trying to compile a Titanium Android app directly on my Nexus 7 (2013, SDK 4.3) device but I can't see any 'Titanium on Android Device' option in the Run Configurations.
My device is in Developer mode, connected to the USB, detected by Android File Transfer (Mac OS X 10.9, Titanium 3.1.4), detected by adb...
I tried to restart adb, restart Titanium, plug and unplug the device, but I still cannot see the option.
I also tested all this with Titanium 3.1.3, with no success.
I have no clue of what's happening :/ any help would be appreciated. thanks
It may sound stupid, but my friend had similar problems with his Nexus and he changed the USB slot to which he plugged his device and it worked.
Try using a different cable. Most cables are only able to load the device, somehow. Not every micro-USB-cable is capable of sending data, correctly.
Again a reason why I don´t like to work in the android environment. No one checks whether software and hardware is working the way it´s supposed to. That´s why I love Apples restrictive "closed" system. No 1000 viruses and other crap.
Well, that was a bit confusing but I finally found such option inside a Project Explorer menu...

App does not show up in the installed application list of the Sony smartwatch2 app

I have some problems with SmartWatch2:
Sony Xperia Z1:
Accessory Version:1.0.B.0.60;
Host Application Version:1.0.12;
Smart connect: 5.4.8.
Verizon Samsung galaxy note 2:
Smart connect: 5.4.8.
My two apps do not show up in the installed application list in Sony Smart Connect. I really don't know what to do!
Does anyone have problems like this and solved it?
Many thanks.
Update:
I use "Sony add-on SDK 2.0" and SmartExtensionAPI, SmartExtensionUtils from this pack as linked libraries in my apps. Also "Sony add-on SDK 2.0" marked as a target platform for apps.
Update 2:
Another user with SmartWatch 2 write me that my app didn't listed on his phone smart connect app list.
I assume that you have tried the extension yourself on real HW and it works for you? Couple things you can tell them to try:
Uninstall the extension and reinstall it.
Unpair the bluetooth connection to SW2 and re-pair it.
Make sure:
Your SmartWatch2 extension gives the correct dimensions about itself
(i.e. the dimensions of the SmartWatch2 screen)
Your application maps correctly those dimensions, and transfers the control to your
extension
That was in case your extension never appeared on the SmartWatch2 screen. If it did, but does no more, restarting your phone normally helps. In more difficult cases, uninstall the SmartWatch2 app from your phone (it will be reinstalled once you pair your SmartWatch2 again).
I have a similarly problem but related to the development process. I'm working on a control extension app for SW2, and I was able to compile the code and see the app on the SmartConnect Installed Apps and then test it in the real device (i.e. SmartWatch 2).
After a couple of iterations on Edit code > Compile > Test, the app stops to show on the SmartConnect App list and on the SmartWatch 2 too.
I don't understand why this happens and its not clear what is the solution for this. Rebooting, uninstall, etc. Its like a random try&error solution, and leads to o much time lost on getting the app running again.
Sony SDK Team should give one word on this...

Can I test Android on the Moto X?

I recently bought a Moto X and was following the online instructions for setting it up to test my android code. I installed the USB drivers and got to the place where it tells me that the phone is unlockable. I quickly returned the phone at this point before activating it and subsequently porting my number over.
Can I test code on the Moto X specifically even if it is NOT bootloader unlockable? Is this the case for all android devices?
Unfortunately I don't know anyone that is a developer or even anyone that owns a Droid phone that I could experiment with.
You do not need to unlock bootloader to test your Android applications. Please refer to Using Hardware Devices for more information regarding setting up any Android device for testing. Following is the relevant part quoted for your information:
You can use any Android-powered device as an environment for running, debugging, and testing your applications. The tools included in the SDK make it easy to install and run your application on the device each time you compile.
This is a general answer, not specific to Moto X. I do not see any reason why it should not apply to Moto X.

OpenGL ES Tracer does not collect any data on my Nexus 10

I'm trying to use the OpenGL ES Tracer, but it just doesn't collect any data. I get to the following screen, but the trace file stays emtpy:
I've tried it also with the OpenGLES20Complete example app from Google, to exclude that anything specific to my app is causing this problem, but it just doesn't work.
I'm following the documentation for the OpenGL ES Tracer, except that I'm using IntelliJ IDEA and start the Monitor tool from there. I'm using a Nexus 10 with Android 4.2, so it fulfills the minimum version requirements.
I now also managed to try it on a different device (a Samsung Galaxy i9000 on Cyanogenmod 10), and there the OpenGL tracing works. So there seems to be something specific to the hardware or the OS running on the Android device that disables or enables the tracing.
Are there any further steps or settings I have to take to make this work? What could be the reason why I can't collect any OpenGL traces?
I'd check the output in logcat to see if there is anything suspicious going on. Otherwise, you can try the following from the shell:
$ adb shell
$ am start --opengl-trace com.app.package/com.app.package.Activity
At this point you should see your app launched, but waiting for a connection from the host. You can then use the monitor tool, and in the trace connection dialog, just use the keyword system in lieu of the package name to connect to whatever is running.
Note that your app has to be debuggable.
I believe that it may be a regression with Jelly Bean 4.2.2. I had the same problem on my Galaxy Nexus and Nexus 7, and then I downgraded my Galaxy Nexus to Android 4.1.2 using fastboot and the stock Google ROM and the tracer was working again. I've opened a bug report here: https://code.google.com/p/android/issues/detail?id=53426
Go to the Developer Settings on the device and on the Enable OpenGL traces option select Logcat or Systrace.

Categories

Resources