I'm not sure what Fence is, but if you want to try and access Java constants in 
JS, you might try using JNI.jsm. We ship a really limited version that won't do 
enough for you, but there's a pretty nice version at:

https://github.com/mozilla-services/product-announcements-test-addon/blob/master/jni.jsm

that we've been looking to include in Fennec (bug 918309). With it you can do 
something like (I'm writing this out of my head, so it may be very wrong):

  let Secure = JNI.LoadClass(jenv, "android.provider.Settings.Secure", {
    static_fields: [
      { name: "ANDROID_ID", sig: "I" }
    ],
  });

and then just use Secure.ANDROID_ID in your code.

That help?

- Wes

----- Original Message -----
From: "Benson Chen" <[email protected]>
To: [email protected]
Sent: Tuesday, May 20, 2014 7:21:20 AM
Subject: JS return android ID

Hi All 

I want to add one feature for Fence, which use JS to return 
Settings.Secure.ANDROID_ID . 
Should I develop one Add on or add one module in Fence? Can anyone give some 
hits to me? 

Thanks 
Benson 

_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to