Android :: Use SWIG With Droid NDK - Weak Global References
May 11, 2010
I'm currently working on Android NDK, porting my libs, and I'm using SWIG (Simplified Wrapper and Interface Generator) that is a great tool to generate JNI code around my C/C++ headers for Java.
However, there is a big issue using it on Android, 'cause of incomplete JNI support : 'Weak Global References' are missing. Unfortunatly, SWIG is waiting for a full compatible Oracle/Sun JVM, and use this feature with its 'director' option (for proxy class creation).
For now, I comment each time, in a (kind of) bad way, the use of weak global references in my generated C/C++ wrapper files (4 lines in my case). I think it is really a shame that we can't use (one of) the best wrapper with Android NDK just for one missing feature.
I read that Google Team will add it in future release : "NewWeakGlobalRef and DeleteWeakGlobalRef are not implemented. The VM supports weak references, but not JNI "weak global" references. These will be supported in a future release." (http://android.git.kernel.org/?p=platform/ dalvik.git;a=blob_plain;f=docs/jni-tips.html;hb=HEAD)
So my question is, does anybody know when 'Weak Global References' will appear in Android NDK ?
View 4 Replies
Aug 11, 2010
There's a bug in my network code so that when the server's not available the Android client tries over and over to connect. On 1.5 (emulator) this results, within a minute, in an "Excessive JNI global references" error where the leaked object is a small (20 byte) boolean array. The same code on emulated 2.1 runs for as long as my patience lasts. Is there any possibility the leak is in my code and not an Android bug that's been fixed since 1.5?
View 2 Replies
View Related
Nov 17, 2010
I would like to use a .jar file generated by SWIG in an Android application. What is the best way to deploy all of the underlying dll's with the Android application?
In a desktop environment, my PATH variable includes the folder containing these dll's.
View 1 Replies
View Related
Nov 24, 2010
I am working on a system on which currently Linux kernel and microwindows windowing system is running. Code of current Linux system drivers is available to me. I want to port android on it, just as a hobby project.
can you please tell me what all understanding of linux-kernel is required to port it?
Please give me references (Books, Tutorials) to build-up understandings.
View 3 Replies
View Related
Nov 13, 2009
Are you guys experiencing any issues with the WIFI signal on the droid? I am not getting any signal in areas of my house where my iPhone and Droid Eris (exchanged Eris for Droid) had no problems.
View 8 Replies
View Related
Apr 10, 2010
First of all, I'm a very happy Eris user. I've had the phone since January and have just decided to "put up with" the fact the vibration is too weak. But its starting to get rediculous. I miss calls, texts and emails constantly with this phone! And just yesterday, my Boss actually made a comment to me about it (something like "you need to start answering you damn phone!"). I had a BB for 5 years leading up to my getting the Eris in January and rarely missed a call or message.
I have Smart Vibrate loaded and have programmed distinct patterns, but it's not helping. If somebody doesn't have a good idea or remedy for this, I might be forced to go back to BB.
I've read posts like this before and everybody just seems to deal with this, but please tell me somebody has a trick they can share
View 18 Replies
View Related
Nov 17, 2009
Wondering if there are any creative ideas/hacks/apps that can make the vibration on the Eris even a little more noticeable? I think it's fair to say this is a VERY weak vibration feature, and a lot of folks have a hard time feeling it vibrate when a call or notification comes in.
I'm assuming it's a hardware thing, but thought maybe there are some creative workarounds.
I really like most everything else about this phone, but I cannot feel it at all when it's set to vibrate, so I'll definitely be missing calls & texts when carrying it around on my belt (or even pocket) as it's usually in vibrate mode then.
View 11 Replies
View Related
Dec 14, 2009
Anyone figured out a solution to the really weak vibrate on the Eris yet?
View 16 Replies
View Related
Jul 17, 2010
Ok, now I've had time to listen to music on the Droid X and I ain't liking it. I'm comparing it to the iphone and it's so weak in comparison. Is it just me or do others feel the same way?
View 37 Replies
View Related
Nov 21, 2009
Anyone experience weak bluetooth connectivity with the Eris?My stereo bluetooth headset gets choppy even if it's a few feet from my phone.I don't know if it's the phone's bluetooth signal or the headset.If the phone is in my pocket and I'm walking the shake from my step causes the signal to cut out.I wanna ask others who use stereo bluetooth if they see this.
View 5 Replies
View Related
Jun 20, 2010
Let's say I want all the TextView instances in my app to have textColor="#ffffff". Is there a way to set that in one place instead of setting it for each TextView?
View 3 Replies
View Related
May 4, 2010
I want to set a global uncaught exception handler for all the threads in my Android application. So, in my Application subclass I set an implementation of Thread.UncaughtExceptionHandler as default handler for uncaught exceptions...
View 2 Replies
View Related
Nov 19, 2009
New to Eris and have set up Wifi to connect to home router (Verizon FIOS Actiontec). Successfully connected (accepted WEP) but get very weak signal and then lose connection. I've turned off "Mobile Network" but still have this problem. I am one room away from router and receive full signal on iMac and printer but only a dot under the Wifi symbol on the Eris. Exchanged a Motorola Droid (which received and held full signal -- as did my prior iPhone)) for Eris. VZW tech support clueless and immediately sent me to HTC support. While they tried (had some not very good explanations -- battery not pushing enough power) still nothing working. Any advice/help would be greatly appreciated -- this is the only downside right now.
View 3 Replies
View Related
Oct 6, 2010
since the update i seem to have a much weaker signal and calls are getting dropped. quite often it seems that i bounce between 3g and 1x. anyone else?
View 7 Replies
View Related
Nov 26, 2010
After much deliberation, hopefully next Friday I will be ordering the Droid 2 Global. This will be my first SmartPhone and Android device. For those who have the White model, does it stain easily? Would the hard clear case Verizon sells cause any friction on the painted surface, particularly the corners, to wear or chip?
View 1 Replies
View Related
Feb 8, 2010
Duplicate: static options menu
I know how to create a menu in my application with an icon and text on each "button" of the menu, but this menu is only visible on the activity where I created it...
I would like to know if it is possible to create a global menu which would be accessible from all activities?
View 1 Replies
View Related
Oct 20, 2010
I was wondering if it is possible to intercept keyboard input on a global level on Android. For example a user types in text into an edittext (does not matter which application) I would like to access said text to check for certain words. Is this even possible with Android's security model (yes I am aware this kind of feature could be used for various wrong things too).
View 1 Replies
View Related
Apr 20, 2010
I have a static Preferences class that hold some application preferences and stuff like that. Is it ok to store reference to ApplicationContext there? I need that reference so i can get cache folder and stuff like that in classes that don't inherit Activity.
View 1 Replies
View Related
Nov 5, 2010
I wonder if it's possible to reference a XML string value in another XML String resource.But in case of an concated resource string, I found no solution yet,I would like to keep the string references in the string.xml file itself.
View 1 Replies
View Related
Jun 25, 2010
I'm writing some stuff in java and i ran into some problems lately. cut short, i need to compare an object i created to another instance of this very class i instantiazed before with different data.
looks like this:
CODE:........
with a class a:
CODE:..........
The problem is, that i end up finding out that the values from newA are always equal to those from oldA. so i guess sth went wrong with passing the references of the objects in the last line of the loop...i thought java always passes references of objects unless an explicit copy() is called? if this does matter: this code is running on android - don't know if the dalvik vm messes aroung with this...
View 5 Replies
View Related
Jul 21, 2010
I would like to add an HTML resource to my Android project with references to other resources (mainly drawables).
Where should I put it and how do I reference other resources from it?
Is there a particular way to pass the HTML resource to a WebView?
View 2 Replies
View Related
Jul 27, 2010
I've read that it is a mistake and a source of memory leaks in Android application to keep a long-lived references to a Context.
But I don't understand if it is ok to create an class that looks like this one:
CODE:..........
And call it from an Activity:
CODE:.................
View 2 Replies
View Related
Nov 12, 2010
Is it just me or does the D2 Global run warm? I'm guessing that's due to faster processor?
View 6 Replies
View Related
Oct 18, 2010
Since the Droid 2 Global is coming out soon. I think a Droid X Global (w/ the 1.2GHz CPU) will be the real killer here. Anyone thinks so, too? BTW, I have a Droid X and my daughter have the D2 (R2D2). I like the DX compared to the D2 and my upgrade plan is to get a global Droid phone. Hopefully, a Droid X Global is in the works.
View 4 Replies
View Related
Nov 21, 2009
I think I figured out why sometimes my Droid stays on for 1.5 days and sometimes after 6 hour of just being idle the battery is drained.
When wifi is turned on an connected to a network, the cellular signal is way low and it just drains the battery.
View 23 Replies
View Related
Oct 27, 2010
I'm in the middle of implementing themes for my application right now, and everything's been going really smooth until as of late. I've been using the android:background="?thin_border" tag to provide a background for linearlayouts with items that I want visually grouped together. The problem I'm running into is when I try to use this tag in an xml with a custom class as one of the elements, and try to add this background tag.
I've got an xml file that looks generally like so:
CODE:.................
and the custom class has two constructors:
CODE:........
with some other functions that store values, manipulate the data, etc. The custom layout class is only ever called directly in the xml, and the xml is inflated like so:
CODE:...........
The problem I'm running into is that I'm getting these error messages:
CODE:.................
The error seems to be caused by the android:background="?thin_border" tag. If I remove it from the layout, it inflates fine, and the program continues on. As soon as I add it back in, I get these errors and the program stops.
View 2 Replies
View Related
Mar 14, 2010
I need to create paused analog clock. Since I have never done any graphics/drawing before I am customizing Analogue widget defined in the core/java/android/widget.
The problem is when I create the class in my project following are the unresolved references: mContext com.android.internal.R mRight mLeft mTop mBottom
I know the most likely cause is com.android.internal is private and I need to use public but the problem I do not know what the public equivalent is. I have tried substituing it with android.R but that doesn't seem work either.
View 2 Replies
View Related
Dec 8, 2009
I'm working on an application that requires non-serializable objects to be passed between Activities. The following page suggests using a HashMap of WeakReferences to accomplish this:
http://developer.android.com/guide/appendix/faq/framework.html
Is this solution safe? I know Activities are completely destroyed and recreated when the screen orientation changes. Couldn't those weakly referenced objects get GCed in the split second when the screen is rotated, since they wouldn't be referenced elsewhere at that point?
View 3 Replies
View Related
Apr 26, 2010
While researching how to create custom compound views in Android, I have come across this pattern a lot (example comes from the Jteam blog)I mostly understand how this is working, except for the part where inflate() is called. The documentation says that this method returns a View object, but in this example the author does not store the result anywhere. After inflation, how is the new View created fromt eh XML associated with this class? I thought about assigning it to "this", but that seems very wrong.
View 1 Replies
View Related
Nov 16, 2010
It looks like I am going to pull the trigger on a D2G assuming VZ will give me an early upgrade. I have not been able to get much info on the D2G yet so thought I would see if anyone could share their experience so far here. BTW - I am coming from a Storm2 so have high hopes. I will post my experience once I have the phone in a few days.
View 13 Replies
View Related