Android :: Remote Interface - Parcelables Problem

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:....................

Android :: Remote Interface - Parcelables problem


Android :: Pass Remote Interface (aidl) Throughout Activities?

May 13, 2010

I am developing an application using services and Remote interface. I have a question about passing the reference of my Remote interface throughout Activities. In my first Activity, I bind my service with my activity, in order to get a reference to my interface I use

private ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName arg0, IBinder service) {
x = X.Stub.asInterface(service);
}
@Override
public void onServiceDisconnected(ComponentName arg0) {
// TODO Auto-generated method stub
}
};

x being the reference to my interface. Now I would like to access this interface from another activity, I see two ways to do it but I don't know which one is the "proper" way to do it: passing x with my intent when I call the new Activity redo this.bindService(new Intent(y.this,z.class), mConnection, Context.BIND_AUTO_CREATE); in the onCreate() of my new Activity

View 1 Replies View Related

Android : Extending Parcelables - Got Syntax Error From Aidl Compiler

Jul 15, 2009

I've run into the following issue:

Say I have an Animal class, which is parcelable, and I have a Dog class and a Cat class, which are subclasses of Animal and also implement Parcelable.

Say I have a service with the following AIDL interface:

sendAnimals(List<Animal> animals);

Now I'm calling this remote interface from some client application, passing it a List containing Cats and Dogs. What happens now is that android calls the Cat's and the Dog's writeToParcel() methods at the client side, but at the server side, the Animal's CREATOR is used, which calls Animal's readFromParcel() method. So the right data is sent from the client, but the wrong unmarshalling code is executed at the server.

I have tried to put this in the AIDL file:

sendAnimals(List<T extends Animal> animals);

This results in a syntax error from the aidl compiler though.

My current workaround is as follows: - In each specific Animal subtype's writeToParcel() method, I write the class name as a String into the Parcel as the first element. - In the Animal's CREATOR.createFromParcel() I read the first String out of the parcel, and based on that I create the appropriate type and call the appropriate readFromParcel() method.

I think this is kind of ugly though. I would expect the android framework to take care of this for me.

(My application is not actually dealing with animals, this is just to make it simpler to explain the issue)

View 7 Replies View Related

Android :: Writing Arrays Of Parcelables To Parcel In Android

Dec 11, 2009

I'm trying to write an array of objects that implement Parcelable into a Parcel using writeParcelableArray.The objects I'm trying to write are defined (as you'd expect) as:public class Arrival implements Parcelable {All the right stuff in here this class compiles and acts fine And I'm trying to write them into a `Parcel' with: @Override public void writeToParcel(Parcel dest, int flags) I completely don't understand this error message. Parcelable is an interface (not a class) so you can't extend it. Anyone have any ideas? UPDATE: I'm having basically the same problem when putting an ArrayList of Parcelables into an Intent:Intent i = new Intent();i.putParcelableArrayListExtra("locations", (ArrayList< Location> ) locations);Yields: The method putParcelableArrayListExtra(String, ArrayList< ? extends Parcelable >) in the type Intent is not applicable for the arguments (String, ArrayList< Location >)This may be because Location was the class I was working on above (that wraps the Arrivals), but I don't think so.

View 2 Replies View Related

Android :: Total Control Remote Edition (IR Remote) Video

Jul 26, 2010

added a quick demo video of our upcoming Android Infrared (IR) Remote.Initially it will support a full IR dbase of 300,000+ IR codes, IR learner for any code not in the dbase, Pre-Built GUI so it is simple to setup. Will add rs232, relays, and other tcp options also after initial release.

View 5 Replies View Related

Android :: Looking For An App To Remote To Desktop For Remote Meeting

Aug 1, 2010

Looking for an App to remote to my desktop.I am trying to see if I can access magicjack on my desktop and make true voip calls.

View 2 Replies View Related

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 View Related

Android :: How To Interface With Google Calendar?

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

Android :: Torrent With Nicer Interface?

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

Android :: Access Wi-fi And UMTS Interface

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

Android :: Interface Plugin - XML For Layout?

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

Android :: Need App To Interface With Sharepoint Sites

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

Android :: Radio Interface Stats

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

Android :: Modifying The User Interface

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

Android :: Add Menu Option To SMS Interface?

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

Android :: HTTP Interface For Application?

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

Android :: Looping Through Interface Elements?

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

Android :: Add JavaScript Interface To A Browser?

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

HTC Hero :: Stock Android Interface In VillainROM 12?

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

Android :: Is IPv6 Over Wifi Interface Supported In SDK?

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

Android :: How To Access / Call IBinder Interface From ASE?

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

Android :: Finding Direction Using Compass Interface

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

Android :: Way To Get Widget Interface For NBA Game Schedule?

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

Android :: Expose Service Interface To Other Application

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

Android :: Change User Interface Of Droid?

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

Android :: Instant Dictionary Translation Interface

Jun 27, 2010

Is there such a thing in Android...? For example, I'm writing an email and would like to lookup a word, but don't want to switch to the other app, is there an app which can invoke the dictionary within another app...?

View 3 Replies View Related

Android :: Can I Use Ipod Car Charger With USB Interface For Incredible

Jun 20, 2010

I have a car charger with a USB interface that I used for my ipod. Should I be able to use this with my Incredible along with HTC cable or do i have to buy a charger specific to my phone?

View 4 Replies View Related

Android :: Tutorial To Use Opengl Interface In Droid Ndk?

Mar 22, 2010

If i wanna use the opengl interface in android ndk, then will it be possible to show
me a simple tutorial to let me master the android ndk?
i just wanna know how to operate in android ndk first.

View 1 Replies View Related

Android :: Control/interface Through USB In WinForm Application?

Aug 30, 2010

Would it be possible to control/interface with an Android phone through USB in a WinForm application? Is there any library for that, without using any original Android tool (ADB, fastboot)?

View 1 Replies View Related

Android :: Share Service Interface With Other APKs?

Sep 7, 2010

I am trying to create a service that will use an AIDL-generated interface. How can I make the interface available to applications in other APKs?

View 1 Replies View Related







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