Android :: Remotely Call Methods Through AIDL

Jul 21, 2010

I am curious whether the AIDL only serves for inter-process communication between several Android apps on the same device, or AIDL provides much wider functionality. Let's say I have a Java application running on some server, is it possible to remotely call methods on that server through AIDL from an Android phone?If yes, do I need some extra libraries on the server-side Java application?

Android :: Remotely call methods through AIDL


General :: Bluetooth Stack AIDL Reflection Methods?

Feb 17, 2013

I work at a small company that fields autonomous android devices which programmatically connect to bluetooth telemetry devices. These devices require pins, so we need to automatically create a pairing in order to connect to the bluetooth devices. We DO have root access.

Since the new Bluetooth Stack in Android 4.2, I have been unable to use this common AIDL bluetooth reflection method in our private utility app:

Code:
public IBluetooth getIBluetooth() {
IBluetooth ibt = null;
try {
Class c2 = Class.forName("android.os.ServiceManager");
Method m2 = c2.getDeclaredMethod("getService",String.class);
IBinder b = (IBinder) m2.invoke(null, "bluetooth");

[code]...

The issue about this strategy no longer working is documented here. I previously used the setPin method as well as the createBond method from this Interface, and now I cannot.

Is there anyway to manually create a bluetooth pair profile under Android 4.2? Is there a database file where the profiles are stored that we can use root and sqlite3 to access?

View 1 Replies View Related

General :: Methods For Streaming Video From PC Remotely?

Dec 31, 2013

Local wifi streaming. I am looking to be able to watch something stored on my pc with my N4 away from home via mobile network. I have an unthrottled data plan, so nothing is overkill.

View 7 Replies View Related

Android :: Lot Of Unused Code Is Generated When Aidl Tool Is Run Againt A .aidl File.

Jul 16, 2009

This is my aidl file.

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

View 3 Replies View Related

Android :: Aidl Remote Service Call Namespace

May 16, 2009

I didn't find a sufficient answer to my problem in any posts, if there already is one, please excuse and point me to it, thanks. I made 2 projects. project 1 hast an activity that binds to a service from project 2 on a button click (all just for testing).

How can I make project 1 know (import) my TestInterface (from TestInterface.aidl out of project 2) for usage in: "TestInterface mService = (TestInterface) TestInterface.Stub.asInterface(service);"

without adding project 2 to the build path, because if I'd have an installed service without the project code, I couldn't do it this way, too...?? I read in one thread that TestInterface.aidl should just be added to project 1, too, but if I do this, in DDMS enforceInterface() complains and seems to just see/use the interface from project 1 and it doesn't work.

2. issue:...............

View 9 Replies View Related

Android :: How To Call Java Methods From C++ In JNI?

Oct 10, 2010

So I'm writing an Android app which uses a large c++ library. I have everything working so that the java app can call the c++ delegation methods, but I'm finding myself wishing I could log messages from c++ to the Android log. This is easy from java, but I'm at a loss as to how to call a java method from c++. My searches found methods for opening a jvm from c++, which is not at all what I want to do. Ideally, I'd like to pass a log method pointer to c++, which could then be used whenever I wanted. Of course, java doesn't support method pointers.

View 2 Replies View Related

Android :: Want Call Methods Of A Activity From Service

Apr 27, 2009

Is it possible to call methods of a Activity from service. I am running a thread from a service and i listening to some external event from that thread. I am not able to call methods from that thread. Is there any way to call methods from a thread.

View 3 Replies View Related

Android : How Can I Call Service Methods From BroadcastReceiver?

Dec 7, 2009

I made two applications. One for an activity receiving user input, the other for a background service. In the service package, I create two files (startSensorBroadReceiver.java, remoteService.java). StartSensorBroadReceiver will receiver an intent from activity application and call method inside of the service. There is no erron in the codes but I can not excute what is want. I meet a message like this "The application ServiceExample has stopped unexpectedly. Please try again." could you let me know. what is wrong? and how I can call service methods from broadcastReceiver?

View 5 Replies View Related

Android :: Service Unable To Call Java Class Methods / Way To Fix?

Jun 22, 2010

Hi, custom classes which are part of a framework, so nothing graphical. One of those (singleton) classes is a Logging class which send logs to my server. I noticed that even though I can call the classes methods in my service it actually won't be logging anything... In my specific example it's osmething like : Logger.getInstance().log("Whatever I want to Log"); Obviously the getInstance is a static method so it can be accessed from anywhere within my project right away.. I was wondering though why this method for example isn't getting called ? Also how do I debug a Service ? Btw I am using of IPC from one of my Activities which gets bound to the service and can start/stop the music for example...

View 9 Replies View Related

Android :: Call AsyncTask Methods From Another Class - Service - Callbacks?

Jun 1, 2010

I was wondering if it's possible to call specific methods defined within the AsynTask class from another class and/or service ?

In my specific case I have a Service playing some sounds, but the sound is selected from a List with available sounds...

When a sounds is selected it is downloaded from my home server, this takes some time (not much, let's say around the 3-4 seconds, the sounds/effects aren't big in size)...

So my problem at the moment is that I have a service to play those sounds, and when I select one I wanted to show a progressdialog... The way (if I understood correctly) is to use an AsyncTask, but the only thing the AsyncTask will do is telling my Service to play a specific sound from my server... So there is no "callback" from the service to the Asynctask...

How can I call a running AsyncTask, which sits in another class, and tell him all work is done and thus he can stop showing the ProgressDialog ? Or am I over-engineering it and there are other ways ?

View 2 Replies View Related

Android :: When Do Synchronize Methods Or Use Synchronized Blocks In Methods In Android Game

Mar 14, 2010

I'm looking into writing simple graphics code in Android and I've noticed some synchronized() blocks. What is the reasoning behind this and how do I know when I should be "synchronizing" my code?

View 1 Replies View Related

Android :: Android Remote Service Doesn't Call Service Methods

May 28, 2010

I'm developing a GPS tracking software on android. I need IPC to control the service from different activities. So I decide to develop a remote service with AIDL.This wasn't a big problem but now it's always running into the methods of the interface and not into those of my service class. Maybe someone could help me?If i now try to call a method from an activity for example start(trackId) nothing happens. The binding is OK. When debugging it always runs into the startTracking() in the generated ITrackingServiceRemote.java file and not into my TrackingService class. Where is the problem? I can't find anything wrong.

View 1 Replies View Related

Android :: Call Java Methods From One Java Class To Another In Android?

Nov 3, 2010

i hav two classes...both classes are extends activity.. i need call other class method on main class on android development..its urgent..please.. i done something like subclass sub = new subclass()...its not work..

package org.me.intent_testing;
import android.app.Activity;
import android.os.Bundle;
import android.widget.;
import android.view.;
import android.content.Intent;...........

View 2 Replies View Related

Android :: Call Java Class Methods To Other Java Class File On Android

Nov 3, 2010

i hav two classes...both classes are extends activity.. i need call other class method on main class on android development..its urgent..please.. i done something like subclass sub = new subclass()...its not work..
In 1st activity class

package org.me.intent_testing;
import android.app.Activity; import android.os.Bundle; import android.widget.; import android.view.; import android.content.Intent;

/** * * @author pavankumar */

public class FirstActivity extends Activity {................

View 1 Replies View Related

Android :: Errors When Use The Aidl

Jun 17, 2009

I create an aidl file named mp3PlayerInterface.aidl. Then I try to use the aidl tool to parsing the aidl-file to java-file. The error"mp3PlayerInterface should be declared in a file called com mp3playermp3PlayerI nterface.aidl."happened no matter use the aidl-command derectly or eclipse.

View 2 Replies View Related

Android : Can't Use Parcel In Aidl / Way To Fix?

Aug 20, 2009

I sent a intent to call a service interface which returns a parcelable object.

but get errors...

View 2 Replies View Related

Android :: .aidl And R.java STILL Not Being Generated

Aug 12, 2010

I downgraded to Eclipse 3.5, and the following still doesn't happen when I build a project in Eclipse:

1. .aidl files don't get processed (at all).

2. R.java isn't generated.

Used to work. What the heck?

View 3 Replies View Related

Android :: How To Build The Aidl Tool?

Sep 29, 2009

I get the android source. How can I build the aidl too that is part of android (the one which generates java file from an aidl file)?

View 2 Replies View Related

Android :: AIDL Tool Did Not Download

Oct 14, 2010

I'm unable to find the AIDL tool in my OSX install. My tools directory does not have AIDL, but it has everything else (Adb, android, ddms, etc). I've tried opening the SDK and AVD manager and reinstalling the Android SDK Tools Rev 7, no luck. Any idea on how I can get a hold of the tool? Is there a separate download I can use?

View 3 Replies View Related

Android :: When To Use An Aidl Based Service?

Jul 26, 2010

Under what circumstances would using AIDL to define a service interface be the correct decision (rather than just creating an extension to the service class)?

View 2 Replies View Related

Android :: Aidl's - Service And Multiple Packages

Jul 20, 2010

I've created a service that is meant to communicated to an activity using aidl's and callback functions. I got it working just fine with my test activity in the same package. But I was wanting to expose this service to different activities running in a completely different .apk file. Is it possible to accomplish this? What does the separate package need to bind to my service and register the callbacks? Or am I going about this completely wrong and should I try a different method for conveying information back and forth between two packages.

View 3 Replies View Related

Android :: How To Explicitly Invoke AIDL Compiler?

Jul 26, 2010

I'm using Eclipse with ADT to develop my project, but for some reason my AIDL files are not getting compiled into Java files. Is there a way to explicitly invoked the conversion of my AIDL files?

View 2 Replies View Related

Android :: AIDL In Multiple Projects In Eclipse

Mar 16, 2010

I have problems with the following: I want to create to applications. One with a Android service and one with a Activity that will use functions on the Service. Before I splitted this in to applications I got everything working in one application. I can call functions (that are definned in the aidl - file) on the service without problems.

Now the problems coms. I splitted the application into two parts, a Service application and Gui application. The bindins to the service (in the gui application) works and I see that the service is getting created. Then in the onServiceConnected function of the ServiceConnection class I created the following:

mService = IMyService.Stub.asInterface(service);
And this gives me the following exception:
03-16 13:53:05.549: ERROR/AndroidRuntime(881): java.lang.NoClassDefFoundError: MyPackage.IMyService$Stub

It looks like he can't find the Stub class in IMyService. But the Stub is part of the java file generated out of the aidl-file. Why I get this exception or how I can resolve this?

View 9 Replies View Related

Android :: Can AIDL Really Support The Map - The Data Type

Aug 10, 2010

I am curious about the data types that AIDL can support.

The document ( http://developer.android.com/guide/developing/tools/aidl.html ) says, AIDL can support String, List, Map, etc. But to me, the Map seems that it is not the member of them.

Here is my code.......................

View 6 Replies View Related

Android :: Deploying AIDL That Imports Classes

Nov 12, 2010

I have to make other developers to be able to connect to my service, but my AIDL imports my classes. I don't want to give them the source code of the service, just the APK and some kind of a stub file (java, jar?). How can I give them something - "the glue" - which makes them to use the classes in my AIDL and using the service akp without getting the sources of the service?

View 1 Replies View Related

Android :: Access A AIDL Service From Different Packages?

Jun 18, 2010

I have created a service which exposes few AIDL defined interfaces. I want to access this Service from an application with different package. I have no clue how to achieve this. I want to see an example on this.

Unfortunately all examples I see has client application in the Service package it self:(

Could you please share some sample/example code on this?

View 7 Replies View Related

Android :: AIDL Gen Files Causing Warnings?

Feb 22, 2010

I have created some aidl files for IPC in my Android project.

They compile and run file however in the generated .java files I am getting warnings of un-used imports as follows:

The import android.os.Binder is never used EngineInterface.java/gen/com//phone/engine line 10 Java Problem

Now I presume that they are there for a reason and since the generated file is not supposed to be modified that adding a suppress warning is not a good idea?

So how do I get rid of the warnings? I know they can be left and it doesn't affect the running of the project but I would like a clean as possible project so if its at all possible to remove this errors I would like to know how to do it.

View 2 Replies View Related

Android :: How To Generate Blank Aidl File

Nov 17, 2010

This may sound stpid, for some reason I can't find anywhere on Eclipse that lets me generate blank .aidl file. does anyone know how?

View 1 Replies View Related

Android : Want To Add An Aidl File In Droid Framework

Feb 15, 2010

I want to add an aidl file in android framework so i can import it in two applications(one binds remotely to the other).How can i do that?

View 3 Replies View Related

Android :: Remotely Control PC

May 31, 2010

I have a Linux N wireless router, and a desktop with a wifi card running Windows 7 (Home Premium x64). I have a HTC Magic running the 4.2 version of CyanogenMod (Android version 1.6). What I basically, want to do is in the title. I want to have an app that allows me to view my PC screen on my phone. Gmote and similar apps come close, but they are useless as I cannot view my screen. I have looked at a number of "VNC" apps, but for one reason or another it just doesn't work. I have gotten VLC Remote and TunesRemote to work, which means that I am able to connect my phone to the computer, but beside that nothing works. I managed to get TunesRemote to work by opening certain ports in Windows 7. However, I tried to do a similar thing with a number of VNC applications and none of them worked. I have been trying to port forward for the last three years and no matter what I do, it just doesn't work. I am unsure if it is my Windows 7 firewall or the router, but either way nothing seems to be working.

View 34 Replies View Related







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