native http request

132 views
Skip to first unread message

extrapedestrian

unread,
Feb 17, 2010, 7:47:31 AM2/17/10
to android-ndk
is there a way I could access network from native c code?
if not, any idea on calling Java function from C to do it for me?

David Turner

unread,
Feb 18, 2010, 5:43:26 PM2/18/10
to andro...@googlegroups.com
You can use the standard BSD socket interface functions (e.g. socket(), bind(), connect(), listen(), etc...).
Of course, you will need to ask for the INTERNET_ACCESS permission in your application manifest for 
this to work properly, or you'll get permission/access denied errors.

On Wed, Feb 17, 2010 at 4:47 AM, extrapedestrian <extra.pe...@gmail.com> wrote:
is there a way I could access network from native c code?
if not, any idea on calling Java function from C to do it for me?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


Peter.Liu

unread,
Feb 23, 2010, 2:32:50 AM2/23/10
to android-ndk
Your title is "native http request ".
You can try to use libcurl that can built under android.

On Feb 19, 6:43 am, David Turner <di...@android.com> wrote:
> You can use the standard BSD socket interface functions (e.g. socket(),
> bind(), connect(), listen(), etc...).
> Of course, you will need to ask for the INTERNET_ACCESS permission in your
> application manifest for
> this to work properly, or you'll get permission/access denied errors.
>

> On Wed, Feb 17, 2010 at 4:47 AM, extrapedestrian <extra.pedestr...@gmail.com


>
> > wrote:
> > is there a way I could access network from native c code?
> > if not, any idea on calling Java function from C to do it for me?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to andro...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages