Android :: How To Implement JNI Which Calls A Time Consuming Native Method

May 9, 2009

I need to implement a JNI which render image with 3-party native function. This function call is time consuming, it cost about 1s to return. I found during that time, even if I call the JNI within another Java thread, the whole Dalvik VM is blocked. UI is frozen. I guess that's because Dalvik doesn't implement Java thread with a native thread, so any time consuming native function call will block the whole VM. I wonder how to solve this problem. My best guess is I should create a pthread in JNI to call that 3-party native function. But I don't know how to implement this kind of JNI.

Android :: How to implement JNI which calls a time consuming native method


Android :: Emulator Is Very Slow And Consuming CPU Time?

Oct 10, 2009

few weeks ago I encountered a problem. My Android SDK 1.5 emulator became very slow and CPU consuming. This happened earlier, but was irregular just removing AVDs usually helped. Few weeks ago I installed Android SDK 1.6, tried to move my dev environment there and noticed that emulator runs very slowly. I rolled back to 1.5 and noticed that the same problem is there. What's going on: - emulator startup is pretty slow; - sometimes emulator hangs on startup; - sometimes after startup is complete I see Force close/Wait dialog for some Android applications/services (Alarm clock, messaging) - applications inside the emulator run MUCH slower than they ran before, I see delays in response even in launcher, when I just switching between icons with arrow keys (at this time CPU usage according to the task manager is from 35 to 50%, i.e. one core is completely busy). - now, when I'm typing this message, emulator (clean, newly created AVD, I haven't installed nothing there, just out of the box) occupied 50% of my CPU (and 140MB of RAM). Hardware: Intel Core2Duo T7500 (2.2GHz) + 2GB RAM. OS: Vista I don't have any problems with 1.6 on Linux (Kubuntu 7.10), emulator starts quickly, responds in a flash, and seldom consumes more than 20% of CPU time (usually in case my application is working with DB).

View 2 Replies View Related

Android :: How To Arrange Long (time Consuming) Actions?

Feb 10, 2010

For instance, we are in SomeActivity and the activity has a button that invokes moving files from one dir to another (let's call it job).On Android things change. I know there's the AsyncTask that is probably provided to solve my case. There's even a good example of how it should be used. But since there's no guarantee of how long an Activity instance will live the AsyncTask should be cancelled on onSaveInstanceState (and restarted on onRestoreInstanceState). This means using AsyncTask there's no guarantee we are able to fully fulfill the job once started. In some cases as sending an http post request for creating a user I would not want to get in "user already exists for this login" trouble on reruning the AsyncTask. This is possible since the AsyncTask can be interrupted while the request is already sent (and the server actually is doing its job - creating a new user), but the AsyncTask is canceled before we got the response.

View 2 Replies View Related

Android :: Implement StartForeground Method In Andorid

Sep 10, 2010

I want to implement startForeground method in Service class for prevent service self kill. Can anybody sent me code for implementing this method?

View 1 Replies View Related

Android :: Implement Custom Input Method For Certain EditTexts Within App

Dec 14, 2009

I want to implement a custom input method for certain EditTexts within my app. I understand I need to extend the InputMethodService class, but how do I then add this to certain views? I've tried just using the class name in the android:inputMethod XML property, but this seems not to work. Using the SoftKeyboard example in the 1.5 SDK, my manifest is as follows:..............

View 2 Replies View Related

Android :: Custom Adapter Implement Get View Method

Dec 7, 2009

I have implemented a custom adapter the extends from the BaseAdapter and implements the getView method. It works fine except for one thing, not once do I get the convert View (a parameter to the getView method) that is not null (that can be reused).

View 2 Replies View Related

Android : How To Implement Where Clause On Droid Query Method?

Aug 13, 2010

I'm trying to query a word, for this Im using the db.query method. But I want use a where clause, I've done like this on my code, but, the emulator returns an error...

View 1 Replies View Related

Android :: Implement HTC Sense Style Time Selectors In Droid?

Sep 19, 2010

Is there open code available for implementing a time selector like the one used in HTC Sense?
It's a wheel and the user can push it up or down to select higher or lower number.
If there isn't code available, how do I go about implementing it?
At best I would like to have a 59 beneath the 00 to be more like a real wheel.

View 1 Replies View Related

Android : Java - Implement A Run Method Of Thread If Create A Thread Global

Sep 7, 2010

How can I implement a run() method of thread if I create a Thread Global?

I mean If I create a Thread Globally then can I implement its run() method {" public void run()"} anywhere in my Application?

In the run() method I have to write the code to perform some action.

IF I can do it then please can anyone show me briefly how to do it particularly.

View 2 Replies View Related

Android :: Sequence Of Method Calls While Creating Custom Components

Jul 26, 2010

I was wondering in what order the following methods - on Draw(), on Measure(), on Size Changed() - are called automatically when we create a custom component. Not sure if this question makes sense. I've just been kinda confused as to what the methods are supposed to do exactly.

View 1 Replies View Related

Android :: Static Method Calls To Derived Types Over Virtual Implementations?

Jul 8, 2010

I have class A, with methods foo and bar, that are implemented by A1 and A2. The functionality in both A1 and A2 is the same. In other words:
public class A {
public int foo() { return 0; };
public int bar() { return 1; };
} class A1 extends A {
public int AnotherFooFunction() { return foo();
} public int AnotherBarFunction() { return bar();
} } class A2 extends A {
public int AnotherFooFunction() { return foo();
} public int AnotherBarFunction() { return bar();
} }

Is it better to keep the code in this fashion, or to swap out those virtual methods as static methods? (In Java, everything non-final/non-private is considered virtual, right?) According to the Designing for Performance section in the Android Developer Docs, I should swap out these virtual methods for static ones. So the above becomes:
public class A {
public int foo() { return 0; };
public int bar() { return 1; };
} class A1 extends A {
public int AnotherFooFunction() { return A.foo();
} public int AnotherBarFunction() { return A.bar();
} class A2 extends A {
public int AnotherFooFunction() { return A.foo();
} public int AnotherBarFunction() { return A.bar();
} }

Is this how it "ought" to be? I fully realize that I may be misinterpreting this paragraph in the docs.

View 2 Replies View Related

HTC EVO 4G :: Native Date & Time Selector Applications Stopped Working

Nov 15, 2010

Running Froyo with Fresh 3.4 build and recently any time I use any app that utilizes the native date/time selector, i have problems... WHen trying to set a new alarm, or edit an existing one, when I click the "Add Alarm" icon, instead of bringing up the window that allows the selection of the time the alarm should sound, the screen just flashes and goes back to the "Desk Clock" screen. Also, whenever I want to make a new calendar entry or change an existing one, the same thing happens at the point that the date/time selector window should appear.

View 1 Replies View Related

Android :: NDK OpenGL - Mixing Java And Native - C - Calls To OpenGL API

Jul 24, 2010

I would like to be able to use the OpenGL API from both Java and C (via NDK).

In Java, there is a GL object passed, which has all GL methods on it.

In C, you just talk to the native library.

In a single onDrawFrame callback (for which Java is passed a GL), can I use methods on the GL object, and also call NDK methods which access the openGL library?

In other words, is the GL object just a wrapper for the same instance of the native library?

View 3 Replies View Related

Android :: Getting The Time Of The Outbound Calls

Jul 12, 2009

My first intention is to make a minute counter application. I tried to use a PhoneStateListener but it does not provide enough information to count the time of the outbound calls. The state of the phone does not change when my outbound call is took. Some idea of how to make it ?

View 2 Replies View Related

Android :: Exact Time / Date On Calls / Texts On Ally?

Nov 21, 2010

I couldn't find a thread that addressed this, sorry if it's been asked before!Here is my question: Is there a way to display the EXACT time of a call or text on the Ally and not just have it say 'yesterday' or '2 hours ago', etc. I can't find it in any settings and I can't seem to find an app for it. With my job I have to fill out a very detailed field report requiring exact times I spoke with someone, did something, etc. and I used to use my text messages as a way to keep record of this. If there is a way to do this it could make my life much easier!Disclaimer: After reading several posts here I see that I'm pretty technologically impaired in the span of droid users, so go on and treat me like I don't understand you're computer lingo because you're probably right. No offense will be taken!

View 5 Replies View Related

HTC Droid Eris :: 2 Calls - At The Same Time

Dec 10, 2009

I come from an original EnV. If it had this feature, it was lost to me, so just go with it and share in my excitement.

With the Eris, it is SUPER easy to put someone on hold and then call another person. There is a little phone icon on the bottom right of the dialer, with a plus logo on it. you click that and you can add to your call, which puts one person on hold (it shows you their number on hold) and lets you talk to the other person.

View 2 Replies View Related

HTC Hero :: Screen Time Out During Calls

Aug 6, 2009

During calls my screen times out and goes black after the set amount of seconds (can't remember what mine is set to), but i just wanna know if there is a way of keeping the screen from timing out for the duration of the call, thus making it easier to end the call without having to turn on and unlock the screen?

View 12 Replies View Related

Android :: Consuming / Calling ASP.NET Web Service

Dec 17, 2009

I am trying to develop an application which calls the asp.net web service from android. I tried a lot but i got an exception while calling the SOAP_ACTION. I have tried with the localhost, local IP Address and also i have taken URL from the internet but it throws an exception.

View 6 Replies View Related

Android :: Consuming WCF Restful Service

Oct 30, 2010

I am trying to comsume a self-hosted WCF service which simply returns a String in JSON format. It takes a very long time around 2-3 minutes to get the response on Android Device, where as on any other computer it works fine. Could anyone help me on this?

View 2 Replies View Related

HTC Droid Eris :: Lag Time Placing Calls

Jul 30, 2010

I've had a lot of success getting my random questions about my phone answered on here before, so I thought I would try again. I love my eris as a mini computer, use it for all my apps and emails and everything and it works great. Unfortunately, when it comes to working as a telephone, it sucks. It takes between five and twenty seconds after I click on a contact to place a call, and then when a call is ended or lost the screen either shows black for a while or says "HTC" and then reboots. This is particularly annoying when I lose a call and just want to call someone back, but I have to wait about 30 seconds before my phone even shows me my home screen again. Once I'm on a call its usually fine, but getting the phone screen to load and place calls is super slow. I'm running Task Panel on it, but I don't have it auto-killing anything that HTC makes or that is related to phone calls.

View 26 Replies View Related

HTC Hero :: Takes A Long Time For Calls To Come Through

Apr 26, 2010

For quite a while now, people have been saying how long it takes for me to answer my phone, even though it's usually on my desk and I get there after a couple of rings.

So today I tested it out. I rang my mobile number from my landline, it connected and started ringing, but it got to about six rings before the LED on my mobile started flashing and a further two rings until it started ringing!

I'm on T-Mobile, but it seems to connect OK, just take a while to register on my phone. Obviously this isn't the end of the world, but I use my mobile for business and it doesn't make me look very good!

View 9 Replies View Related

Android :: Getting JSON To Jersey Web Service And Consuming It

Jul 30, 2010

I've just recently started out with Android development, and have progressed to the point where I have written a very basic Hello World Jersey RESTful web service, and successfully called it from within my Android App.What I want to do now though, is send a new user record (just name and password for now) to a web service in JSON format.I can create my JSON in the Android app just fine, but I don't know how to get it into the HTTP Request in such a way that the corresponding web service that @Consumes JSON can get at it.

1) Create Android App User object

2) Turn that into JSON

3) Put it on the HTTP request

4) Call the web service

5) Web service retrieve JSON from request

6) Parse the JSON into server side User object and deal with as I see fit(Don't worry people, I'll be fine with this bit,

7) Profit! ;)

View 3 Replies View Related

Android :: Consuming WCF REST Service Is Very Slow

Aug 31, 2010

I have a WCF REST service built with C# and it returns an image as part of a CPU intensive operation. The client is running on Android (Java) By default, it will return a text JSON object that looks something like this:{"d",[9,0,77,12,11,...]}Those are they bytes of the image. Fine. However, all the solutions for decoding this JSON are intolerably slow. I've tried Gson, Jackson, and the built-in Android JSONObject class. I have no idea why they are so slow.As an alternative solution, I have my REST service return a GUID, and then that GUID can be used by the Android client to go to a regular URL that serves up the image as a regular binary stream, via an MVC controller. This works well, and it fast, and is pretty easy to handle on the Android side. However, it does feel like a bit of kludge and kind of a violation of the REST design principles.

View 4 Replies View Related

HTC Hero :: Missed Calls Show Only Date / No Time

Sep 19, 2009

Missed calls shows the date but not the time.

View 2 Replies View Related

HTC Droid Eris :: Unable To Make Calls 80% Of Time

Jul 30, 2010

I have had my Eris since Jan. I am on my 3rd replacement and 2nd in 3 weeks. My first one VZW just kept making excuses and wanting to do factory resets and delete apps because in their words that was the problem. The tech guy on the phone told me that they could only replace it with another eris again so here I sit with another POS that continues to lock up. I have been unable to make calls 80% of the time. What a joke On average I have to remove my battery 3-4 times a day to get it to work.

View 16 Replies View Related

HTC Droid Eris : Where Can I Find Out Time Of Yesterday's Calls?

Feb 16, 2010

If I look at a received, placed, or missed call for today, it will show the time of such call. However, anything older than today it just shows "yesterday" or February, 13th, etc. with no time. Where can I find out the time of yesterday's calls?

View 26 Replies View Related

Android :: Need To Develop Application Consuming Ksoap2 Web Services

Jul 21, 2009

I need to develop the application consuming the ksoap2 web services .i have written php script in server i need to call that from server using ksoap2 in the xml form and should parse that response in the form of list . how can i do it i tried some example on ksoap i am not getting the response in xml form can any bode give me some help regarding this.

View 3 Replies View Related

Motorola Droid :: Answering Phone Calls About Half Time

Jun 6, 2010

I just got my Motorola Droid 2 weeks ago and I've been having problems answering phone calls about half the time. When I answer them I hear no sound at all that's pretty much it lol I have the volume up so I'm positive its not that xD plz help this is getting annoying.

View 5 Replies View Related

Samsung I7500 :: See Total Time Of Incoming And Outgoing Calls?

Nov 16, 2009

I own myself an I7500 (firmware V 1.5 Baseband V i7500 xxii5)
my question is if there is a way to see the total time of my incoming and outgoing calls?

in the call log i can see the duration of each call but there seems not to be any way to see the total time for all ofmy calls...
any ideas - apps that i have not found or thought?

View 2 Replies View Related

HTC EVO 4G :: Maps Consuming Battery

Jun 16, 2010

Im having the a problem with maps. I killed it in task killer but it is still somehow consuming my battery. I haven't used it in 3 days.

View 6 Replies View Related







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