How to obtain the device ANDROID_ID

395 views
Skip to first unread message

AlexD

unread,
Oct 16, 2012, 4:25:26 AM10/16/12
to andro...@googlegroups.com
Hi

Can anyone tell me if it is possible to obtain the ANDROID_ID device identifier using the Necessitas framework?

I have not been able to find any mention of it in relation to Android on Qt so far.

Many thanks

Alex

Ray Chan

unread,
Oct 16, 2012, 8:42:45 PM10/16/12
to andro...@googlegroups.com
Hi Alex,
   I didn't get ANDROID_ID in my Qt-Android project.  Maybe this way works :  make a java class and get ANDROID_ID in this java class,  QT can then use JNI to retrieve this ANDROID_ID.

Ray

在 2012年10月16日星期二UTC+8下午4时25分27秒,AlexD写道:

AlexD

unread,
Oct 20, 2012, 11:48:00 AM10/20/12
to andro...@googlegroups.com
OK, thanks for the suggestion.

Do you know if it is possible to do what you suggest using JNI and include both the Qt app and Java using JNI within the same APK package that could be submitted to the Google Play store?

I may be able to work around the issue of not being able to easily access the ANDROID_ID from Qt by using the external device IP, but it would be nice to know if it is possible.

Thanks

Enrico Miglino

unread,
Oct 20, 2012, 11:55:28 AM10/20/12
to andro...@googlegroups.com
I think yes, but frankly I have not sufficient experience in JNI to give you a right answer.

Ray Chan

unread,
Oct 21, 2012, 10:35:39 PM10/21/12
to andro...@googlegroups.com
Yes, AlexD,
     The way works. 
      I'm working on a Educational APP in which I combined Qt and Java codes from other SDKs. 
      JNI is used in my app to retrieve some results from a intent call. I can't find the way of calling C++ during JNI Java code, so I just got the result through calling JNI in my Qt code.

Ray

在 2012年10月20日星期六UTC+8下午11时48分00秒,AlexD写道:

Flavio Portela

unread,
Oct 25, 2012, 1:13:26 PM10/25/12
to andro...@googlegroups.com
Hi Ray Chan, if possible discuss how managed to make?
Reply all
Reply to author
Forward
0 new messages