Android :: Runnable Interface
Mar 24, 2010
I'm having hard times getting my GL thread (from GLSurfaceView) to trigger some code execution within the UI thread (from Activity). I tried it in every possible way (well not every, I missed at least the good one) none worked.
My idea was to get something called from the UI thread (to update some widgets) when the surface is effectively created. So I added to my onSurfaceCreated method the following call:
CODE:.............
This compiles, but when my GLSurfaceView sub-class is constructed a NoClassDefFound exception is thrown, telling me that the class com.my.package.MyGLSurfaceView$1 is not found.
Here's the log:
CODE:.............
The line 297 in MySurfaceView.java is:
private Runnable mUpdater = new Runable () { public void run () { [...] } };
View 5 Replies
Oct 3, 2009
I didn't found clear answer for why my code does not work. I assume it is because I am trying to update textview from runnable. Anybody know some workaround? Code isn't clean off course, I am happy to get that working so far as I am totally new in java.
CODE:...............................
View 6 Replies
View Related
Nov 3, 2010
In an existing Android project I've encountered the following piece of code (where I inserted the debugging litter) code...
with not a trace of the messages from the Runnable. So appearantly the Runnable doesn't run(), although img.post() returns true. Pulling the ImageView in onCreate() and declaring it final doesn't help.
I'm clueless. Simply setting the bitmap directly, while blocking the UI thread, does fix things, but I want to get things right. Does anybody understand what's going on here?
(ps. this was all observed on an Android 1.6 phone and android-3 sdk)
View 2 Replies
View Related
Dec 17, 2009
I developed one small application to display some text at defined intervals in the android emulator screen.I am using Handler class, small snippet from my code...
When i run this appication the text is displayed only one time.Please any one knows how to run a thread using Handler.
View 1 Replies
View Related
Jul 10, 2010
I want to send a broadcast from a new thread is start.
This is what i tried:
CODE:............
But ofcourse i need context..this won't work. How can i handle this.
View 1 Replies
View Related
Sep 21, 2010
I have looked at every discussion and thread I can find on getting this to work but it is not. I have a simple timer that updates a text view (mTimeTextField in the example below). The mUpdateTimeTask run method is being executed correctly (every second) but the UI/text field is not being updated.
Here is the code:....................
View 2 Replies
View Related
Nov 6, 2009
I'm trying to do an insert to a DB as a result of a user clicking on a button. I want to do the actual insert in the background, so it seems I should use a Handler to do this. The SQLite insert method takes a Context parameter. My problem is how do I get a valid Context inside the Runnable that will do the insert?
View 4 Replies
View Related
Sep 2, 2010
I have an "open" animation and am using Handler.postDelayed(Runnable, delay) to trigger a "close" animation after a short delay. However, during the time between open and close, there is possibly another animation triggered by a click...my question is, how would I cancel the "close" animation in the handler?
View 1 Replies
View Related
Sep 20, 2010
I have a Thread that downloads data from internet
CODE:..........................
There is an activity that needs to be updated according to downloaded data.
CODE:............................
Whenever I run above code I get NullPointer Exception .Please help me to update the view.
View 1 Replies
View Related
Jul 26, 2010
I want to place an animated marker showing a user's current location in an Overlay over a MapActivity. I need to be able to turn the animation on and off.
I thought this could be accomplished as follows:
CODE:..............
The constructor is invoked from the main MapActivity.onResume() using
locationOverlay = MyLocationOverlay(this)
And the animate/draw is invoked by
CODE:.................
However, the run() method never seems to be invoked.
View 1 Replies
View Related
Jul 26, 2010
I'm trying to call a method from inside a Runnable that is running. It waits for a string to be entered and when it is then depending on the string (the strings act as commands) it calls a method and is supposed to run whats inside it. code...
View 2 Replies
View Related
Jun 4, 2010
I am building an app for Android 2.1 that provides notifications based on calendar events. But I'm aware there are issues with the Calendar API not being readily available / stable / whatever. What I'd like to do is somehow communicate with the user's Google Calendar to get a list of tasks every few hours, or perhaps when the calendar is updated, and then store that data locally so they don't need to have an active Internet connection at all times. Then at a particular time, the notification event would occur. Surely, someone must have determined a way to interface with Google Calendar? I'm sure there must be numerous apps and solutions available that connect to it already, and my users can use any interface they like for interacting with it, but I need to be able to read the data and store it locally.
View 1 Replies
View Related
May 7, 2009
Which do you guys use? Torrent Off: BarTor vs. Torrent Droid. I bought both and forgot to test them out, so I can't refund either. But I want to know which one I should go through the trouble of configuring. What has the nicer interface? Best performance? Does Torrent Droid use the Browser to do all of its torrent searches?
View 3 Replies
View Related
Oct 26, 2009
I'm developing a framework for android and i need to access directly to the Wifi interface and UMTS interface (make switch to other access point, send/receive MAC segments and others things in low layers). Can i do this in Java? or have to be in C++? and in C++, using the NDK?
View 2 Replies
View Related
Sep 16, 2010
http://www.youtube.com/watch?v=e1qG6z6BbYQ
Does he use a plugin to edit the .xml for the layout because mine looks totally different. It's just plain code.
View 2 Replies
View Related
Dec 25, 2009
Is there an app out there that will interface with sharepoint sites? I haven't had any luck finding them on my own. Just want to have access from my phone.
View 1 Replies
View Related
Jun 27, 2009
Is there an URL where I can find documentation on how to get radio interface stats (signal level, registered BTS's / Node B's in the area.
View 4 Replies
View Related
Apr 29, 2009
I am looking for some answers from some of the experts here. I have a project in mind that I want to start. It is about using HTC's Touch HD phone as a device in a museum with rich media/video about the art and the artists on it. Besides the videos and animation, I also want to show some content from a web browser. Now my biggestest issue. I do not want that the museum guest who pick up the phone for the tour get to see the standard Android user interface. Is there a way to develop a new user interface that would start up directly once the phone is turned on? It should then automatically start the app with the museum infos. Later I may want to add some GPS functions and even sms and photo taking, etc....
What do you think, how flexible is Android to allow that?
View 2 Replies
View Related
May 23, 2010
I'm looking for a way to add a new custom menu item to the SMS interface. The idea is add an option like "Insert predefined message", and control the predefined message from other application. Is this possible?
View 1 Replies
View Related
Jun 30, 2010
I want to implement a http remote control for an Android application: From a browser on a computer in the local area network the application running on the Android device should be controlled.
Are there any recommendation how to implement this? I heard about i-jetty but it is not uncomplex to integrate it into an existing app.
View 1 Replies
View Related
Sep 2, 2009
This is probably a very "newbie" question as I'm relatively new to the android sdk, but figured this would be good place to ask.
Say you have a layout with several textviews that all have sequential IDs (ie, tBox1, tBox2, tBox3, etc).Is it possible to reference each box in a loop? Something like:
do { iCount++; View tvBox1 = findViewById(R.id.tBox[iCount]); }
View 3 Replies
View Related
Sep 22, 2010
Is it possible to add a JavaScript interface to the Android Browser the same way one can be added to the WebView Component as illustrated in this demo. My particular use case only needs JavaScript -> android so that I can send it back to the previous activity.
View 1 Replies
View Related
Sep 23, 2009
Been using remote interfaces for quite a while now, but the time has come to increase the amount of data i need to pass between processes. Following the Designing a Remote Interface using aidl examples/ tutorial i have had some success but have now come to a problem.
My activity binds to my service no problem, the callbacks work, but the data i send does not reach the client. My code is an extension of "Pass by value Parameters using Parcelables" from the "Designing a Remote Interface using aidl" page. The only difference is the amount of data, it has 18 int's and 3 Doubles. As you will see below, once i have entered the data into the parcel, i create my Parcelable using .createFromParcel(p) this however does not seem to work, even when my Parcelable is reading from the parcel no data gets read.
Here is my code for sending the data to the client.
CODE:..............
Here is my Parecelable:
CODE:....................
View 4 Replies
View Related
Jul 20, 2010
I have VillainROM 12 installed on my Hero and have been playing around with various themes from the standard Sense UI to things like dxtop. I do want to try out the stock Android UI which I believe is accomplished by just going into Applications>Manage Applications>HTC Sense and selecting clear defaults thus setting it to stock Android. Thing is that in my install of VillainROM 12 the "clear defaults" button is greyed out and unavailable to be pressed. Is this an intentional thing in VR12 or am I maybe going to have to re-flash in order to achieve this?
View 4 Replies
View Related
Apr 20, 2010
I'm hearing that IPv6 is supported by android, at least over the wifi interface, but I cannot do anything with IPv6 through the SDK at all. I am running Android 2.1 on an N1. I can see that at the OS level, the wifi interface has a link local inet6 address: ufo:~ newton$ adb shell $ cat /proc/net/if_inet6 0000000000000 0000000000000000001 01 80 10 80 lo fe80000000000000022376fffe8d1e63 0c 40 20 80 eth0 although ifconfig does not show it: $ ifconfig eth0 eth0: ip 192.168.1.2 mask 255.255.255.0 flags [up broadcast running multicast] If in Java I call getInetAddresses on a java.net.NetworkInterface, I only get the inet4 address. As I'd expect from the above, I cannot connect via any Java APIs to another link local IPv6 host on the same wifi lan Depending on my approach I get "socket level is invalid", a bad socket options error, host unreachable, or timeouts. Has anyone seen this work or have any insight? You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@google groups. com To unsubscribe from this group, send email to android-developers + unsubscribe @googlegroups.com For more options, visit this group at http://groups. google.com / group /android-developers?hl=en
View 2 Replies
View Related
May 12, 2010
I'm in the process of developing Lua/Python based Test harness automation test suite for testing IBinder based message interaction. How to achieve this? Is there any Lua/Python or any scripting sample or examples provided?
View 2 Replies
View Related
Jan 11, 2010
I need to know if there is an interface to access the direction in which the phone is pointing.
View 2 Replies
View Related
Mar 29, 2009
I want implement a widget to show NBA Game Schedule in Android G1, where can i find the widget interface ?
View 3 Replies
View Related
Aug 31, 2009
I have created a service and want to expose the interface to other applications. For one service I have done this successfuly. I just put the AIDL interface into the new project and all worked fine. Now for this service I've done the same but I get a java.lang.VerifyError when trying to use this interface. I think that the problem is that the AIDL uses a class (PolicyRole) that is only defined in the source code of the service. To compile the source that uses the interface I had to link against the code of the service but at runtime the error appears. Code...
View 2 Replies
View Related
Sep 29, 2009
In Android, how can I replace the user interface of an emulator by my own interface? I would like to start my own interface immediately as the emulator gets started and that the user can't use the original interface but the original interface is on the background.
Update:
Now my code looks like this...
As I run the program, Eclipse displays
ActivityManager: Warning: Activity not started, its current task has been brought to the front. Does anyone knows why?
View 3 Replies
View Related