You use the Native Development Kit (NDK):

http://developer.android.com/tools/sdk/ndk/index.html

Also, please do not hardwire /sdcard as a path, as that may not work
on all devices. Please use appropriate methods on the Environment
class to find a place to write to on external storage.

On Mon, Jul 16, 2012 at 10:35 PM, Melissa Silverio
<[email protected]> wrote:
>
> I'm trying to implement the use of a Java native library called "JNetpCap"
> which works with the handling of network packets.
>
> I installed the libjnetpcap.so and the jnetpcap.jar in my application. Also
> I ran the application as root.
>
>
> After making the capturing of the packets with "tcpdump" and saving it to a
> "output.pcap" file, i tried to use to manipulate the packets jnetpcap ..
> This is the code i used:
>
> end = new ArrayList packets ArrayList ();
> Pcap.openOffline pcap packet = ("/ sdcard / output.pcap", errbuf);
>
> JPacketHandler handler = new JPacketHandler () {
>
> / / Defining the action That Will Be Performed Each time a packet is
> / / Read for the file.
> / / @ Override
> public void nextPacket (JPacket packet, String user) {
> packets.add (packet);
> }
> packet.dispatch (-1, handler, null);
> packet.close ();
>
> and here are the errors it returns:
>
> android.os.Looper.loop (Looper.java: 123)
> android.os.Handler.dispatchMessage (Handler.java: 99)
> jnetpcap.Pcap.dispatch (Unknown Source)
> ....
>
> What are the steps for using Java native libraries in Android?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in DC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to