Android :: WebView Starts With A Delay

Feb 6, 2009

I am using WebView in a number of screens in my application, and notice that it takes couple of seconds when starting up for the first time. What can I do to speed it up besides trying to create one in a separate thread beforehand?

Android :: WebView starts with a delay


Android :: Delay Before Starting

Mar 30, 2010

I am writing a application which will write to a file. Now I want to show the contents of the file but How do I delay the show function so that there is enough time for the writing to be done before continuing?

View 2 Replies View Related

Android :: Low Delay Audio Via NDK

May 4, 2010

It seems that this question has been asked before, I just would like to know whether there is an update in Android.I plan to write an audio application involving low delay audio I/O (appr. < 10 ms). It seems not to be possible based on the methods proposed by the SDK, hence is there - in the meantime - a way to achieve this goal using the NDK?

View 1 Replies View Related

Android :: Delay Effect To Work?

Jul 2, 2010

I am new to android development, also new to java. I have many years of experience with OO PHP, so it's not hard for me to quickly learn Java and Android, but I still don't know many things like Thread class. I just started developing a simple app. What I want to do is that when a button is clicked, then the TextView is update in this way: the background is changed to black (by default it's set to white) Then it should wait a half a second and then set the background back to white and update the text inside the TextView

Here is my code, it's inside my Activity class:
public synchronized void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.btnPlay: showNewDraw(); break; } protected void showNewDraw() { textResult.setBackgroundColor(Color.BLACK); textResult.setText("Before sleep"); try { Thread.sleep(500); } catch (Exception e) { textResult.setText("Something wrong"); } textResult.setBackgroundColor(Color.WHITE); textResult.setText("After sleep"); }

The way it works now is that it seems to actually take 1/2 second from the time the button is pressed and text is updated, but the background is not reset to black and back to white - it always stays white. Either it is being set to black and instantly reset to white or it's just never set to black. What should I do in order for the "delay" effect to work?

View 4 Replies View Related

Android :: Way To Let Service Delay / Sleep?

Sep 24, 2010

I need to let service sleep for 0.5 sec just as using Thread.sleep(); is there any method??

View 1 Replies View Related

Android :: Add A Delay To Progress Dialog

Nov 17, 2010

I want to make a dummy progress dialog appear for 2 or 3 seconds. It won't actually do anything other than say detecting.

I have the code:

CODE:................

But what do I put in between the show, and the dismissal to have the dialog appear for a few seconds?

View 2 Replies View Related

Android :: HTTPClient Post Delay?

Nov 16, 2010

I am having a hugely annoying issue with delays using HTTPClient and post the first time I call execute on the client the response takes 5 seconds to come back. Subsequent calls take around 100 to 200 ms. I am using the Apache client so does anyone know why this takes so long? The client setup looks like below

CODE:.........

The timing for this look like below.

CODE:......................

View 8 Replies View Related

Android :: How To Set Delay In OnClick Function

Nov 16, 2010

I'm in a process of creating a memory game. My problem is that whenever i click for the second time, i can't even see toggled button. To be clear - first click toggles the togglebutton, so i can see the number it holds, the second click on a different togglebutton is suposed to toggle it, show me the number and then proceed to either set a score +1 if numbers are the same, or reverse them back again if they're different.

Below is the code that i use as my onClick function, i've been thinking about putting some kind of sleep or delay function somwhere in the second "if block" - (if(klikniecia ==2)).

CODE:...........

I think, about setting a delay here, so i can see both of the cards, regardles if the're the same or not before reverting them.

CODE:...................................

View 3 Replies View Related

Android :: How To Set Delay In OnItemSelected() Funtion

Nov 24, 2010

I am using a menu in my application Same as this post... I am using a gallery view for display my menu items

Text Gallery on Android?

Problem is that, i implement onItemSelected listener for gallery, so that when new item is selected data related to that topic loaded. But i also want to allow user to scroll the gallery fully. but each time when user move to next item onItemSelected() function called and it start loading data.

All i want to do is to put some delay in onItemSelected() function, so that if in between that delay user scroll next item than there is no need to load data of previous but for the current. Time may be 1 second. If user dose not go for next item in 1 second, that data of that item must be loaded.

I thought to start a thread,but each time for onItemSelected() there will be new thread...

I try this to.

CODE:............

But Fond Exception.

CODE:.............................

View 1 Replies View Related

Android :: Show Scrollbar After Given Delay

Nov 24, 2010

Is it possible to set a delay at which the scroll bar at the right side appears? The idea is that when the user begins to scroll, the scroll bar does not show up immediately, but if the user scrolls long enough.

I was looking for some time now and found just a getter method getScrollDefaultDelay (), which gets the time in ms when the scroll bar dissapears. How could I control the delay in my case?

View 1 Replies View Related

Android :: ACTION_HEADSET_PLUG Broadcast Delay

Nov 8, 2010

I have my own BroadcastReceiver instance for Intent.ACTION_HEADSET_PLUG action.

There is about 1-2 seconds delay between actual physical unplugging a headset and a moment when my BroadcastReceiver is notified about that.

CODE:........................

How to decrease the delay?

View 2 Replies View Related

Android : How To Call A Method After A Delay

Jun 18, 2010

I want to be able to call the following method after a specified delay. In objective c there was something like:

[self.performSelectorAfterDelay @selector(DoSomething) with Object:nil afterDelay:5];

Is there an equivalent of this method in java? For example I need to be able to call a method after 5 seconds. Code...

View 6 Replies View Related

Android :: RTSP Live Streaming With Low Delay

Jan 21, 2010

Our team has been working on a live video application for Android and we'd like to get to a very low end-to-end delay. We use H.264 coded video, RTP packetization, and RTSP to reach the player. We have been experimenting with CIF resolution on Android 2.0. We have been experiencing about 3 seconds of delay on the player side. Any tips on how we could reduce it?

View 2 Replies View Related

Android :: Touch Screen Response Delay

Feb 6, 2009

I am working on a game that displays its graphics through a modified SurfaceView.The game scrolls around a map based on the location of the main character.That all works fine.I am trying to add a feature to the game that allows you to touch the screen and drag the camera around to see other parts of the map.This is where I am running into trouble.The game's SurfaceView overrides 'public boolean onTouchEvent (MotionEvent event)'to call another method in the game's thread which handles the events.Sometimes, this works fine (although the frame rate drops significantly while the screen is touched).Other times, there will be a delay of several seconds before the game responds to a touch event, during which time the game continues, but the user loses all control.During these delays, a message sometimes appears stating that my activity is not responding, and giving the options to 'Force close' or 'Wait'.If the user selects 'Wait', the game almost always resumes right away, but these delays are obviously not acceptable.The delays occur only the first time the screen is touched after the game is started.Once the game has resumed after a delay, the touch events work just fine again.

View 6 Replies View Related

Android :: Moving From One Activity To Another With A Pause/delay

Jun 9, 2010

I have* two activities*,

*1st one* has a ques and 4 options.

*2nd one* is like a result page (... displaying if your ans is correct or not ...and showing the right ans ..)

Now what i want is when a user clicks :

on a right option [or wrong option] ..i want to turn that Image button into green [ red] .*.and wait for a while* ..and then go to the result activity ..

*so my only concern is onclick of a ImageButton ... how to wait for a while .. and then move to other activity* * * any kind of suggestion will do ..

View 4 Replies View Related

Android :: Google - Delay In Updating To Lattitude?

Jan 6, 2010

This is something pretty small but annoying none the less. When I run Lattitude, and it shows my location on the map, my name is spelled wrong. I have gone into my gmail settings and changed my name, which was spelled wrong in there. Is there a delay in updating to lattitude?

View 1 Replies View Related

Android :: Calculating Packet Loss - Jitter And Delay

Jun 14, 2010

I am streaming an rtsp video to Android. How could I calculate network metrics like packet loss, jitter or delay?

View 1 Replies View Related

Android :: Delay In Displaying Pic Into ImageView Accessing By SD Card

Aug 9, 2010

I wrote an app that saves a camera picture to the SD card, then accesses the file later to display it into an ImageView. This works fine for all devices except the HTC Droid Eris (maybe the version Eris is running?):

ImageView img = (ImageView) findViewById(R.id.ImgProfile1);

BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 4; Bitmap bm = BitmapFactory.decodeFile("sdcard/" + filename, options); img.setImageBitmap(bm); Is there a different method of referring to the sdcard location on 1.5, 1.6, or the Eris itself?

View 16 Replies View Related

Android :: Sending Intents From Receiver To Service With Delay

Aug 18, 2010

I have a Receiver for BOOT_COMPLETED intent and it will start a Service by calling startService with an intent and the Service processes that intent in onStartCommand function by spawning a thread that does a HTTP post to a server.On powerup, sometimes it takes 3 to 5 seconds to get the active data connection on phone, when this happens Service fails to do HTTP post as there is no data connection. Is it possible for the Receiver to send the intent to Service using startService with a delay.? so that when onStartCommand of Service is called data connection is ready to post data.

View 2 Replies View Related

Android :: Automatic Checkbox List With 5 Sec / Delay In Phone

Aug 1, 2010

I want to show automatic checklist in android. For example I can have 4 list of item with unchecked check box adjutant to that.After 5 sec. delay I want to check the first item then move on to second. At the end of 20 sec. I should have all 4 check box checked one by one.Any idea how should I go on doing this ? I can use list view with checkbox option on.right?I am a .net programmer and this is new experience for me so any comment / advise is appreciated.

View 2 Replies View Related

Android : Delay In VideoView To Play An RTSP Stream

Feb 18, 2010

I'm using VideoView to play an RTSP video stream. It works fine, however on my Android phone the audio lags the video by about 3 seconds. If I watch it on my computer with VLC both the audio and video are in sync. Has anyone else experienced this audio delay before and how might I go about correcting it on the phone.

View 4 Replies View Related

Android : Unable To Simulate Network Delay / Speed - Fix?

Oct 20, 2009

An app I'm developing opens a TCP socket connection to a server. That works great, no problems. What I want to do is simulate network delay and slow speeds, but the changes don't do anything. I telnet in to the emulator console just fine and can set the delay and speed changes, but they don't affect my app in any way. Even disabling data entirely (gsm data off) doesn't do anything. However, all of the settings affect the browser, just not my app. I'm just using a regular Java socket (java.net.Socket). What am I missing?

View 8 Replies View Related

Android :: How To Run Something Only When Application Starts?

Mar 27, 2010

I have a dialog popup to indicate how long I want an activity to run.Seems simple enough, but its difficult to determine when the activity is really starting.If the user opens the keyboard on a G1 and thereby goes into landscape, that reruns the activities onCreate method.I can't have a static for the class or even create an application class, because I can't determine when the 'application' goes away. Even after destroying the only activity, the application is apparently still alive.Is there a way to determine that onCreate has been called because of the keyboard being extended or landscape mode invoked?

View 3 Replies View Related

Android :: Application For Canceling / Delay Sending Emails And Text

Nov 9, 2009

In gmail (when on the computer) there is a labs feature that allows you to undo sending an email because it delays sending for 10 seconds. Is there something similar for emails and texts that works on the Droid phone? I have accidentally hit send on the touch screen a few times when I'm not done typing.

View 1 Replies View Related

Android :: Compensate Drawing Delay From Game Logic Updates

Aug 24, 2010

Now I have (1: the UI-loop, there my SurfaceView is placed), (2: a second thread, there the draw function from the UI-loop is called AND the update calculations from my Engine) and (3: the engine, there all the calculations stuff are).Now I wonder how the best and smoothest way to do the SurfaceView independent from the actual frame rate. How shall I do so it will compensate if there is a low frame rate?

View 2 Replies View Related

Android :: Java / Droid - Start An AsyncTask After 3 Seconds Of Delay?

Nov 14, 2010

Java/android how to start an AsyncTask after 3 seconds of delay? how i can do that?

View 2 Replies View Related

Android :: Application Crashes Before It Starts

Nov 16, 2010

intentTest.java:
package intentTest.xyz.com;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button
public class intentTest extends Activity {
Button b;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
b = (Button) findViewById(R.id.b);
b.setOnClickListener( new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(intentTest.this,seond.class );
startActivity(intent);
}});
}}
main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="First screen"
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="click"
android:name="@+id/b"
/>
</LinearLayout>
seond.java:
package intentTest.xyz.com;
import android.app.Activity;
import android.os.Bundle;
public class seond extends Activity{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.second);
} }
second.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="second screen"
/>

manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="intentTest.xyz.com"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".intentTest"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".seond"></activity>
</application>
</manifest>

I get the following error code:
11-16 01:26:07.156: ERROR/AndroidRuntime(779): Uncaught handler: thread main exiting due to uncaught exception
11-16 01:26:07.166: ERROR/AndroidRuntime(779): java.lang.RuntimeException: Unable to start activity ComponentInfo{intentTest.xyz.com/intentTest.xyz.com.intentTest}: java.lang.NullPointerException
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.access$2100(ActivityThread.java:116)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.os.Looper.loop(Looper.java:123)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.main(ActivityThread.java:4203)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at java.lang.reflect.Method.invokeNative(Native Method)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at java.lang.reflect.Method.invoke(Method.java:521)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at dalvik.system.NativeStart.main(Native Method)
11-16 01:26:07.166: ERROR/AndroidRuntime(779): Caused by: java.lang.NullPointerException
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at intentTest.xyz.com.intentTest.onCreate(intentTest.java:18)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
... 11 more

View 5 Replies View Related

Android :: App To Choose What Starts Up At Boot

Aug 16, 2010

I have a number of app's that seem to start and run at random.

I still want these apps on the on phone, so don't want to uninstall, just want to be able to choose when they start up - rather than them starting at random and running in background.

Some of the app's running:

Music
Footprints
Stocks
FM Radio
Juiceplotter
Fake-call-me-Pro

Is there an APP similar to AUTORUNS (which I use on my Windows PC) that lets me choose what programs run at boot?

View 3 Replies View Related

Android :: IM - Always Starts - Funny SMSs

Oct 29, 2009

IM is automatically loaded when I start my phone. I don't use it, but don't see a way to uninstall or shut that off.

Also, I occssionally get these odd sms messages. I looked one up on the web and it said it had to do with IM. How can I stop all this IM stuff?

View 4 Replies View Related

Android : Email Starts Blank

Feb 2, 2010

I have a new Droid (2.0) and set-up a company non-gmail email account (which happens to be hosted by gmail). When I click on the "Email" app form Home, a blank/black screen comes up. I need to hit "Menu", "Accounts", and then select the single account in order for the Inbox to show.Is this normal? Do I have something wrong?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved