Waiting icon on Ionic mobile app - android

Its been frustrating since we tried many times but failed to resolve the issue on our mobile app (build on Ionic Framework + html5 + AngularJS). When our mobile app is activated, it tries to display data for selection (service layer built on Python), but somehow, the waiting icon is displayed for a long time. Due to confidentiality issue, I cannot display the mobile app code here, but I hope someone how share their experience on this issue. I am attached a copy of the screen shot for reference. enter image description here. All positive suggestions are welcome. Thanks.
Mobile app waiting icon issue

Your question is not very clear but from what I understood you can hide the loader in your callback function. I have assumed you are using promise/callback
$ionicLoading.show();
var datacall=//your call to a data service function using $http to your backend
datacall.$promise.then(function(success){$ionicLoading.hide()},function(err){$ionicLoading.hide()});
Let me know if you want the entire code

Related

Automatically begin speedtest using Ookla App and get the result programmatically in android

mmm...I have a task to get internet speed test,ping, download speed, upload speed, and etc by using Ookla on android... I already know to lunch Ookla programmatically using an intent, but the problem is when ookla is launched, I need to press "begin" test button to run internet speed...Here I just want to begin ookla internet speed test without using user interaction...So when the ookla is launched I want to begin the test automatically too... Is there any way for doing this..??? like sending something from my launcher intent..? or mmm... I don't know exactly...
Thanks in advance...:)
Note:
*sorry for stupid question may be.. :)
*I have found a project for doing this speedtest programmatically, but it needs a server. and I don't have or don't wanna use a server here.. :)

ParseInstaller.getCurrentInstallation().saveInBackground() is freezing my application

I am finding that about 1/5 of my tests are freezing, and after some searching for the problem I have narrowed it down to the line:
ParseInstallation.getCurrentInstallation().saveInBackground();
I am using Parse 1.5.1, and an Android 4.4.2 device. My application class looks like:
public class InitApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
Parse.initialize(this, "my_App_ID", "my_Client_Key");
PushService.setDefaultPushCallback(this, MainActivity.class);
System.out.println("execution DOES reach here");
ParseInstallation.getCurrentInstallation().saveInBackground();
System.out.println("execution DOES NOT reach here");
}
}
The behaviour on my device is that I will first see a blank white screen for about 5 seconds, and then the screen goes black. I am not sure how long the screen stays black, as I usually force close. I've let it sit for about 10 minutes once with no change. I am unable to press the back button and any touch on the screen does nothing. I am forced to use my home button, then force the application to close. Upon reopening the application, it behaves and functions normally.
Further research led me to find this post: https://www.parse.com/questions/android-saveinbackground-lock-the-main-thread
But still, I have been unable to find a solution. One suggestion in the above post is to simply move the location of this code. I have tried this to some point after my main activity's onCreate() method (not to be confused with the application's onCreate() method). Behaviour appeared to be normal up until I got to the point where the getCurrentInstallation.saveInBackground() code is called, where my application froze and failed to respond until I forced it closed.
Are there any solutions to this problem?
I encountered the same problem as well using Parse SDK 1.5.1.
And I just downloaded the latest SDK 1.6.0 and problem solved.
Link to download the latest SDK.
You can track reported issue here:
Parse installation save causing app freeze
I already provided (confidentially) thread dump traces from my app. However at time of writing this post there is no useful feedback from Parse guys.
My humble opinion after looking into traces is a deadlock causing this issue after some trouble with server interaction. But it's just guessing.
Link updated
I do have the same issue and more.
The blank or black screen however happen not to all my test phones. It happens only to one of them (Android 2.3).
SaveEventually also does not work to the problematic phone above (all the other phones I have are working fine). It does not send data through successfully to the server. So I suspect that phone configuration of saving data on the phone itself before passing to the server when network is back on may be the issue.

How can I prevent Phonegap from closing app when there is an error?

I have an application built using PhoneGap (Android) that is essentially a shell for a web app, that would (in the future) allow for push notifications and offline reading of downloaded pages from the web app.
My problem is this - if the connection to the network is lost or turned off in the middle of use, and a link is clicked on a page, there is an error: Application Error: Could not find url: '...', and the app closes. I want to be able to prevent the app from closing, and if possible, change this error message.
I know that the standard would be to use the PhoneGap API to check the network connection, then handle it myself, but because this is a shell for a web App, the only place I can do this is on app startup. What are my options?
I would start by checking out the source code for the childbrowserplugin.
The code there for onlocationchange is allowing for intercepting all webrequests in and out of a webview. It sounds like your app has needs similar to this.
For that you have to add the permissions for wifi,Gps,Internet into the Android Manifest file. While you have to add the code for checking the Internet Connection available condition into you code as well..
If both the connection doesnot fullfills then try to add the toast message that Internet connection is not available..
I think your problem will definitely be solved...

Clear Flash Builder mobile application cache

I am building a Flex mobile application using Flash Builder 4.5, and testing it on a Samsung Galaxy 10.1 tab running Honeycomb.
I have integrated the AS3 Facebook library, but it won't let me log out, the session seems to stay behind, so once a user has logged in, they stay logged in until I have cleared the applications cache, or uninstalled and re-installed the application on the device.
What I would like to achieve here is to delete the cache folder for the application, or somehow clear the cache.
Any idea on how I can achieve this using AS3? Is there a better way of going about it?
Thank you.
Add the following event listener to you main application file applicationComplete or initialize event handler:
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivateApp);
In onDeactivateApp function do the following:
protected function onDeactivateApp(event:Event):void
{
NativeApplication.nativeApplication.exit();
}
This should clear the cache, and the application will make you log back in when you restart it. This should be added to most mobile applications by the way.
Brian

Android App Help

I made a thread similar to this, but I want to elaborate.
Essentially I want to make an app that can be started up, run in the background and will receive messages from a server (the server is a linux server up that currently sends out messages with updates on a system I have to know about) and then give a notice to the person about the message and just kinda stay passively in the back unless it's closed down entirely. I am very new to Android and I have a similar function up on the web, but a web app is required. Any suggestions on what I should read first or anyone know a good tutorial of something similar?
Thanks
Start there : http://developer.android.com/guide/topics/fundamentals/services.html
start reading about services , (services are working in background ) ; and after , read about notifications in android :
refer this two links :
tuto services 1
tuto services 2
tuto services 3

Categories

Resources