Why my PhoneGap app is starting slowly on android device? - android

I've been working with PhoneGap for about two weeks now, yesterday I've build a new android app all went well except that the app starts very slow on my android device. It first shows me for three seconds just a black background except the navbar. So I want to ask how to boost it up or which files I could remove or what I've done wrong please I would be happy if you explain me also the file structure. Thanks in forward for your answers!

Your question is little bit vague. Please, give us more information about your app, about your config and what you’ve already tried.
If my app is slow on any device, I do generally the following:
Check if the same problem occurs in the browser
What’s going on at the start of the app in the browser (Chrome Dev Tools)
If nothing unusual happens, check the logs on the device
For Android, I’m using Logcat for checking what’s happening on the phone.
In order to use Logcat:
1.) Enable debugging mode on your Android phone
2.) You need Android Studio
3.) Connect your phone to your computer and start Logcat in Android Studio 3.1.2
4.) Check the logs while you are starting your app on the phone

Related

Xamarin mobile app deployment to phone not working outside of debug

I created a simple Xamarin ANDROID App. I set up my phone to development mode and deployed my app to the phone via USB.
The app continues to work on the phone as a regular app.
I then created a Xamarin MOBILE App which was more complex. I deployed it to my android phone via Visual Studio debug mode as with my previous app and it ran perfectly. But when I attempt to run the app directly from my phone, it won’t run. The first screen partially loads without anything on it and then disappears. My phone puts a message up saying that my app keeps stopping and would I like to close the app. I make use of a file placed in Assets. Might this be an issue when not debugging from the computer?
Might there be a difference between deploying a xamarin android app and a xamarin mobile app.
A minor thing is that it has added the name ‘.droid’ to the name of my app which I would like to get rid of.
I am new to deploying apps to a phone
I have solved it thanks to your helpful prompts.
I looked at the error logs and the error was ‘FATAL’ in a mono dll. This was indirectly helpful in that I knew it wasn’t the logic in my code.
I also made the discovery that running my app directly in the emulator also failed in the same manner as on my phone. I also ruled out that it might be an issue with transferring an asset -a file the my app uses- as I bypassed using the asset.
(Running my app via visual studio in both the emulator and my phone worked perfectly.)
I then decided to re-house my forms and classes in a new template as I suspected it was corruption in some xml configuration setting that didn’t bother Visual Studio. This worked great and the app now runs stand alone on the phone (and emulator).

How can you get details about crash of Android app?

It is not really a programming question. I have this app that continues to crash on my phone, but works fine for everybody else. I used to program android apps, so I have knowledge in this field.
It something on my phone probably it always crashes at the same stage. I did not program this app. How can I still get the details of the error or the trace of the exception?
I would suggest plugging the phone into your computer or laptop, opening up the Logcat tab in Android Studio and viewing the exception details as the app crashes.
This can be done separately from Android Studio using ADB but it involves more steps.
Of course, make sure that you have enabled USB debugging on your device before this.

Android studio, nothing comes in emulator on running app

I am trying to run the simple "Hello World" program in Android Studio for last two days but whenever i run the app, emulator opens but app doesn't even after waiting.
I tried a lot of things from internet but nothing worked. Please help me out or suggest some other alternative to run and test the app.
Sometimes the app does not launch automatically in the emulator.
In the emulator, open the app drawer (the screen where you can see all apps in the emulator) and see if your app is in the list of installed apps.
Otherwise, you're having another issue.
Note: I suggest that you use the Genymotion emulator. It is far better than the default Android emulator.

Cloudpebble "Installation failed. Check your phone for details."

I'm using Cloudpebble to develop a watchface for myself. Everything compiles well and I've not had troubles sending the face to my watch until now.
After compiling the watchface and linking to the phone, it returns an error of "Installation failed. Check your phone for details." However, the phone does not shed any light on what these details might be.
I've checked the usual suspects such as full watch slots and inability to connect to phone, but those were not issues in my case and I'm rather stumped as to what the problem might be. Any help would be greatly appreciated.
Pebble App Version:
2.1.0-beta9 2.1 (Android)
Watch Firmware: 2.7 2.8
Watchface Source: GitHub
UPDATE 11/20:
I didn't mention before that the phone app would crash often when attempting to load my watchface on the watch because I chalked it up to beta software. Today brought watch firmware 2.8 and phone app 2.1 proper, and while the phone app no longer crashes, the mysterious error continues without additional information on the phone.
The answer to my particular issue, as it turns out, was that I had unused fonts. It's not a very obvious problem, so I hope this helps others out.
The main issue really was poor error reporting from cloudpebble due to the lack of error clarification returned from the pebble app to cloudpebble.
I have opened an issue on the cloudpebble github (that's where I found the answer) so if any further developments happen, they'll more than likely be there.
I found that the app had to be on a specific page for it to properly install on the pebble. I found this to be true if I installed on the terminal using the Pebble commands or using the web IDE CloudPebble.
The app has to be on the "My Pebble" scene/activity. Make sure when you attempt to install an app to Pebble that you are on that scene/activity regardless if you are installing using the web IDE or the command line.

while the apk runs without problems on emulator when installed on Motorola milestone picture and icon doesn't shown as they were on emulator

my problem : the app I have uploaded into my cellular device is shown without the pictures I have insert to it .
steps I have done in order to install:
I have inserted the xxx.apk file into the device via usb
I downloaded an apps installer via the Market
I opened the app using the installer and instead of picture an white background appeared
when I opened the xxx.apk file using file system I found the pictures.
note: even an application icon weren't appearing.
Apparently the res libary having problem to be bined to application.
I might ness to add something to my appliction manifest?
I might need to change something on my device ? (I already made a change and enabled user's not Market application )
I would be very grateful for some life saving answer I need to show my work in a few days in this is the first time i tested her on a real devise.
I also tried an example as shown in hello android book the same example worked perfectly on the emulator where on my android device (Motorola milestone ) the picture and icon weren't shown
Please tell me what I might be doing wrong guys I need to apply my project back at uni(I was the only one in uni who did it on android and in my country most of pep don't even know what android is so getting help outside of forum's like this is not an option ) so please please help me .
I don't know what app installer you downloaded from the Market, but you shouldn't need it. You should be installing the app to your phone using the same SDK tools you used to install it to the emulator. Ie, using Eclipse or the commandline "adb install" commmand.
I'm assuming you used the SDK tools to install the app to the emulators? In which case, start there. Start with looking at what you're doing different between when you installed unsuccessfully to your phone and when you installed to successfully to the SDK.
In my experiences so far, there should be very few differences between working with the emulator and working with the phone.
Well, something is wrong, but what is hard to tell from your question. What pictures are you talking about? Your drawable resources? My guess would be that your application works in the emulator (you have tested it?), but that it doesn't on the phone you're testing with. Have you checked the logcat output?
If you're developing from Eclipse, why not try a debugging session using the phone rather than the emulator?
Hard to narrow down without more details, but a few notes:
Pontus has a point - what's your logcat output? You can use logcat on a real device. Maybe not yours unless it's rooted, but with many phones you can.
Do you link the drawable to your app in the manifest file?
How do you test on emulator vs. device? Do you right-click the app and choose "Run As -> Android Application"? Do you do that for both emulator and device?
When you run on the device, do you first sign it? If so, can you verify the jar/apk and see the contents? Is the drawable under res/drawable?

Categories

Resources