Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Using QtAndroidBridge
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
İsmail Dönmez  
View profile  
 More options Feb 3 2011, 11:00 am
From: İsmail Dönmez <ism...@namtrac.org>
Date: Thu, 3 Feb 2011 18:00:02 +0200
Local: Thurs, Feb 3 2011 11:00 am
Subject: Using QtAndroidBridge

Hi all;

I am trying to use QtAndroidBridge but QtAndroidBridge::javaVM() always
returns NULL, do I have to do something before calling that function?

Regards,
ismail


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
İsmail Dönmez  
View profile  
 More options Feb 4 2011, 3:25 am
From: İsmail Dönmez <ism...@namtrac.org>
Date: Fri, 4 Feb 2011 10:25:23 +0200
Local: Fri, Feb 4 2011 3:25 am
Subject: Re: Using QtAndroidBridge

Ah looks like BogDan disabled QtAndroidBridge;

commit 696253a4b39e80786bbdb4bb4f3d6391b472804d
Author: BogDan Vatra <bog_dan...@yahoo.com>
Date:   Tue Dec 28 02:56:40 2010 +0800

    Fix compilation with "-reduce-relocations -reduce-exports"

    Remove QtAndroidBridge dependencies. QtAndroidBridge needs to be
rewriten,
    I'll disable it for now.
    Fix a lot of BogDan is an idiot bugs (only sw plugin is fixed).

This is very bad, is there a remedy for this? I need to call some Java
functions from C++ side.

Regards,
ismail


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
провод  
View profile  
 More options Feb 4 2011, 4:40 am
From: провод <marf...@gmail.com>
Date: Fri, 4 Feb 2011 15:40:24 +0600
Local: Fri, Feb 4 2011 4:40 am
Subject: Re: Using QtAndroidBridge
You could add a simple exported function in androidjnimain.cpp to
return a pointer to a JavaVM variable (m_javaVM), as Sergey and I did
in our branch months ago.
You also should be careful about reattaching your thread every time
you need to call a Java method -- BogDan's plugin, as far as I
remember, liked to detach the main() thread on every Qt to Java call.

2011/2/4 İsmail Dönmez <ism...@namtrac.org>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
İsmail Dönmez  
View profile  
 More options Feb 4 2011, 4:41 am
From: İsmail Dönmez <ism...@namtrac.org>
Date: Fri, 4 Feb 2011 11:41:44 +0200
Local: Fri, Feb 4 2011 4:41 am
Subject: Re: Using QtAndroidBridge

Hmmm that makes sense, I'll try that. Thanks!

Regards,
ismail


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BogDan  
View profile  
 More options Feb 6 2011, 10:22 pm
From: BogDan <taipanroma...@gmail.com>
Date: Sun, 6 Feb 2011 19:22:34 -0800 (PST)
Local: Sun, Feb 6 2011 10:22 pm
Subject: Re: Using QtAndroidBridge
Hi,

That is a bad idea, libQtAndroid_xx are PLUGINS, not libraries.
Currently they are loaded as libraries because I need to set some c++
<=> java connections, but is possible that in the future that this
plugins will be loaded directly by your application (QtCore module) as
plugins. If you are using them as libraries and more your application
require them to run, you'll have big problems.

Cheers,
BogDan.

On Feb 4, 9:40 am, провод <marf...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BogDan  
View profile  
 More options Feb 6 2011, 10:25 pm
From: BogDan <taipanroma...@gmail.com>
Date: Sun, 6 Feb 2011 19:25:31 -0800 (PST)
Local: Sun, Feb 6 2011 10:25 pm
Subject: Re: Using QtAndroidBridge
Hi İsmail,

I disabled that library because it was a required library. I'm not
against of having an android specific library, I'm against to make
that library a required library for all apps.

For you, I see the following choices :
- export JavaVM and JNIEnv from qtmain_android.cpp (check QT_DIR/src/
android/cpp/). This file is compiled into your android application,
and you can do anything you want with it.
- create your own library, and be sure you export "jint JNICALL
JNI_OnLoad(JavaVM* vm, void* /*reserved*/) " method.
- create a good for all library, but be aware, you MUST maintain that
library for years, and you MUST be sure you NEVER break the API/ABI,
one mistake and all apps which are using it will stop working.

Cheers,
BogDan.

On Feb 4, 8:25 am, İsmail Dönmez <ism...@namtrac.org> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
İsmail Dönmez  
View profile  
 More options Feb 7 2011, 6:21 am
From: İsmail Dönmez <ism...@namtrac.org>
Date: Mon, 7 Feb 2011 13:21:50 +0200
Local: Mon, Feb 7 2011 6:21 am
Subject: Re: Using QtAndroidBridge

This worked fine, thanks!

ismail


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josua Dietze  
View profile  
 More options Apr 10 2011, 8:02 am
From: Josua Dietze <alcesalce...@googlemail.com>
Date: Sun, 10 Apr 2011 13:02:58 +0100
Local: Sun, Apr 10 2011 8:02 am
Subject: Re: Using QtAndroidBridge
Am 07.02.2011 04:25, schrieb BogDan:

> For you, I see the following choices :
> - export JavaVM and JNIEnv from qtmain_android.cpp (check QT_DIR/src/
> android/cpp/). This file is compiled into your android application,
> and you can do anything you want with it.

Forgive my noobness, but what would "exporting" mean specifically in this case?

I'm just scratching my head over the same issue (calling Java from native Qt),
and experimenting with a global "m_javaVM" got me nowhere - plus it's not
recommended as I have learned.

Thanks,
Josh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »