[android-developers] How to create a native c process from android java program
Hi, I write a jni so file which can be called from the android java program. This so file will use execl to create a native c process. However from adb logcat, it says execl error with Bad address(errno 14) Is it possible to create a native c process from android java program Thanks for any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to control WebView cache
I have a Webview inside my activity. I would like to cache the content for one week (purely to reduce data usage to save user money). After one week, it is considered expired and so the webview should refresh the content from network. If cached content is less than one week old, webview should not use network at all. I know there is a WebSettings.setCacheMode method but can someone please clarify on LOAD_NORMAL and LOAD_DEFAULT? The documentation doesn't say much about those 2 modes. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: WebView loadData and XML Parsing Question
I am trying to show a html string such as sample3 =a href=\www.google.com\Link text/aimg src= http://www.isical.ac.in/~clia/images/google_logo.jpg; webView.loadDataWithBaseURL(www.company.com,sample3 , text/html, utf-8, www.companyfailed.com); When this webview is displayed then i am not able to see the image in the sample3 string. How do i acheive that? On Thu, Feb 19, 2009 at 3:01 PM, forandroid forandr...@gmail.com wrote: I have to display html content which i get from am xml(RSS feed).I am using the loadDataWithBaseURL . But if the the html content contains an image,how do i render the image in the webview as in the html content. webView.loadDataWithBaseURL(www.company.com,descHtmlString, text/ html, utf-8, www.companyfailed.com); On Jan 13, 1:30 pm, Ryan ryankelly...@hotmail.com wrote: I'm guessing it was the first suggestion, not the other two. Actually, they were such simple changes I made both at once. E.G. I used UTF-8, instead of utf-8. And I switched to the loadDataWithBaseURL function. The variable html was always a String so no change there. I'm guessing it's the loadDataWithBaseURL function that did the trick, but I will try both suggestions in isolation just to make sure. I'd rather not use the loadDataWithBaseURL to load local data if I can help it, so I'll continue researching a fix for the loadData function. Thanks for your help. On Jan 12, 10:42 pm, Mark Murphy mmur...@commonsware.com wrote: Ryan wrote: Wow.. thanks Mark, that fixed it! I'm guessing it was the first suggestion, not the other two. Do you know why that works, seems an odd way to get it to work?? It is definitely odd. However, it seems to cure a lot of ills, ills that I presume come from some issues with the implementation of the simpler loadData() method. I need to look at the source for that sometime... -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Official update for G1 Andriod developer phone (ADP) stock firmware
I don't control the various sites that you mentioned, though it's true at this point that having the information out there would indeed be good, given the growing evidence that many developers are eager to find that information. I'll mention it to our web guys in case they're not already reading this. Hoping to make the answers easier to find for other people who might search around, I'll answer your questions here (though the second one would really be more appropriate on the android-platform list as it's not directly related to development with the official SDK). -the 1.0 images aren't currently available either. I expect that they'll be made available at the same time as the 1.1 images (which will allow to switch back and forth between the two). I don't know any specific time frame for this to happen. -the exact source code for the entire 1.0 build is not available, though the android-1.0 tag in the git repositories is a reasonably close approximation of the underlying platform (the differences being essentially cosmetic). That will still be missing the proprietary Google applications that are built on top of the platform, and in addition the proprietary files necessary to run Android on Dream need to be extracted from an existing device. Being able to build and run (even without the Google bits) might be a harder task than it seems. I don't expect that the source code for the 1.1 platform will be available as our primary goal in this area is to switch to a real open-source mode where discussions, design and development happen in the open, and that goal is using all the resources that would otherwise be able to work on a 1.1 code drop. JBQ On Thu, Feb 19, 2009 at 7:10 PM, waters.k...@gmail.com waters.k...@gmail.com wrote: Hi JBQ, You are right, you have answered that question a lot, although I had a some trouble finding posts on it. A solution to everyone's problem might be a web page with some information. A page on http://developer.android.com/ or http://code.google.com/android/ or http://www.android.com/ that would provide the following information would be incredibly helpful. 1. An image of the original firmware release, so that I can easily return to a stable state. 2. What steps are needed to check out the source code for that original stable state (source control revisions/tags/versions - whatever git calls them) so that I can build the above original firmware release myself. It would be really awesome if I could start my code modifications with a stable android tree that I know is already running and working on my device. 3. Essentially the same blurb you posted above, about the next firmware release. It seems like that shouldn't take more then a few minutes of work, and maybe a few weeks of hassling the web guys. When the next release comes up, just add items 1 and 2 for it, and update item 3 for the next release. Thanks, Karl On Feb 19, 8:58 am, Jean-Baptiste Queru j...@android.com wrote: My gripe about your post is that you didn't search the archives or read the messages of the last few days. I've personally answered question #1 more times than I can remember, so I guess that one more time won't hurt: it's not available yet, we're working on it. I'm not allowed to answer question #2. JBQ On Wed, Feb 18, 2009 at 6:10 PM, shimsim shim@gmail.com wrote: This is my first post and i am new to Android so excuse my ignorance if this is well documented and common knowledge. I have a stock ADP, firmware 1.0, no updates no mods and of course i want to get the latest features such as voice control, latitude etc, and so begins the fun Why is there nothing official that can be easily found which states what is going on for people that own the ADP? I must have read dozens of articles showing update procedures and claiming to have leaked OFFICIAL developer updates and only recently did i find 2 thread that eventually end with something stating there is NO official update for developer phones yet. I have 2 gripes about this: 1. Why no official and clear statement from the development team to clarify this before people start scrambling desperately to install leaked versions that are false? (i know i almost did) 2. Why as a developer do i have to wait for features that are already available to end users? Am i missing something or is that the wrong way around As i said above, excuse me if i have missed the obvious flashing sign on the front page of the android website that clarifies all this but from what i have read on other sites i'm not the only person who has these questions and cant find the answers. thanks! -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post
[android-developers] Re: Market Copy Protection options
You don't even need adb on an unmodded 'phone; http://groups.google.com/group/android-platform/browse_thread/thread/be1f7d3d376e4d11/96c991164328afe4#96c991164328afe4 Dan Pou wrote: I believe it is possible to extract packages from the phone with the adb, without having modded the phone. Perhaps there are extra steps taken to prevent this, or apps will not function when removed (encryption?). On Thu, Feb 19, 2009 at 6:12 PM, Stoyan Damov stoyan.da...@gmail.com mailto:stoyan.da...@gmail.com wrote: Can someone explain these publishing options to me? Off (Application can be copied from the device) On (Helps prevent copying of this application from the device. Increases the amount of memory required by users to install the application) AFAIK apps are *always* installed in device's internal memory. Right? Hence, apps can't be copied (with stock G1 w/o any mods). Right? Thanks! Stoyan -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get a region which is not a standard rect area
Another solution is to use int Bitmap.getPixelhttp://code.google.com/android/reference/android/graphics/Bitmap.html#getPixel(int, int)(int x, int y), if it runs normal, then the point(x, y) is in its region, otherwise, if an exception IllegalArgumentExceptionhttp://code.google.com/android/reference/java/lang/IllegalArgumentException.htmlhappens, that means the point is out of the bitmap's region. In this way, the left-bottom region is right, but the other three angle (top-left, top-right, right-bottom) is still the outer rect of the rotated bitmap. Please help! BR, -David On Fri, Feb 20, 2009 at 11:22 AM, David Hu vistoda...@gmail.com wrote: Thanks for your reply, Mike. I've tried your method, seems still not work yet. The second parameter of Region.setPath (clip) can't be null. If we use null, there will be an exception happen. So I've tried to use the region I've just constructed or the original rect region, the area is still the ourter standard rect area, not the inclined rect which rotated from a standard rect. Here is my code tip and possible result: //Calculate region top = 150; bottom = top + bmp.getHeight(); //bmp is a bitmap instance left = 200; right = left + bmp.getWidth(); Path p = new Path(); p.addRect(left, top, right, bottom, Path.Direction.CCW); // use Matrix to rotate 30 degrees Matrix mtx = new Matrix(); mtx.setRotate(30); p.transform(mtx); Region rgn = new Region(); (1) //- The application will crash here with an exception here rgn.setPath(p, null); (2) //- The region is the rect area which encircle the rotated rect, not the rotated rect itself rgn.setPath(p, rgn); (3) //- The region is the rect area which encircle the rotated rect, not the rotated rect itself Region clipRgn = new Region(top, bottom, left, right); mRgn2.setPath(p, clipRgn); BTW, I searched in android source code and www.google.com, can't find any usage of this API: public boolean setPath(Pathhttp://code.google.com/android/reference/android/graphics/Path.htmlpath, Regionhttp://code.google.com/android/reference/android/graphics/Region.htmlclip) So now, my question is which clip region should I pass or any other way in order to attain my aim? Hope I've made my aim clearly. BR, -David On Thu, Feb 19, 2009 at 11:27 PM, Mike Reed r...@google.com wrote: You could possibly un-rotate your touch-point by 30 degrees, and then just use the rectangle. However, you can make complex regions by first constructing a Path, and then calling region.setPath(...), which converts the path into a region. Below is pseudo sample code: Path p = new Path(); p.addRect(rect);// this is your rect p.transform(matrix); // construct a matrix and then rotate as you wish region.setPath(p, null); On Thu, Feb 19, 2009 at 5:01 AM, vistoda...@gmail.com wrote: I want to judge whether the touch point(x, y) is in a region or not, the region is from a stardard rect by rotating specified degrees, from example, rotate 30 degrees. There is a class named Region in Android, but as I researched, it just supports standard rect, is there any other way to judge whether a point is in an acclivitous rect? How to do it? Br, -David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: INSTALL_FAILED_UPDATE_INCOMPATIBLE
Is there a simple way to do it? I installed an apk using OIFile Manager Later i uninstalled, using setting/manage application Now i am not able to install the application. Even though i uninstalled the apllication i can still find the entry in package.xml On Feb 1, 11:22 am, bwilliam...@gmail.com bwilliam...@gmail.com wrote: I just figured out how to fix this, but it requires root access. Pull /data/system/packages.xml Find the entry for your package and comment it out. shell back in and chmod packages.xml to be world-writeable Push packages.xml back into the phone. Restart the phone. You can then install the app with the different signature. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Touch *extremely* expensive performance-wise
Thank you both! With those pointers, I was able to figure out and implement working versions of both techniques. Now I just have to decide which one I like better and finish writing my game... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] App Store Listings (Pictures?)
Are we not able to upload pictures of the app? I couldn't find any place to do this. If not, how is the user supposed to know anything about the app before buying? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] UK developers listing currency?
Can anyone tell me if UK developers are still being forced to list in a currency that the only paying customers of Market aren't used to dealing with (i.e. British pounds), or can we list in the currency our potential customers use? Al. -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] develop application without a data plan?
I just got my g1, I only need to develop an offline application, however, It wouldn't go further without signing into google account which requires a data plan. Please advise. thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---