[android-developers] Re: Is Android good for this?
Caribbean accentWelcome to Android. This is Android. Welcome. You can do anything with Android. Anything at all. The only limit... is yourself. Welcome to Android. WELCOME... TO ANDROID. Yes... this is Android. And welcome to you who has come to Android. Anything is possible with Android. You can do anything with Android. The infinite is possible with Android. The unattainable is unknown with Android./Caribbean accent https://market.android.com/details?id=com.zombo And yes, I understand a large number of non-nerds will not get the joke, but if you used the internet in the 90s this is hilarious. Just trust me on this. In all seriousness though, I think the call forwarding approach would be the best. On Feb 4, 5:14 pm, Dianne Hackborn hack...@android.com wrote: Everything. On Fri, Feb 4, 2011 at 3:53 PM, Indicator Veritatis mej1...@yahoo.comwrote: Everything? Even backrubs and breaking SHA-1? On Feb 3, 8:02 pm, Dianne Hackborn hack...@android.com wrote: Android is good for everything! EVERYTHING I say!!! On Sat, Jan 29, 2011 at 7:06 AM, Johny pyt...@hope.cz wrote: I am thinking about this scenario for my script 1.In a mobile with Android my script will be running. 2. Someone will dial the number( say number A) of that mobile where the script is running. 3.The script will answer and ask the caller( the caller has say number B) to dial the number where he wants to be connected to( say number C) 4.The caller ( with his number B )will enter the number C 5.The script will dial that number C and makes the connection between number B and C so that they can talk together. Is this possible to do that with Android? Thanks L. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 store a timestamp to the sd card?
I am making a timelimited trial version of a live wallpaper app. I need to store the timestamp on the SD card, to keep track of the trialperiod. I can get the current time with long currentTime=System.currentTimeMillis(); I want to store this with a FileOutputStream object. The problem is that FileOutputStream only has write methods for byte vectors. Byte can only be up to 128, and timestamps are bigger numbers than that. I assume that I have to convert the timestamp number, which is a long, into a byte vector. Is there any easy way to do this? Or is there any other way of storing the long value without using the write methods for byte vectors? -- 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
Re: [android-developers] In app billing...
I believe being able to provide refunds is important. When you go to a real-world store, you can touch, look at, try on items before paying, and yet stores typically let you bring purchases back and get a refund. This is so that the customer knows that if something - unexpected and unforeseen - goes wrong, he can get his money back. That's psychology, not technology. Secondly, as a user, I prefer the situation where the pro version offers additional features compared to the lite version, and not where the lite version has the same features, and is deliberately made annoying in some way (nag screens, start-up delays, etc.) The user hopefully goes to buy the pro version to get those extra features, hoping that they work as advertised, but he has no ways to verify that before paying. Third, putting info about refunds in the application's UI would directly contradict what the user sees in the purchase window. And since the former is part of the application, and the latter comes from Google, which one do you think he's going to believe? Finally, providing information to the user about refunds in one place, the purchase window, would seem to me like valuable thing. Probably not too difficult to provide a boolean flag in the API so that the purchase window can say Refunds for this item are provided by the developer. -- Kostya 05.02.2011 1:56, Dianne Hackborn ?: On Fri, Feb 4, 2011 at 12:17 PM, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: I'm just concerned that it might deter purchases for lite to pro conversions. For buying in-game gems or potions it shouldn't really matter, those are impulse purchases and for smaller amounts too. Why would it deter payments? Here's the main value I see in the refund period: there is something you are purchasing, that you haven't actually been able yet to even try to download and install, so really have no idea what you are getting. Being able to get a refund if it is not what you want, buggy, or has other issues is important to have any confidence in buying in that situation. Using in-app purchases within an app is entirely different though. Consider the same situation with a lite vs. pro version: you downloaded the app for free, have been using it for however long you want (or however long the developer will let you), and have no decided it is worth spending $X to purchase it (or unlock a certain feature etc). What benefit does a refund period really give you here? Or look at this another way: the beauty of using in-app purchases for all of this is that *you* are in complete control of the user experience through this thing. All you need to do is get the user to download and run your free app, and after that you get to decide exactly how you want to interact with the user towards paying for the app. All in-app billing provides is the final point where the user has decided yes it is worth the money, I am paying. So you can do all kinds of things: - Have the full app running as a limited time trial, after which the user must purchase to continue using. - Have the full app running with ads, and the user able to pay to get rid of the ads. - Have limited features available in the free app, with a payment to unlock the full features (or even multiple payment options to unlock different features). - Allow the user to try out for-pay features for a limited amount of time. - Show a nag message every now and then encouraging the user to pay for your app to encourage further development. - And on and on! And in all of these cases, it is clear that the interactions here are directly between you as the app developer and your users, with Market now just being the point where the user hands over some cash. -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] How to store a timestamp to the sd card?
http://developer.android.com/reference/java/io/DataOutputStream.html#writeLong(long) You do know that files stored on the memory card can be very easily changed by the user? -- Kostya 05.02.2011 11:44, MobileVisuals пишет: I am making a timelimited trial version of a live wallpaper app. I need to store the timestamp on the SD card, to keep track of the trialperiod. I can get the current time with long currentTime=System.currentTimeMillis(); I want to store this with a FileOutputStream object. The problem is that FileOutputStream only has write methods for byte vectors. Byte can only be up to 128, and timestamps are bigger numbers than that. I assume that I have to convert the timestamp number, which is a long, into a byte vector. Is there any easy way to do this? Or is there any other way of storing the long value without using the write methods for byte vectors? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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 connect mysql with android
Android does indeed support direct connectivity to most databases including MySQL. Android is fully JDBC compliant and all you need to do is find and embed the correct JDBC driver inside your Android app. Most JDBC drivers are covered by GPL. The remaining problem then is to encode the necessary database result set logic. JDBC is totally secure if sufficient thought is given to database settings and router filters. JDBC avoids the need for additional cumbersome layers of SOAP or REST services. The above is fine for simple database access, however, you may find that using a rapid application development tool such as our MobiForms Developer may be more effective. MobiForms is particularly designed for the creation of database orientated mobile apps. Most programming is done by drag and drop and by the selection of tables and columns in a true relational database approach. MobiForms supports direct access to a range of industry standard databases such as Oracle, SQL Server and MySQL. For disconnected apps or where wireless connectivity can not be guaranteed the MobiForms Sync Server is available. This provides offline bi-directional database buffering and online synchronisation for true store and forward apps. Typical apps created using MobiForms include bar coding, field service, marketing, signature capture, stock control and surveys. Often these are directly connected to back office systems such as Microsoft Navision/Dynamics, Oracle Apps and SAP etc. For more information take a look at: http://wwwmobiforms.com On Feb 1, 4:18 am, noorul nooru...@gmail.com wrote: Basic steps for connecting Mysql with Android sdk -- 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
Re: [android-developers] webview + scrolling
Hi Mark, I have implemented a class named WidgetView.java which extends from FrameLayout. This acts as a container for Webview.In my class I handle the touch events according to my specific requirements. Now when i remove FrameLayout and use some other layout I am not able to display any content. Could you please suggest a way wherein I can display the contents and also handle the touch events as per my requirements. Is it possible for me to extend my WidgetView.java class directly from WebView.java.Any pointers will be highly appreciated. Thanks in advance. Regards, Sagar On Fri, Feb 4, 2011 at 3:13 AM, Mark Murphy mmur...@commonsware.com wrote: On Wed, Feb 2, 2011 at 5:42 AM, sagar masuti sagar@gmail.com wrote: I am trying to embedded a webview in a framelayout. my launch.xml is as shown below. FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent WebView android:id=@+id/webview android:layout_width=fill_parent android:layout_height=fill_parent/ /FrameLayout Why do you have a FrameLayout? Why do you have android:orientation=vertical in your FrameLayout, considering that FrameLayout does not honor that attribute? I have implemented the WebChromeClient and WidgetViewClient. That's WebViewClient. I have implemented the onTouchEvent and passing the touch events to the WebView. That seems unlikely to work well. The problem i am facing is am not able to scroll inside the webview. For example, the content is some 5 lines then am able to see only 3 lines and not able to scroll. The touch events go to Webview, first action_down and then action_move, am not able to get what wrong am doing?? You are assuming that WebView is like any other widget. It is not. It is implemented via WebKit, which has its own notions of event handling that may or may not blend well with your own touch event handling. What are you trying to achieve by intercepting the touch events? Since WebView knows how to scroll on its own, I would recommend you simply get rid of the FrameLayout and your own touch handling, and let WebView do what it does naturally. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] slidingdrawer problem
I have a button on handle, but its registered event can not response because of the slidingDrawer handler's event handling, how can I add enable a button's response event on slidingdrawer's handler? Thanks very much. -- 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
Re: [android-developers] Re: Question about bug reports
To send a silent report (i.e. something the user isn't aware of) you can use the details here: http://code.google.com/p/acra/wiki/ACRA3HowTo#Can_I_send_reports_for_caught_exceptions_?_or_for_unexpected_app http://code.google.com/p/acra/wiki/ACRA3HowTo#Can_I_send_reports_for_caught_exceptions_?_or_for_unexpected_appSo in code when you catch an exception you want to log, you simply put in: ErrorReporter.getInstance().handleException(caughtException); If you don't have an exception thrown but you still want to log something then I think there is a variant of that method you can call which will accept a string instead. I don't have java opened so can't confirm the exact method. -- 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: URL query string bug in SMS messages
Well that is almost not an option to not use query strings in a SMS. One work around would be to use a link shortener prior to sending out the SMS from our SMS gateway. (Given that the link shortening service does not crawl the site prior to shortening it) Or to rather make the quer part of the sites subdomain. That being a tad trickier to handle on the server side. Either way it feels rather odd that this is not supported on the Android platform when it is on Symbian, Maemo, iOS and WP7. On Feb 3, 11:13 pm, Mark Murphy mmur...@commonsware.com wrote: Don't put query strings in SMS messages. If you wish to submit a patch to Linkify to address this -- as I am guessing that is where the problem lies -- visithttp://source.android.com. On Wed, Feb 2, 2011 at 4:51 AM, Jan Westin jan.wes...@gmail.com wrote: Hi, Has anyone else stumbled upon a similar issue as seen in the following screen shot :http://twitpic.com/3vpnzx The problem is when a user sends a URL containing a query string, the query string is not interpreted as part of the URL. I've seen this happen to both my HTC Desire running 2.2 and on Samsung galaxy S phones. Does anyone know of a workaround or a fix for this? //Jan -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2 -- 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: Android 3.0 questions
Why did you mention Honeycomb ? I saw pretty much only Android 3.0/ Gingerbread combination, like http://www.unwiredview.com/2010/06/30/android-3-0-gingerbread-details-1280x760-resolution-1ghz-minimum-specs-mid-oct-release/ I use Nexus One phone, not tablet -V On Feb 4, 11:46 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 4 February 2011 17:38, Victor lyamtsev vlyamt...@gmail.com wrote: Can someone help to clarify what Android 3.0 platform is: is that new version of SDK i can use to create applications for Froyo, If you want to create namely for Froyo it'd be better to use Froyo SDK as your target. or will I also have to upgrade OS image on the phone? So far each version is *backward* compatible, so if you got Froyo you can launch i.e. Cupkake's targeted apps. But if any app uses Froyo specific features it won't work on Cupkake. Same with Honeycomb. Any idea when it will be available for phones ( for Nexus One in particular) ? Tea leaves are mute today, but assuming Honeycomb is yet not available even for tablets it's mainly intended for, do not hold your breath too strong :) -- 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: Android 3.0 questions
Why did you mention Honeycomb ? I saw pretty much only Android 3.0/ Gingerbread combination, like http://www.unwiredview.com/2010/06/30/android-3-0-gingerbread-details-1280x760-resolution-1ghz-minimum-specs-mid-oct-release/ I use Nexus One phone, not tablet -V On Feb 4, 11:46 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 4 February 2011 17:38, Victor lyamtsev vlyamt...@gmail.com wrote: Can someone help to clarify what Android 3.0 platform is: is that new version of SDK i can use to create applications for Froyo, If you want to create namely for Froyo it'd be better to use Froyo SDK as your target. or will I also have to upgrade OS image on the phone? So far each version is *backward* compatible, so if you got Froyo you can launch i.e. Cupkake's targeted apps. But if any app uses Froyo specific features it won't work on Cupkake. Same with Honeycomb. Any idea when it will be available for phones ( for Nexus One in particular) ? Tea leaves are mute today, but assuming Honeycomb is yet not available even for tablets it's mainly intended for, do not hold your breath too strong :) -- 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
Re: [android-developers] Re: Android 3.0 questions
On Sat, Feb 5, 2011 at 7:19 AM, chcat vlyamt...@gmail.com wrote: Why did you mention Honeycomb ? I saw pretty much only Android 3.0/ Gingerbread combination, like http://www.unwiredview.com/2010/06/30/android-3-0-gingerbread-details-1280x760-resolution-1ghz-minimum-specs-mid-oct-release/ You are mistaken, probably because you are reading 7-month-old blog posts rather than recent materials. Gingerbread is Android 2.3. Honeycomb is Android 3.0. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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: Scheduling ideas
Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... -- 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
Re: [android-developers] Re: Scheduling ideas
On 5 February 2011 13:40, Neilz neilhorn...@gmail.com wrote: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. Alarm manager makes does not care network connection. It fires alarms based on device's RTC and that's all it does. So alarm most likely was fired correctly, yet your fired code failed to operate - and this is slightly different thing. -- 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
Re: [android-developers] Re: Scheduling ideas
05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: Honeycomb + Motodev's Xoom add-on - does not work
On 4 February 2011 21:30, Eric Cloninger er...@motorola.com wrote: Hi, Are you running the emulator at full scale? We are seeing some problems with the emulator crashing when the XOOM addon is used in full scale with the Honeycomb system image. Try adding a launch parameter of -scale 0.6 or some similar value, probably between 0.5 and 0.75. I've found that allows the emulator to work. Thanks for sharing - unfortunately it does not make any difference and Xoom is not starting. Will investigate myself which property may be the culprit. As others have pointed out, the Honeycomb system image in the emulator is not fast. Hard not to notice ;/ I really hope Honeycomp sdk will get update asap as current emulator speed makes it quite hard to debug/test anything -- 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: Scheduling ideas
Hi Kostya. Yes, the alarm gets called... it's just my own call which stops it doing it's task. For example: if(isNetworkAvailable(mContext)){ // do stuff... } public static boolean isNetworkAvailable(Context context) { ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = connMgr.getActiveNetworkInfo(); return(info != null info.isConnected()); } So this call tells me the network isn't available when the phone's asleep. I guess I'll have to try another way of testing for the network? On Feb 5, 1:07 pm, Kostya Vasilyev kmans...@gmail.com wrote: 05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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 connect mysql with android
I was wondering when you'd check in. On Feb 5, 3:29 am, Tim t...@mobiforms.com wrote: Android does indeed support direct connectivity to most databases including MySQL. Android is fully JDBC compliant and all you need to do is find and embed the correct JDBC driver inside your Android app. Most JDBC drivers are covered by GPL. The remaining problem then is to encode the necessary database result set logic. JDBC is totally secure if sufficient thought is given to database settings and router filters. JDBC avoids the need for additional cumbersome layers of SOAP or REST services. The above is fine for simple database access, however, you may find that using a rapid application development tool such as our MobiForms Developer may be more effective. MobiForms is particularly designed for the creation of database orientated mobile apps. Most programming is done by drag and drop and by the selection of tables and columns in a true relational database approach. MobiForms supports direct access to a range of industry standard databases such as Oracle, SQL Server and MySQL. For disconnected apps or where wireless connectivity can not be guaranteed the MobiForms Sync Server is available. This provides offline bi-directional database buffering and online synchronisation for true store and forward apps. Typical apps created using MobiForms include bar coding, field service, marketing, signature capture, stock control and surveys. Often these are directly connected to back office systems such as Microsoft Navision/Dynamics, Oracle Apps and SAP etc. For more information take a look at:http://wwwmobiforms.com On Feb 1, 4:18 am, noorul nooru...@gmail.com wrote: Basic steps for connecting Mysql with Android sdk -- 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
Re: [android-developers] Re: Scheduling ideas
Neil, That's pretty much how I test too, except my code lacks a check for isConnected, only for null. This is what I get in my app's log: NetworkInfo: type: MOBILE[EDGE], state: CONNECTED/CONNECTED, reason: apnSwitched, extra: internet.mts.ru, roaming: false, failover: false, isAvailable: true Two ideas: - Check your phone settings, perhaps yours has some kind of sleep policy for mobile data; - Log the value you get by calling getActiveNetworkInfo into a file, and examine later. -- Kostya 05.02.2011 16:20, Neilz пишет: Hi Kostya. Yes, the alarm gets called... it's just my own call which stops it doing it's task. For example: if(isNetworkAvailable(mContext)){ // do stuff... } public static boolean isNetworkAvailable(Context context) { ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = connMgr.getActiveNetworkInfo(); return(info != null info.isConnected()); } So this call tells me the network isn't available when the phone's asleep. I guess I'll have to try another way of testing for the network? On Feb 5, 1:07 pm, Kostya Vasilyevkmans...@gmail.com wrote: 05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: Emulator with disabled camera still has camera?
It looks like the emulator currently only supports one default hardware configuration for hasSystemFeature() http://code.google.com/p/android/issues/detail?id=11682 which indeed is inconvenient for emulating/testing app behavior for different hardware configurations. On Feb 4, 8:42 pm, Manfred Moser mosa...@gmail.com wrote: Hi! I want to test that my app behaves correctly without camera support but I have no device without camera. So I created a avd with Camer support set to no. However when I run the emulator this call still returns true public boolean hasCamera() { PackageManager packageManager = application.getPackageManager(); return packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA); } Is this a bug in the emulator that I should report or am I missing something? thx manfred -- 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: MediaStore insertImage quality
This is a self reply. It has been solved by 1.Copy original jpeg file to destination directory. 2.Register image with ContentResolver::insert Thank you --- Koji Ohno Apps https://market.android.com/developer?pub=Koji+Ohno 2011/2/4 Koji Ohno s936...@gmail.com: Hi I have been trying to save some image to a camera directory. code like: MediaStore.Images.Media.insertImage(mContext.getContentResolver(), someJpegFilePath, SomeImage,SomeImage); An image saved successfully but quality of saved jpeg file is very low. How can I save an image with original quality? Any help would be much appreciated. Best Regards, --- Koji Ohno -- 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
Re: [android-developers] Re: How to store a timestamp to the sd card?
You don't read in a byte vector. You read in a string. You convert the string to a long. You really need to back off of Android development for a while and learn Java. On Sat, Feb 5, 2011 at 9:08 AM, MobileVisuals eyv...@astralvisuals.com wrote: I tried the printwriter and I can use it to write the information as a String. But how can I read this information to extract it as a long? I tried in = new FileInputStream(fileLocation); in.read(readData); //readData is a byte vector String readString=new String(readData); but this does not work, because the string that I read is not the same that I store. Is there a special class that I can use, so I can read the information as a String instead of a byte vector? On Feb 4, 6:36 pm, Mark Murphy mmur...@commonsware.com wrote: Use a PrintWriter. On Fri, Feb 4, 2011 at 12:33 PM, MobileVisuals eyv...@astralvisuals.com wrote: I am making a timelimited trial version of a live wallpaper app. I need to store the timestamp on the SD card, to keep track of the trialperiod. I can get the current time with long currentTime=System.currentTimeMillis(); I want to store this with a FileOutputStream object. The problem is that FileOutputStream only has write methods for byte vectors. Byte can only be up to 128, and timestamps are bigger numbers than that. I assume that I have to convert the timestamp number, which is a long, into a byte vector. Is there any easy way to do this? Or is there any other way of storing the long value without using the write methods for byte vectors? -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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 store a timestamp to the sd card?
I tried the printwriter and I can use it to write the information as a String. But how can I read this information to extract it as a long? I tried in = new FileInputStream(fileLocation); in.read(readData); //readData is a byte vector String readString=new String(readData); but this does not work, because the string that I read is not the same that I store. Is there a special class that I can use, so I can read the information as a String instead of a byte vector? On Feb 4, 6:36 pm, Mark Murphy mmur...@commonsware.com wrote: Use a PrintWriter. On Fri, Feb 4, 2011 at 12:33 PM, MobileVisuals eyv...@astralvisuals.com wrote: I am making a timelimited trial version of a live wallpaper app. I need to store the timestamp on the SD card, to keep track of the trialperiod. I can get the current time with long currentTime=System.currentTimeMillis(); I want to store this with a FileOutputStream object. The problem is that FileOutputStream only has write methods for byte vectors. Byte can only be up to 128, and timestamps are bigger numbers than that. I assume that I have to convert the timestamp number, which is a long, into a byte vector. Is there any easy way to do this? Or is there any other way of storing the long value without using the write methods for byte vectors? -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- 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 store a timestamp to the sd card?
I saw your posting about the DataOutputstream now, so I try that instead of PrintWriter. I know that these files can be changed by users, but most people don'tknow how to do that. Do you know a better idea for a trial version? I don't have time for a server based solution. On Feb 5, 9:52 am, Kostya Vasilyev kmans...@gmail.com wrote: #...) You do know that files stored on the memory card can be very easily changed by the user? -- Kostya 05.02.2011 11:44, MobileVisuals пишет: I am making a timelimited trial version of a live wallpaper app. I need to store the timestamp on the SD card, to keep track of the trialperiod. I can get the current time with long currentTime=System.currentTimeMillis(); I want to store this with a FileOutputStream object. The problem is that FileOutputStream only has write methods for byte vectors. Byte can only be up to 128, and timestamps are bigger numbers than that. I assume that I have to convert the timestamp number, which is a long, into a byte vector. Is there any easy way to do this? Or is there any other way of storing the long value without using the write methods for byte vectors? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: How to store a timestamp to the sd card?
The very least you can do is use application-specific storage for your timestamp value. The memory card is accessible and writable by anyone, including other applications and the user, and storing the timestamp as text is practically begging for someone to mess with it. I'd suggest you use SharedPreferences: http://developer.android.com/reference/android/content/SharedPreferences.html ... which can write and read long type values (your timestamp). Shared prefs are cleared when the app is uninstalled, so doing this and installing again will start your trial period again. But without an off-phone (server) storage, there is not much you can do anyway. -- Kostya 05.02.2011 17:30, MobileVisuals пишет: I saw your posting about the DataOutputstream now, so I try that instead of PrintWriter. I know that these files can be changed by users, but most people don'tknow how to do that. Do you know a better idea for a trial version? I don't have time for a server based solution. On Feb 5, 9:52 am, Kostya Vasilyevkmans...@gmail.com wrote: #...) You do know that files stored on the memory card can be very easily changed by the user? -- Kostya 05.02.2011 11:44, MobileVisuals пишет: I am making a timelimited trial version of a live wallpaper app. I need to store the timestamp on the SD card, to keep track of the trialperiod. I can get the current time with long currentTime=System.currentTimeMillis(); I want to store this with a FileOutputStream object. The problem is that FileOutputStream only has write methods for byte vectors. Byte can only be up to 128, and timestamps are bigger numbers than that. I assume that I have to convert the timestamp number, which is a long, into a byte vector. Is there any easy way to do this? Or is there any other way of storing the long value without using the write methods for byte vectors? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: How to store a timestamp to the sd card?
On 5 February 2011 15:35, Kostya Vasilyev kmans...@gmail.com wrote: The memory card is accessible and writable by anyone, including other applications and the user, and storing the timestamp as text is practically begging for someone to mess with it. Not fully agreee. If you do this right way, it will somehow serve the purpose. Choose path and filename wisely (resist from naming your file like my_app_name/timestamp.txt). Additionally you may want to write device ID too to prevent sharing that file. And if you write some noise (like /dev/random :) around your timestamp data to bload the file slightly (say 512/1024 bytes) then some 'hackers wannabe' may stay away. Of course one may put some effort and hide path and filename in the code so it's not easily spotable by just peeking the binary. I'd also fake timestamp on the file once created to make it older that app installation. Or just be creative yourself :) I'd suggest you use SharedPreferences: Uninstalling the app and doing fresh install kills this type of protection so it's not the solution. SD card file will survive it. -- 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: Completely disable Soft Keyboard from EditText
Hi! Thanks for your answer. Unfortunately setting editable=false does not do the trick. When I'm moving the focus via hard keys from a normal EditText to the View where I'd like not to have soft keyboard shown it still stays on the screen. ps. Sorry I didn't answer earlier, I couldn't find my post for some reason and actually reposted it, so I missed your answer. On Feb 4, 4:12 am, Brill Pappin br...@pappin.ca wrote: There doesn't seem to be an ime option in EditorInfo to disable the soft keyboard. Can you make the view editable==false but still capture touch/select events? Making it non-editable may prevent the keyboard from popping up. - Brill Pappin On Feb 1, 1:29 pm, zenperttu perttu.s...@gmail.com wrote: Hi! I would like a way to turn off showing the current soft keyboard for an EditText. I have a custom View that provides the soft input needed for an EditText, so on every occasion (on click, on focus change, on touch...) when by default the soft keyboard would be shown, I want it NOT to be shown. The closest things I found arehttp://groups.google.com/group/android-developers/browse_thread/threa... and http://stackoverflow.com/questions/1109022/how-to-close-hide-the-andr... and http://stackoverflow.com/questions/1109022/how-to-close-hide-the-andr... These however do not work for me. The solution suggested in the latter InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0); for example works only after the EditText has been selected by the user and is already accepting input and so the soft keyboard is already on the screen. I want it never to appear. I can try to implicitly set all of the onFocusChangeListener, onTouchListener, onClickListener to do public void onSomeActionListener(View v) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm.isActive(v)) { imm.toggleSoftInput(0,0); } } However, this is really not a nice solution because 1) the soft keyboard is first called and shown so that it briefly flashes on the screen before disappearing 2) I can't by trial and error try to find all the different ways user could cause soft keyboard to be shown and override all corresponding methods Thanks for your 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
Re: [android-developers] Re: How to store a timestamp to the sd card?
05.02.2011 17:46, Marcin Orlowski пишет: On 5 February 2011 15:35, Kostya Vasilyevkmans...@gmail.com wrote: The memory card is accessible and writable by anyone, including other applications and the user, and storing the timestamp as text is practically begging for someone to mess with it. Not fully agreee. If you do this right way, it will somehow serve the purpose. Choose path and filename wisely (resist from naming your file like my_app_name/timestamp.txt). Additionally you may want to write device ID too to prevent sharing that file. And if you write some noise (like /dev/random :) around your timestamp data to bload the file slightly (say 512/1024 bytes) then some 'hackers wannabe' may stay away. Of course one may put some effort and hide path and filename in the code so it's not easily spotable by just peeking the binary. I'd also fake timestamp on the file once created to make it older that app installation. Or just be creative yourself :) A secret file location can be easily discovered by someone who is able to run strace (== rooted firmware), which then can be shared, or exploited by an unlocker application. As for data obfuscation, that's a great ideas, but the OP wants something he could put together without any additional learning. I'd suggest you use SharedPreferences: Uninstalling the app and doing fresh install kills this type of protection so it's not the solution. SD card file will survive it. Agree, it's a bad solution, but at least there are already methods to read and write long values. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: Scheduling ideas
Yes, looking at the log output, it seems the device disables the wireless connection after a few minutes while the phone's sleeping, to save resources I suppose. So I'll just have to code around that, and reset the alarm to try again until the connection is back. On Feb 5, 1:29 pm, Kostya Vasilyev kmans...@gmail.com wrote: Neil, That's pretty much how I test too, except my code lacks a check for isConnected, only for null. This is what I get in my app's log: NetworkInfo: type: MOBILE[EDGE], state: CONNECTED/CONNECTED, reason: apnSwitched, extra: internet.mts.ru, roaming: false, failover: false, isAvailable: true Two ideas: - Check your phone settings, perhaps yours has some kind of sleep policy for mobile data; - Log the value you get by calling getActiveNetworkInfo into a file, and examine later. -- Kostya 05.02.2011 16:20, Neilz пишет: Hi Kostya. Yes, the alarm gets called... it's just my own call which stops it doing it's task. For example: if(isNetworkAvailable(mContext)){ // do stuff... } public static boolean isNetworkAvailable(Context context) { ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = connMgr.getActiveNetworkInfo(); return(info != null info.isConnected()); } So this call tells me the network isn't available when the phone's asleep. I guess I'll have to try another way of testing for the network? On Feb 5, 1:07 pm, Kostya Vasilyevkmans...@gmail.com wrote: 05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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: URL query string bug in SMS messages
You didn't mention which Galaxy S phone or if it's all of them. FWIW, I've had no issues sending this type of URL through an SMS gateway to the Samsung Epic Galaxy class phone - works as expected. I do question the validity of the spaces in the query and suspect that is the issue here. I can send you a screen shot from an Epic showing my links versus your links - mine look fine, yours look like your image. I also sent the same text message to a diff phone (J2ME based) and the link is underlined up to the first space but it includes the ? sc=4KNZNSEN part in the link Loosely related - in the past, I have had issues with some phones/ carriers when the URL string is rather long. There is the obvious inherent SMS length limitations, but even when that is complied with, I have seen some devices that accept the URL in the SMS, but then truncate it between the SMS and the browser when the link is tapped - some as short as 60 characters, some at 64 characters, some not at all. However, I don't think that is the problem here since you are saying it is happening at the ? On Feb 2, 3:51 am, Jan Westin jan.wes...@gmail.com wrote: Hi, Has anyone else stumbled upon a similar issue as seen in the following screen shot :http://twitpic.com/3vpnzx The problem is when a user sends a URL containing a query string, the query string is not interpreted as part of the URL. I've seen this happen to both my HTC Desire running 2.2 and on Samsung galaxy S phones. Does anyone know of a workaround or a fix for this? //Jan -- 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
Re: [android-developers] Re: Scheduling ideas
On Sat, Feb 5, 2011 at 10:22 AM, Neilz neilhorn...@gmail.com wrote: Yes, looking at the log output, it seems the device disables the wireless connection after a few minutes while the phone's sleeping, to save resources I suppose. So I'll just have to code around that, and reset the alarm to try again until the connection is back. If by wireless connection you mean WiFi, yes, the WiFi radio gets turned off while the phone is asleep. You will need to maintain a WakeLock and a WiFiLock. And, bear in mind that the user may or may not have an available WiFi connection wherever they happen to be. If by wireless connection you mean mobile data, AFAIK that remains on even while the device is asleep. In fact, one of the things that can wake up the device is an incoming packet on an open socket on a 3G connection. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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
Re: [android-developers] Re: URL query string bug in SMS messages
On Sat, Feb 5, 2011 at 10:25 AM, kernelpanic j.m.roya...@gmail.com wrote: I do question the validity of the spaces in the query and suspect that is the issue here. :: smacks forehead :: Yeah, I never noticed that. Looking at the regex that Linkify uses, it will not honor spaces in query parameters, but it should honor %20 values. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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
Re: [android-developers] Re: How to store a timestamp to the sd card?
On 5 February 2011 16:08, Kostya Vasilyev kmans...@gmail.com wrote: A secret file location can be easily discovered by someone who is able to run strace (== rooted firmware), which then can be shared, or exploited by an unlocker application. If anyone start sniffing with strace then definitely such protection will fail sooner than later but I was just talking about simple counter actions that one should consider doing to keep 'hackers wannabe's away. I think that if you want to do such simple protection, then you shall be aware of its weakness. At the same point if you agree to leave all these elementary weaknes not hardened (unscrabled strings in app etc), then what is this protection intended for? It can even be 'hacked' accidentally, so it's pointless to spend any time on implementation as it'd be pure waste. As for data obfuscation, that's a great ideas, but the OP wants something he could put together without any additional learning. XORing a few strings won't require much learning and it shall suffice -- 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
Re: [android-developers] Re: URL query string bug in SMS messages
BTW, it's been suggested to use a link shortening service - that would break intent filters, if they are used to launch the application. What would work, is to use URL rewriting, so rather than using: http://www.site.com/page?param=value one would use something like: http://www.site.com/page/param/value A rewritten URL like the above would still work with intent filters to launch the application, if that's the goal. -- Kostya 05.02.2011 18:25, kernelpanic пишет: You didn't mention which Galaxy S phone or if it's all of them. FWIW, I've had no issues sending this type of URL through an SMS gateway to the Samsung Epic Galaxy class phone - works as expected. I do question the validity of the spaces in the query and suspect that is the issue here. I can send you a screen shot from an Epic showing my links versus your links - mine look fine, yours look like your image. I also sent the same text message to a diff phone (J2ME based) and the link is underlined up to the first space but it includes the ? sc=4KNZNSEN part in the link Loosely related - in the past, I have had issues with some phones/ carriers when the URL string is rather long. There is the obvious inherent SMS length limitations, but even when that is complied with, I have seen some devices that accept the URL in the SMS, but then truncate it between the SMS and the browser when the link is tapped - some as short as 60 characters, some at 64 characters, some not at all. However, I don't think that is the problem here since you are saying it is happening at the ? On Feb 2, 3:51 am, Jan Westinjan.wes...@gmail.com wrote: Hi, Has anyone else stumbled upon a similar issue as seen in the following screen shot :http://twitpic.com/3vpnzx The problem is when a user sends a URL containing a query string, the query string is not interpreted as part of the URL. I've seen this happen to both my HTC Desire running 2.2 and on Samsung galaxy S phones. Does anyone know of a workaround or a fix for this? //Jan -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: Scheduling ideas
Interesting. I take it by wireless you mean cellular? My HTC Hero has an option for always on cellular data connection - I guess it's specific to HTC phones, as neither my Samsung Galaxy S or Motorola Milestone have that. Is your phone made by HTC by any chance? If so, perhaps you could check that setting. -- Kostya 05.02.2011 18:22, Neilz пишет: Yes, looking at the log output, it seems the device disables the wireless connection after a few minutes while the phone's sleeping, to save resources I suppose. So I'll just have to code around that, and reset the alarm to try again until the connection is back. On Feb 5, 1:29 pm, Kostya Vasilyevkmans...@gmail.com wrote: Neil, That's pretty much how I test too, except my code lacks a check for isConnected, only for null. This is what I get in my app's log: NetworkInfo: type: MOBILE[EDGE], state: CONNECTED/CONNECTED, reason: apnSwitched, extra: internet.mts.ru, roaming: false, failover: false, isAvailable: true Two ideas: - Check your phone settings, perhaps yours has some kind of sleep policy for mobile data; - Log the value you get by calling getActiveNetworkInfo into a file, and examine later. -- Kostya 05.02.2011 16:20, Neilz пишет: Hi Kostya. Yes, the alarm gets called... it's just my own call which stops it doing it's task. For example: if(isNetworkAvailable(mContext)){ // do stuff... } public static boolean isNetworkAvailable(Context context) { ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = connMgr.getActiveNetworkInfo(); return(info != nullinfo.isConnected()); } So this call tells me the network isn't available when the phone's asleep. I guess I'll have to try another way of testing for the network? On Feb 5, 1:07 pm, Kostya Vasilyevkmans...@gmail.comwrote: 05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: 2.3 Platform Google APIs missing Licensing Service..?
LVL doesn't work for me on 2.3 either. LogCat output: 01-27 00:21:46.455: INFO/LicenseChecker(1067): Binding to licensing service. 01-27 00:21:46.465: WARN/ActivityManager(76): Unable to start service Intent { act=com.android.vending.licensing.ILicensingService }: not found 01-27 00:21:46.465: ERROR/LicenseChecker(1067): Could not bind to service. More info: Same code works on version 2.2 of the Google API emulator, but not 2.3 of the Google API emulator. From 2.2: 01-27 01:00:12.979: INFO/LicenseChecker(562): Using cached license response From 2.3: 02-05 15:32:52.674: WARN/PackageManager(60): Unknown permission com.android.vending.CHECK_LICENSE in package org.smsforward Subsequently, a check to see if the 'com.android.vending.CHECK_LICENSE' permission is granted in my application returns false on 2.3 but true on 2.2. This issue has been raised at http://code.google.com/p/marketlicensing/issues/detail?id=27 but there's no feedback from Google, or the developers. This is shocking. On Jan 14, 6:34 am, CedarF cedric.dar...@gmail.com wrote: Still not works and no answer from Google? On 19 déc 2010, 13:37, Willem willem.sto...@gmail.com wrote: Same issue here... Any progress yet? On 7 dec, 17:41, H m...@howardb.com wrote: Used adb to install an app that works fine on a 2.2 Platform Google API avd, but in the newly release2.3flavour, I keep getting this message: I/LicenseChecker( 530): Binding tolicensingservice. W/ActivityManager( 70): Unable to start service Intent { act=com.android.vending.licensing.ILicensingService }: not found E/LicenseChecker( 530): Could not bind to service. However I have been having problems with my2.3avd (had to start it four times before it was stable enough to sign in) so I can't be sure if my avd is corrupted or not. Can anyone else confirm if theLicensingService is installed correctly on the2.3Google APIs package..?- Masquer le texte des messages précédents - - Afficher le texte des messages précédents - -- 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
Re: [android-developers] Re: URL query string bug in SMS messages
Not sure if there are any spaces. The SMS content is: http://www.site.com?param=value Test 2 It's not clear whether the Test 2 is part of the URL. I would think not, because spaces in URLs are always encoded as %20 or +. I suspect the issue is that the ?param=value is not highlighted, just the http://www.site.com;. Here is that link again: http://twitpic.com/3vpnzx -- Kostya 05.02.2011 18:30, Mark Murphy пишет: On Sat, Feb 5, 2011 at 10:25 AM, kernelpanicj.m.roya...@gmail.com wrote: I do question the validity of the spaces in the query and suspect that is the issue here. :: smacks forehead :: Yeah, I never noticed that. Looking at the regex that Linkify uses, it will not honor spaces in query parameters, but it should honor %20 values. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: Scheduling ideas
No I'm testing on a Nexus... But I can't be responsible for user's individual settings, so I'll just have to assume that in some cases the network will not be available during the night. Unless there's a command to explicitly wake up the connection? On Feb 5, 3:42 pm, Kostya Vasilyev kmans...@gmail.com wrote: Interesting. I take it by wireless you mean cellular? My HTC Hero has an option for always on cellular data connection - I guess it's specific to HTC phones, as neither my Samsung Galaxy S or Motorola Milestone have that. Is your phone made by HTC by any chance? If so, perhaps you could check that setting. -- Kostya 05.02.2011 18:22, Neilz пишет: Yes, looking at the log output, it seems the device disables the wireless connection after a few minutes while the phone's sleeping, to save resources I suppose. So I'll just have to code around that, and reset the alarm to try again until the connection is back. On Feb 5, 1:29 pm, Kostya Vasilyevkmans...@gmail.com wrote: Neil, That's pretty much how I test too, except my code lacks a check for isConnected, only for null. This is what I get in my app's log: NetworkInfo: type: MOBILE[EDGE], state: CONNECTED/CONNECTED, reason: apnSwitched, extra: internet.mts.ru, roaming: false, failover: false, isAvailable: true Two ideas: - Check your phone settings, perhaps yours has some kind of sleep policy for mobile data; - Log the value you get by calling getActiveNetworkInfo into a file, and examine later. -- Kostya 05.02.2011 16:20, Neilz пишет: Hi Kostya. Yes, the alarm gets called... it's just my own call which stops it doing it's task. For example: if(isNetworkAvailable(mContext)){ // do stuff... } public static boolean isNetworkAvailable(Context context) { ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = connMgr.getActiveNetworkInfo(); return(info != null info.isConnected()); } So this call tells me the network isn't available when the phone's asleep. I guess I'll have to try another way of testing for the network? On Feb 5, 1:07 pm, Kostya Vasilyevkmans...@gmail.com wrote: 05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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] Issue 13044: Android Browser does not correctly support XMLHttpRequest streaming
Has this issue been resolved or are there plans to resolve it? It seems that the issue that I have with the server response not being read by the Android's native browser when I call a remote web service could be related to this 4K buffering on the browser's side. Has anyone else experienced this before when calling services using Ajax? I have been asking questions regarding the browser for a bit now and I don't seem to get much feedback from the list. Do developers opt to use webview or other tools rather than the browser? Is the browser a dead tool in the Android community? Thanks again -- 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: In app billing...
I believe being able to provide refunds is important. When you go to a real-world store Since a user upgrading to a pro version isn't buying anything tangible, it's more like going into a donut shop, buying a donut and eating it. How many consumers ask for refunds at that point? Under some circumstances, a refund is called for but not in the same way as a consumer returning an unopened package that can be resold. To me, issuing a refund for a software product is only to be done under some unusual circumstance not because of buyer remorse. The donut has been eaten and that's that. -John Coryat -- 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
Re: [android-developers] Re: Scheduling ideas
05.02.2011 18:47, Neilz пишет: No I'm testing on a Nexus... Ok. But I can't be responsible for user's individual settings, so I'll just have to assume that in some cases the network will not be available during the night. Unless there's a command to explicitly wake up the connection? Well, some devices have really weird settings, like the HTC fast boot optimization for the Desire HD, which disables BOOT_COMPLETED. So at least you can be aware of it. But since your phone is not an HTC There is this: http://developer.android.com/reference/android/net/ConnectivityManager.html#setNetworkPreference(int) but i haven't had much experience with it, since my phone keeps the mobile connection on at all times, as seen in the log entry I posted before. What happens if you just go ahead and start your network operation? Might cause the phone establish a connection just then, on demand. If not, I suppose your code catches IOException already, right? -- Kostya On Feb 5, 3:42 pm, Kostya Vasilyevkmans...@gmail.com wrote: Interesting. I take it by wireless you mean cellular? My HTC Hero has an option for always on cellular data connection - I guess it's specific to HTC phones, as neither my Samsung Galaxy S or Motorola Milestone have that. Is your phone made by HTC by any chance? If so, perhaps you could check that setting. -- Kostya 05.02.2011 18:22, Neilz пишет: Yes, looking at the log output, it seems the device disables the wireless connection after a few minutes while the phone's sleeping, to save resources I suppose. So I'll just have to code around that, and reset the alarm to try again until the connection is back. On Feb 5, 1:29 pm, Kostya Vasilyevkmans...@gmail.comwrote: Neil, That's pretty much how I test too, except my code lacks a check for isConnected, only for null. This is what I get in my app's log: NetworkInfo: type: MOBILE[EDGE], state: CONNECTED/CONNECTED, reason: apnSwitched, extra: internet.mts.ru, roaming: false, failover: false, isAvailable: true Two ideas: - Check your phone settings, perhaps yours has some kind of sleep policy for mobile data; - Log the value you get by calling getActiveNetworkInfo into a file, and examine later. -- Kostya 05.02.2011 16:20, Neilz пишет: Hi Kostya. Yes, the alarm gets called... it's just my own call which stops it doing it's task. For example: if(isNetworkAvailable(mContext)){ // do stuff... } public static boolean isNetworkAvailable(Context context) { ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = connMgr.getActiveNetworkInfo(); return(info != null info.isConnected()); } So this call tells me the network isn't available when the phone's asleep. I guess I'll have to try another way of testing for the network? On Feb 5, 1:07 pm, Kostya Vasilyevkmans...@gmail.com wrote: 05.02.2011 15:40, Neilz пишет: Ok, one problem with this alarm service. I schedule it for some time in the morning, and when I get up and check the phone, the alarm didn't get called, because it thinks there's no network connection. I'm sure the alarm did get called, as the AlarmManager service has nothing to do with networking. This is a call I make deliberately (I always check there's a connection before making the server request)... but why does it think there's no network when the phone is 'sleeping'? The connection is still there... Depends on what kind of network connectivity you expect. In my tests (Moto Milestone), WiFi doesn't get enabled when the phone is woken by an alarm, but the cellular data connection is available immediately. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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] avcodec_decoder_find problem
I'm trying to decode a video but in my code I think there is a problem about avcodec_find decoder().. I control it with log_message and on logcat there is here1 but there isn't here2 .. So I think there is a problem with avcodec_find_decoder... Can anyone any idea?? Please help me, Thanks And how can I describe pCodecCtx-codec_id.. With %d and %s It didn't work. char info[40]; sprintf(info,i degeri = %d,pCodecCtx-codec_id); log_message(info); *Here is my code** jint Java_com_test_Test_takePics(JNIEnv* env, jobject javaThis) { int framecount; log_message(Fonka girdi); //OPENING FILE** AVFormatContext *pFormatCtx; unsigned char r, g, b; int i,j; char* filename = /sdcard/do-beer-not-drugs.3gp; av_register_all(); // Open video file if(av_open_input_file(pFormatCtx, filename, NULL, 0, NULL)!=0) return -1; // Couldn't open file // Retrieve stream information if(av_find_stream_info(pFormatCtx)0) return -1; // Couldn't find stream information // Dump information about file onto standard error dump_format(pFormatCtx, 0, filename, 0); framecount = pFormatCtx-streams[0]-nb_frames; hist = malloc(framecount*sizeof(int*)); for (j = 0; j framecount; ++j) { hist[j] = malloc(sizeof(int)*64); // this is because we use 64-bin histogram } for (i = 0; i framecount; i++) { for (j = 0; j 64; j++) { hist[i][j] = 0; } } AVCodecContext *pCodecCtx; // Find the first video stream int videoStream; videoStream=-1; /*char info[40]; sprintf(info,i degeri = %d,pFormatCtx-nb_streams); log_message(info);*/ for(i=0; ipFormatCtx-nb_streams; i++){ if(pFormatCtx-streams[i]-codec-codec_type==CODEC_TYPE_VIDEO) { videoStream=i; break; }} if(videoStream==-1) return -1; // Didn't find a video stream AVCodec *pCodec; char info[40]; sprintf(info,i degeri = %d,pCodecCtx-codec_id); log_message(info); // Find the decoder for the video stream pCodec=avcodec_find_decoder(pCodecCtx-codec_id); if(pCodec==NULL) { fprintf(stderr, Unsupported codec!\n); return -1; // Codec not found } log_message(here1); // Open codec if(avcodec_open(pCodecCtx, pCodec)0) return -1; // Could not open codec log_message(here2); // Get a pointer to the codec context for the video stream pCodecCtx=pFormatCtx-streams[videoStream]-codec; //STORING THE DATA** ** AVFrame *pFrame; // Allocate video frame pFrame=avcodec_alloc_frame(); // Allocate an AVFrame structure AVFrame *pFrameRGB; pFrameRGB=avcodec_alloc_frame(); if(pFrameRGB==NULL) return -1; uint8_t *buffer; int numBytes; // Determine required buffer size and allocate buffer numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx-width, pCodecCtx-height); buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t)); // Assign appropriate parts of buffer to image planes in pFrameRGB // Note that pFrameRGB is an AVFrame, but AVFrame is a superset // of AVPicture avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx-width, pCodecCtx-height); //READING DATA** * int frameFinished; AVPacket packet; i=0; while(av_read_frame(pFormatCtx, packet)=0) { // Is this a packet from the video stream? if(packet.stream_index==videoStream) { // Decode video frame avcodec_decode_video(pCodecCtx, pFrame, frameFinished, packet.data, packet.size); // Did we get a video frame? if(frameFinished) { static struct SwsContext *img_convert_ctx; // Convert the image into RGB format if(img_convert_ctx == NULL) { int w = pCodecCtx-width; int h = pCodecCtx-height; img_convert_ctx = sws_getContext(w, h, pCodecCtx-pix_fmt, w, h, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); if(img_convert_ctx == NULL) { fprintf(stderr, Cannot initialize the conversion context!\n); exit(1); } } int ret = sws_scale(img_convert_ctx, pFrame-data, pFrame- linesize, 0, pCodecCtx-height, pFrameRGB-data, pFrameRGB-linesize); for (j = 0; j 3*pCodecCtx-height*pCodecCtx-width -3; j++) { r = (unsigned char) pFrameRGB-data[0][j]; g = (unsigned char) pFrameRGB-data[0][j+1]; b = (unsigned char) pFrameRGB-data[0][j+2]; r = (unsigned char) ((r 2) 0x30); g = (unsigned char) ((g 4) 0x0C); b = (unsigned char) ((b 6) 0x03); unsigned char h = (unsigned char)(r|g|b); hist[i][h]++; } // Save the frame to sdcard SaveFrame(pFrameRGB, pCodecCtx-width, pCodecCtx-height, ++i); } } // Free the packet that was allocated by av_read_frame av_free_packet(packet); } // Free the RGB image av_free(buffer); av_free(pFrameRGB); // Free the YUV frame av_free(pFrame); // Close the codec avcodec_close(pCodecCtx); // Close the video file av_close_input_file(pFormatCtx); int keyframecount; framecount=i; keyframecount = select_keyFrames(framecount); encodeVideo(env,keyframecount); return 0; } -- 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] Re: Android 3.0 questions
Mark, Thanks for the clarification. I am interested in adaptive http live streaming, that is supposed to be one of the great new features in Android 3.0. I'd have to get some sort of live media streaming from Nexus One phone within next 6months. I wouldn't want to try to re- invent the wheel if that will be the part of media framework release. Any idea if that part is functional in Gingerbread, or when Honycomb might be available for Nexus? Thanks again, -V On Feb 5, 7:36 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Feb 5, 2011 at 7:19 AM, chcat vlyamt...@gmail.com wrote:th Why did you mention Honeycomb ? I saw pretty much only Android 3.0/ Gingerbread combination, http://www.unwiredview.com/2010/06/30/android-3-0-gingerbread-details... You are mistaken, probably because you are reading 7-month-thold blog posts rather than recent materials. Gingerbread is Android 2.3. Honeycomb is Android 3.0. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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: URL query string bug in SMS messages
yeah that's true As Mark said, if you do the same test with %20 - it does include the ? sc= portion in the link may need a CR/LF in there to force the separation between the link and the text On Feb 5, 9:46 am, Kostya Vasilyev kmans...@gmail.com wrote: Not sure if there are any spaces. The SMS content is: http://www.site.com?param=valueTest 2 It's not clear whether the Test 2 is part of the URL. I would think not, because spaces in URLs are always encoded as %20 or +. I suspect the issue is that the ?param=value is not highlighted, just the http://www.site.com;. Here is that link again: http://twitpic.com/3vpnzx -- Kostya 05.02.2011 18:30, Mark Murphy пишет: On Sat, Feb 5, 2011 at 10:25 AM, kernelpanicj.m.roya...@gmail.com wrote: I do question the validity of the spaces in the query and suspect that is the issue here. :: smacks forehead :: Yeah, I never noticed that. Looking at the regex that Linkify uses, it will not honor spaces in query parameters, but it should honor %20 values. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: In app billing...
05.02.2011 18:59, Maps.Huge.Info (Maps API Guru) пишет: I believe being able to provide refunds is important. When you go to a real-world store Since a user upgrading to a pro version isn't buying anything tangible, it's more like going into a donut shop, buying a donut and eating it. How many consumers ask for refunds at that point? Under some circumstances, a refund is called for but not in the same way as a consumer returning an unopened package that can be resold. That's a different type of product, more like a health potion in an RPG game. You might call it a virtual consumable. To me, issuing a refund for a software product is only to be done under some unusual circumstance not because of buyer remorse. The donut has been eaten and that's that. For a virtual consumable, yes. But I'm talking specifically about upgrading from lite to pro, which is not a consumable at all. It's the right to use the software in a certain way, to repeatedly perform certain tasks, and is more like buying... hmm... a microwave or a washing machine, not a donut. -John Coryat -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: Android 3.0 questions
On Sat, Feb 5, 2011 at 11:08 AM, chcat vlyamt...@gmail.com wrote: Any idea if that part is functional in Gingerbread Considering that it is not in Gingerbread, I doubt that it is functional. or when Honycomb might be available for Nexus? Nobody knows. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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
Re: [android-developers] Downloading Application to phone
I am getting an error device not found On 1/5/2011 11:53 AM, Mark Murphy wrote: adb -d install path/to/your.apk On Wed, Jan 5, 2011 at 12:51 PM, Kevin Brooksbear35...@gmail.com wrote: How can I download one of my apps from my computer directly to my phone? -- 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 -- 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: URL query string bug in SMS messages
just to add more food for thought - there may be a problem here - there are definitely some differences Using this as a test URL http://www.test.com?id=123abc If I send it to the Epic from another phone - it does NOT consider the query portion (?id=123abc) as part of the link if I send it to the Epic from an email client (in this case Thunderbird) which forces it through Sprint's SMS gateway - it DOES consider the query portion as part of the link On Feb 5, 10:09 am, kernelpanic j.m.roya...@gmail.com wrote: yeah that's true As Mark said, if you do the same test with %20 - it does include the ? sc= portion in the link may need a CR/LF in there to force the separation between the link and the text On Feb 5, 9:46 am, Kostya Vasilyev kmans...@gmail.com wrote: Not sure if there are any spaces. The SMS content is: http://www.site.com?param=valueTest2; It's not clear whether the Test 2 is part of the URL. I would think not, because spaces in URLs are always encoded as %20 or +. I suspect the issue is that the ?param=value is not highlighted, just the http://www.site.com;. Here is that link again: http://twitpic.com/3vpnzx -- Kostya 05.02.2011 18:30, Mark Murphy пишет: On Sat, Feb 5, 2011 at 10:25 AM, kernelpanicj.m.roya...@gmail.com wrote: I do question the validity of the spaces in the query and suspect that is the issue here. :: smacks forehead :: Yeah, I never noticed that. Looking at the regex that Linkify uses, it will not honor spaces in query parameters, but it should honor %20 values. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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
Re: [android-developers] Downloading Application to phone
On Sat, Feb 5, 2011 at 11:21 AM, Kevin Brooks bear35...@gmail.com wrote: I am getting an error device not found Run adb devices. If your device is not listed, then: -- on Windows, you need to get the right driver -- on Linux, you may need to fuss with udev rules or the equivalent for your distro -- on OS X...u...not sure -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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
Re: [android-developers] Re: 2.3 Platform Google APIs missing Licensing Service..?
Same code works on version 2.2 of the Google API emulator, but not 2.3 of the Google API emulator. It's known, confirmed issue: https://groups.google.com/group/android-developers/msg/69ad5f4a5ec9f3e9 If you want to test LVL use 2.2 emulator instead. -- 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
Re: [android-developers] Any twitter updates??
On Sat, Feb 5, 2011 at 1:34 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.comwrote: Sorry i have read your other posts also you keep replying in the same tone anyways It is very difficult to convey tone in emails / posts. Tone is usually inferred by the reader. This perceived tone is often wrong. my bad i dint mention my post like :- For Treking : *Do you have any reference twitter sharing android tutorial??* There you go, that's more like it. See how clear and to that point that is? But there is no reason to reserve that kind of detail specifically for me - everyone would benefit. For rest of the world : The rest of the world would still have no idea that you're looking for tutorials because, for the fourth time now, *you did not specify that in your original post*. I am simply trying to express to you the fact that when posting in this forum or any forum you need to be clear if you expect to get a good answer. I want to share via twitter, I have facebook, now I need the same for twitter in NO WAY implies that your problem is that you couldn't find a good tutorial on the subject. Your perception of my tone aside, do you understand what I'm trying to tell you? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Re: Android beginner
On Sat, Feb 5, 2011 at 1:40 AM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Pls send me this link I have faith that, if you have been able to build an Android application and successfully upload it to the Android Market, you have the technical prowess required to navigate through the documentation to find the information you seek. Regardless this will be a worthwhile endeavor as knowing your way around the documentation will benefit you immensely. Good luck. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: OpenJDK on Android
Thanks Daniel Your response is more in line of what i was expecting... On Feb 4, 6:18 pm, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Koala, Try this for starters:http://stackoverflow.com/questions/4491720/why-android-is-built-on-a-... and follow various pointer that appear there (like the video from Google I/O 2008). It should shed some light on why there was a need to rewrite JVM for speed and small memory footprint. Just to let you know, Dalvik VM is based (in the areas that overlapped with restricted architecture design) on Apache Harmony. What you want is to port Apache Harmony to ARM architecture. It is not a small nor easy task and you can appreciate yourself that desktop machine does not have certain constraints present in a mobile device even when computing power of the said mobile is on par with desktop. (battery, memory, different OS design, ...) Daniel On Fri, Feb 4, 2011 at 6:44 AM, koala koalares...@gmail.com wrote: That comment does not help me On Jan 19, 4:37 pm, viktor victor.scherb...@gmail.com wrote: I think you should change the forum. For example Spring, Java WEB development but notAndroid. On 14 Січ, 16:16, koala koalares...@gmail.com wrote: For god sake, how convenient would it be to haveOpenJDKrunning onandroid? Imagine if we could run swing, rmi, if we could run all java code as it is, we could run enterprise application clients. We could have androidapps running on the desktop and on the phone. What's the blockage stopping us from doing this? Is it all about the price of google's shares vs the price of oracle's shares? -- 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 -- Daniel Drozdzewski -- 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: URL query string bug in SMS messages
Yes test 2 is not part of the query. It was just there to identify the message from our SMSC. Sorry for the confusion. And yes the problem is just that it just highlights http://www.site.com as part of an url. On Feb 5, 5:46 pm, Kostya Vasilyev kmans...@gmail.com wrote: Not sure if there are any spaces. The SMS content is: http://www.site.com?param=valueTest 2 It's not clear whether the Test 2 is part of the URL. I would think not, because spaces in URLs are always encoded as %20 or +. I suspect the issue is that the ?param=value is not highlighted, just the http://www.site.com;. Here is that link again: http://twitpic.com/3vpnzx -- Kostya 05.02.2011 18:30, Mark Murphy пишет: On Sat, Feb 5, 2011 at 10:25 AM, kernelpanicj.m.roya...@gmail.com wrote: I do question the validity of the spaces in the query and suspect that is the issue here. :: smacks forehead :: Yeah, I never noticed that. Looking at the regex that Linkify uses, it will not honor spaces in query parameters, but it should honor %20 values. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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: URL query string bug in SMS messages
Thanks fot the tip. But in this case the goal is to provide users with an unique hash and to validate their handsets to get access to a newspapers standing subscriber-feed. Thus the parameter is intended for one time use. The link is retrieved from our SMSC by sending a keyword to a known shortcode. //Jan On Feb 5, 5:40 pm, Kostya Vasilyev kmans...@gmail.com wrote: BTW, it's been suggested to use a link shortening service - that would break intent filters, if they are used to launch the application. What would work, is to use URL rewriting, so rather than using: http://www.site.com/page?param=value one would use something like: http://www.site.com/page/param/value A rewritten URL like the above would still work with intent filters to launch the application, if that's the goal. -- Kostya 05.02.2011 18:25, kernelpanic пишет: You didn't mention which Galaxy S phone or if it's all of them. FWIW, I've had no issues sending this type of URL through an SMS gateway to the Samsung Epic Galaxy class phone - works as expected. I do question the validity of the spaces in the query and suspect that is the issue here. I can send you a screen shot from an Epic showing my links versus your links - mine look fine, yours look like your image. I also sent the same text message to a diff phone (J2ME based) and the link is underlined up to the first space but it includes the ? sc=4KNZNSEN part in the link Loosely related - in the past, I have had issues with some phones/ carriers when the URL string is rather long. There is the obvious inherent SMS length limitations, but even when that is complied with, I have seen some devices that accept the URL in the SMS, but then truncate it between the SMS and the browser when the link is tapped - some as short as 60 characters, some at 64 characters, some not at all. However, I don't think that is the problem here since you are saying it is happening at the ? On Feb 2, 3:51 am, Jan Westinjan.wes...@gmail.com wrote: Hi, Has anyone else stumbled upon a similar issue as seen in the following screen shot :http://twitpic.com/3vpnzx The problem is when a user sends a URL containing a query string, the query string is not interpreted as part of the URL. I've seen this happen to both my HTC Desire running 2.2 and on Samsung galaxy S phones. Does anyone know of a workaround or a fix for this? //Jan -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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: URL query string bug in SMS messages
Interesting notice that there is a difference. From what we have seen so far, we haven't noticed a difference sending the URL from one handset or from our SMSC. Worth mentioning that this is the case of Finish operators. I don't own a Samsung Galaxy phone myself, but the customers that have reported issues to us have had the i9000 model. At first I would have blamed the skinning interface of Samsung. But when I've tried with HTC's Sense based phones, a Desire, the issue is exactly the same. I've yet to try replicate this issue on a vanilla Google device. But either way. Shouldn't it be the receiving device that does the url recognition? Or does actually sprint ad some additional tag around the link? //Jan On Feb 5, 6:26 pm, kernelpanic j.m.roya...@gmail.com wrote: just to add more food for thought - there may be a problem here - there are definitely some differences Using this as a test URL http://www.test.com?id=123abc If I send it to the Epic from another phone - it does NOT consider the query portion (?id=123abc) as part of the link if I send it to the Epic from an email client (in this case Thunderbird) which forces it through Sprint's SMS gateway - it DOES consider the query portion as part of the link On Feb 5, 10:09 am, kernelpanic j.m.roya...@gmail.com wrote: yeah that's true As Mark said, if you do the same test with %20 - it does include the ? sc= portion in the link may need a CR/LF in there to force the separation between the link and the text On Feb 5, 9:46 am, Kostya Vasilyev kmans...@gmail.com wrote: Not sure if there are any spaces. The SMS content is: http://www.site.com?param=valueTest2; It's not clear whether the Test 2 is part of the URL. I would think not, because spaces in URLs are always encoded as %20 or +. I suspect the issue is that the ?param=value is not highlighted, just the http://www.site.com;. Here is that link again: http://twitpic.com/3vpnzx -- Kostya 05.02.2011 18:30, Mark Murphy пишет: On Sat, Feb 5, 2011 at 10:25 AM, kernelpanicj.m.roya...@gmail.com wrote: I do question the validity of the spaces in the query and suspect that is the issue here. :: smacks forehead :: Yeah, I never noticed that. Looking at the regex that Linkify uses, it will not honor spaces in query parameters, but it should honor %20 values. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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: In app billing...
It's the right to use the software in a certain way, to repeatedly... In my business, I have a stated policy of No refunds under any circumstances. I've had this policy for over 30 years and it has served me well. I have the policy stated in several places and so far, it hasn't been a problem. If you state this clearly then it shouldn't be an issue with the consumers. Sure, you may scare away a few by having this policy but the end result is less complaining and customers who are more likely to be satisfied. I see no reason to change this policy with apps. Besides, we're talking a couple of dollars per transaction. It's not like they're choosing between buying your $2 item or paying their rent. -John Coryat -- 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
Re: [android-developers] Re: URL query string bug in SMS messages
05.02.2011 20:19, Jan Westin пишет: Thanks fot the tip. Welcome. But in this case the goal is to provide users with an unique hash and to validate their handsets to get access to a newspapers standing subscriber-feed. Thus the parameter is intended for one time use. So what? URL rewriting is a general scheme, you can use it with any parameters or values you like: http://www.site.com/validate/0x01234567 http://www.site.com/validate/0x89ABCDEF or even this :) http://www.site.com/check01234567user89ABCDEFsubscription With this Apache module, you can make it transparent for the web server code. I'm sure there are solution for other platforms (IIS, WebSphere, etc.) as well: http://httpd.apache.org/docs/current/mod/mod_rewrite.html -- Kostya The link is retrieved from our SMSC by sending a keyword to a known shortcode. //Jan On Feb 5, 5:40 pm, Kostya Vasilyevkmans...@gmail.com wrote: BTW, it's been suggested to use a link shortening service - that would break intent filters, if they are used to launch the application. What would work, is to use URL rewriting, so rather than using: http://www.site.com/page?param=value one would use something like: http://www.site.com/page/param/value A rewritten URL like the above would still work with intent filters to launch the application, if that's the goal. -- Kostya 05.02.2011 18:25, kernelpanic пишет: You didn't mention which Galaxy S phone or if it's all of them. FWIW, I've had no issues sending this type of URL through an SMS gateway to the Samsung Epic Galaxy class phone - works as expected. I do question the validity of the spaces in the query and suspect that is the issue here. I can send you a screen shot from an Epic showing my links versus your links - mine look fine, yours look like your image. I also sent the same text message to a diff phone (J2ME based) and the link is underlined up to the first space but it includes the ? sc=4KNZNSEN part in the link Loosely related - in the past, I have had issues with some phones/ carriers when the URL string is rather long. There is the obvious inherent SMS length limitations, but even when that is complied with, I have seen some devices that accept the URL in the SMS, but then truncate it between the SMS and the browser when the link is tapped - some as short as 60 characters, some at 64 characters, some not at all. However, I don't think that is the problem here since you are saying it is happening at the ? On Feb 2, 3:51 am, Jan Westinjan.wes...@gmail.comwrote: Hi, Has anyone else stumbled upon a similar issue as seen in the following screen shot :http://twitpic.com/3vpnzx The problem is when a user sends a URL containing a query string, the query string is not interpreted as part of the URL. I've seen this happen to both my HTC Desire running 2.2 and on Samsung galaxy S phones. Does anyone know of a workaround or a fix for this? //Jan -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: URL query string bug in SMS messages
True, I'll have to look into that back at work. In this case it happens to be running on a IIS platform. Thanks for the insight. //Jan On Feb 5, 7:35 pm, Kostya Vasilyev kmans...@gmail.com wrote: 05.02.2011 20:19, Jan Westin пишет: Thanks fot the tip. Welcome. But in this case the goal is to provide users with an unique hash and to validate their handsets to get access to a newspapers standing subscriber-feed. Thus the parameter is intended for one time use. So what? URL rewriting is a general scheme, you can use it with any parameters or values you like: http://www.site.com/validate/0x01234567http://www.site.com/validate/0x89ABCDEF or even this :) http://www.site.com/check01234567user89ABCDEFsubscription With this Apache module, you can make it transparent for the web server code. I'm sure there are solution for other platforms (IIS, WebSphere, etc.) as well: http://httpd.apache.org/docs/current/mod/mod_rewrite.html -- Kostya The link is retrieved from our SMSC by sending a keyword to a known shortcode. //Jan On Feb 5, 5:40 pm, Kostya Vasilyevkmans...@gmail.com wrote: BTW, it's been suggested to use a link shortening service - that would break intent filters, if they are used to launch the application. What would work, is to use URL rewriting, so rather than using: http://www.site.com/page?param=value one would use something like: http://www.site.com/page/param/value A rewritten URL like the above would still work with intent filters to launch the application, if that's the goal. -- Kostya 05.02.2011 18:25, kernelpanic пишет: You didn't mention which Galaxy S phone or if it's all of them. FWIW, I've had no issues sending this type of URL through an SMS gateway to the Samsung Epic Galaxy class phone - works as expected. I do question the validity of the spaces in the query and suspect that is the issue here. I can send you a screen shot from an Epic showing my links versus your links - mine look fine, yours look like your image. I also sent the same text message to a diff phone (J2ME based) and the link is underlined up to the first space but it includes the ? sc=4KNZNSEN part in the link Loosely related - in the past, I have had issues with some phones/ carriers when the URL string is rather long. There is the obvious inherent SMS length limitations, but even when that is complied with, I have seen some devices that accept the URL in the SMS, but then truncate it between the SMS and the browser when the link is tapped - some as short as 60 characters, some at 64 characters, some not at all. However, I don't think that is the problem here since you are saying it is happening at the ? On Feb 2, 3:51 am, Jan Westinjan.wes...@gmail.com wrote: Hi, Has anyone else stumbled upon a similar issue as seen in the following screen shot :http://twitpic.com/3vpnzx The problem is when a user sends a URL containing a query string, the query string is not interpreted as part of the URL. I've seen this happen to both my HTC Desire running 2.2 and on Samsung galaxy S phones. Does anyone know of a workaround or a fix for this? //Jan -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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] Will this action bar navigation mode be there: NAVIGATION MODE DROPDOWNLIST
I see this navigation mode in the API however not in the javadoc that is downloaded with honeycomb preview. Any thoughts which is more recent? Thanks Satya -- 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
Re: [android-developers] Re: In app billing...
That's interesting. Thanks for the info. 05.02.2011 20:33, Maps.Huge.Info (Maps API Guru) пишет: It's the right to use the software in a certain way, to repeatedly... In my business, I have a stated policy of No refunds under any circumstances. I've had this policy for over 30 years and it has served me well. I have the policy stated in several places and so far, it hasn't been a problem. If you state this clearly then it shouldn't be an issue with the consumers. Sure, you may scare away a few by having this policy but the end result is less complaining and customers who are more likely to be satisfied. I see no reason to change this policy with apps. Besides, we're talking a couple of dollars per transaction. It's not like they're choosing between buying your $2 item or paying their rent. -John Coryat -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: Will this action bar navigation mode be there: NAVIGATION MODE DROPDOWNLIST
Looks like the value for both NAVIGATION_MODE_LIST NAVIGATION_MODE_DROPDOWN_LIST appears to be the same. The only affect of setting one mode or vs the other, (betweent these two modes), is wether to show the titles or not. I suppose those can be done through display options setting. Satya On Sat, Feb 5, 2011 at 12:58 PM, Satya Komatineni satya.komatin...@gmail.com wrote: I see this navigation mode in the API however not in the javadoc that is downloaded with honeycomb preview. Any thoughts which is more recent? Thanks Satya -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.com -- 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
Re: [android-developers] Downloading Application to phone
Thanks that got it. On 2/5/2011 10:34 AM, Mark Murphy wrote: On Sat, Feb 5, 2011 at 11:21 AM, Kevin Brooksbear35...@gmail.com wrote: I am getting an error device not found Run adb devices. If your device is not listed, then: -- on Windows, you need to get the right driver -- on Linux, you may need to fuss with udev rules or the equivalent for your distro -- on OS X...u...not sure -- 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] Is /system/bin/dalvikvm reliable on all Android devices?
Can I rely on dalvikvm to be reliable on all Android devices? I would like to use it to send an intent from a native component, which due to legacy design, does not have access to a JNI context. -- 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
Re: [android-developers] Re: In app billing...
So I have a few thoughts on this subject. I have been hoping ever since apple introduced this feature for iPhone/iPad that Google would hurry up and add this. I know of several developers that are making a huge sum more with in-app virtual good purchases than their pro version ever sold. Because it's so tightly integrated in the app, it's a very simple dialog to ok/cancel the purchase and you keep using the app. I have not read the docs yet, I am going to assume that this is the same experience android users will see... they won't be taken out of the app to approve the payment correct? To me, this is the holy grail of mobile apps for developers. I happen to know of a few people in the micro transaction business, and the predictions for this particular segment is astronomical. Tapping in to it therefore is just a matter of finding that right use of it for any given app. Games obviously are going to be the big winner with this feature, as virtual goods, map packs and so forth are unmatched in consumption by end users. I am blown away with how easy it is for someone to spend a buck to customize their avatar look, or a buck for a avatar item.. few bucks to customize, etc etc. I am really hoping.. and if anyone has read and has a clear understanding of what is going to possible.. that they have at least provided what apple has in their API for both end users and developers. Apple for example shows the top in-app purchases. Is there a way for the developer to get info on each and every in-app purchase, to figure out what is selling good and what might not be? Will the Market display the top in-app purchases? For the end user.. how does the in-app purchase go.. is it simply a dialog to approve/deny the purchase? What if they have never bought anything yet? I see that Google and ATT now allow for purchases to appear on their bill. I am hoping at least for ATT that in-app purchases automatically go to their bill as well? Is there any time frame on when Verizon, t-mobile, sprint and other carriers around the world will support this? On Sat, Feb 5, 2011 at 9:33 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: It's the right to use the software in a certain way, to repeatedly... In my business, I have a stated policy of No refunds under any circumstances. I've had this policy for over 30 years and it has served me well. I have the policy stated in several places and so far, it hasn't been a problem. If you state this clearly then it shouldn't be an issue with the consumers. Sure, you may scare away a few by having this policy but the end result is less complaining and customers who are more likely to be satisfied. I see no reason to change this policy with apps. Besides, we're talking a couple of dollars per transaction. It's not like they're choosing between buying your $2 item or paying their rent. -John Coryat -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: avcodec_decoder_find problem
Try to instrument avcodec_open and anything that it calls with __android_log_print to get an idea about what is wrong. On 5 фев, 19:03, cervello eceooz...@gmail.com wrote: I'm trying to decode a video but in my code I think there is a problem about avcodec_find decoder().. I control it with log_message and on logcat there is here1 but there isn't here2 .. So I think there is a problem with avcodec_find_decoder... Can anyone any idea?? Please help me, Thanks And how can I describe pCodecCtx-codec_id.. With %d and %s It didn't work. char info[40]; sprintf(info,i degeri = %d,pCodecCtx-codec_id); log_message(info); *Here is my code** jint Java_com_test_Test_takePics(JNIEnv* env, jobject javaThis) { int framecount; log_message(Fonka girdi); //OPENING FILE** AVFormatContext *pFormatCtx; unsigned char r, g, b; int i,j; char* filename = /sdcard/do-beer-not-drugs.3gp; av_register_all(); // Open video file if(av_open_input_file(pFormatCtx, filename, NULL, 0, NULL)!=0) return -1; // Couldn't open file // Retrieve stream information if(av_find_stream_info(pFormatCtx)0) return -1; // Couldn't find stream information // Dump information about file onto standard error dump_format(pFormatCtx, 0, filename, 0); framecount = pFormatCtx-streams[0]-nb_frames; hist = malloc(framecount*sizeof(int*)); for (j = 0; j framecount; ++j) { hist[j] = malloc(sizeof(int)*64); // this is because we use 64-bin histogram} for (i = 0; i framecount; i++) { for (j = 0; j 64; j++) { hist[i][j] = 0; } } AVCodecContext *pCodecCtx; // Find the first video stream int videoStream; videoStream=-1; /*char info[40]; sprintf(info,i degeri = %d,pFormatCtx-nb_streams); log_message(info);*/ for(i=0; ipFormatCtx-nb_streams; i++){ if(pFormatCtx-streams[i]-codec-codec_type==CODEC_TYPE_VIDEO) { videoStream=i; break; }} if(videoStream==-1) return -1; // Didn't find a video stream AVCodec *pCodec; char info[40]; sprintf(info,i degeri = %d,pCodecCtx-codec_id); log_message(info); // Find the decoder for the video stream pCodec=avcodec_find_decoder(pCodecCtx-codec_id); if(pCodec==NULL) { fprintf(stderr, Unsupported codec!\n); return -1; // Codec not found} log_message(here1); // Open codec if(avcodec_open(pCodecCtx, pCodec)0) return -1; // Could not open codec log_message(here2); // Get a pointer to the codec context for the video stream pCodecCtx=pFormatCtx-streams[videoStream]-codec; //STORING THE DATA** ** AVFrame *pFrame; // Allocate video frame pFrame=avcodec_alloc_frame(); // Allocate an AVFrame structure AVFrame *pFrameRGB; pFrameRGB=avcodec_alloc_frame(); if(pFrameRGB==NULL) return -1; uint8_t *buffer; int numBytes; // Determine required buffer size and allocate buffer numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx-width, pCodecCtx-height); buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t)); // Assign appropriate parts of buffer to image planes in pFrameRGB // Note that pFrameRGB is an AVFrame, but AVFrame is a superset // of AVPicture avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx-width, pCodecCtx-height); //READING DATA** * int frameFinished; AVPacket packet; i=0; while(av_read_frame(pFormatCtx, packet)=0) { // Is this a packet from the video stream? if(packet.stream_index==videoStream) { // Decode video frame avcodec_decode_video(pCodecCtx, pFrame, frameFinished, packet.data, packet.size); // Did we get a video frame? if(frameFinished) { static struct SwsContext *img_convert_ctx; // Convert the image into RGB format if(img_convert_ctx == NULL) { int w = pCodecCtx-width; int h = pCodecCtx-height; img_convert_ctx = sws_getContext(w, h, pCodecCtx-pix_fmt, w, h, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); if(img_convert_ctx == NULL) { fprintf(stderr, Cannot initialize the conversion context!\n); exit(1);} } int ret = sws_scale(img_convert_ctx, pFrame-data, pFrame- linesize, 0, pCodecCtx-height, pFrameRGB-data, pFrameRGB-linesize); for (j = 0; j 3*pCodecCtx-height*pCodecCtx-width -3; j++) { r = (unsigned char) pFrameRGB-data[0][j]; g = (unsigned char) pFrameRGB-data[0][j+1]; b = (unsigned char) pFrameRGB-data[0][j+2]; r = (unsigned char) ((r 2) 0x30); g = (unsigned char) ((g 4) 0x0C); b = (unsigned char) ((b 6) 0x03); unsigned char h = (unsigned char)(r|g|b); hist[i][h]++; } // Save the frame to sdcard SaveFrame(pFrameRGB, pCodecCtx-width, pCodecCtx-height, ++i); } } // Free the packet that was allocated by av_read_frame av_free_packet(packet); } // Free the RGB image av_free(buffer); av_free(pFrameRGB); // Free the YUV frame av_free(pFrame); // Close the codec avcodec_close(pCodecCtx); // Close the video file av_close_input_file(pFormatCtx); int keyframecount; framecount=i;
Re: [android-developers] Re: Android 3.0 questions
Supposedly Motorola Xoom is coming out Feb 17 with Android 3.0. How that is going to work out we'll find out Feb 17. I can't imagine Google would allow a half baked 3.0 go out the door just for Motorola to meet it's desired ship date. On Sat, Feb 5, 2011 at 8:12 AM, Mark Murphy mmur...@commonsware.com wrote: On Sat, Feb 5, 2011 at 11:08 AM, chcat vlyamt...@gmail.com wrote: Any idea if that part is functional in Gingerbread Considering that it is not in Gingerbread, I doubt that it is functional. or when Honycomb might be available for Nexus? Nobody knows. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.4 Available! -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Will this action bar navigation mode be there: NAVIGATION MODE DROPDOWNLIST
Here is some sample code, images of various actionbar modes, and a downloadable sample project. http://www.satyakomatineni.com/item/3624 On Sat, Feb 5, 2011 at 1:21 PM, Satya Komatineni satya.komatin...@gmail.com wrote: Looks like the value for both NAVIGATION_MODE_LIST NAVIGATION_MODE_DROPDOWN_LIST appears to be the same. The only affect of setting one mode or vs the other, (betweent these two modes), is wether to show the titles or not. I suppose those can be done through display options setting. Satya On Sat, Feb 5, 2011 at 12:58 PM, Satya Komatineni satya.komatin...@gmail.com wrote: I see this navigation mode in the API however not in the javadoc that is downloaded with honeycomb preview. Any thoughts which is more recent? Thanks Satya -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.com -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.com -- 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: app causes reboot on DroidX after activity gets destroyed - anybody having similar issues?
Update: My fantastically helpful DroidX user reports that the stripped down version works without a glitch. So there's hope. Unless it is some side-effect like a memory issue, I hope to establish cause and effect soon and will report here in case anybody else runs into something similar. -- 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: app causes reboot on DroidX after activity gets destroyed - anybody having similar issues?
No, this particular user didn't. On Feb 5, 5:38 am, String sterling.ud...@googlemail.com wrote: Do the users experiencing the problem have one of those other apps installed? The ones you're sending the intent to on exit. If so, it may be that it's this app causing the problem, not you. You're just triggering it. String -- 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: app causes reboot on DroidX after activity gets destroyed - anybody having similar issues?
No, this particular user didn't. On Feb 5, 5:38 am, String sterling.ud...@googlemail.com wrote: Do the users experiencing the problem have one of those other apps installed? The ones you're sending the intent to on exit. If so, it may be that it's this app causing the problem, not you. You're just triggering it. String -- 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: app causes reboot on DroidX after activity gets destroyed - anybody having similar issues?
No, this particular user didn't. On Feb 5, 5:38 am, String sterling.ud...@googlemail.com wrote: Do the users experiencing the problem have one of those other apps installed? The ones you're sending the intent to on exit. If so, it may be that it's this app causing the problem, not you. You're just triggering it. String -- 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] Dictionary for word game ..pls help :)
hi, i really need help. i am making a word game for college which uses words of length 4 to 7. i have a certain array of string containing words of length 4 -7.i have to check if those words are valid english words or not.i was earlier trying to implement database containing 4 tables each having all possible for word of length 4,5,6,7 which were being added by reading respective file of words i had made . But its taking way too much time to create database for any user to wait,and the app times out. so i started searching alternate ways..cant decide what should be done and is best considering my req. 1)trie for dictionary 2)hashset for storing words of each length of 4,5,6,7 (would using this be better than trie as i hv to access just words of length 4,5,6,7 only?) 3)some dictionary api(some preinstalled db whch i cud query) pls any help would be really appreciated what should be selected? i want to make an efficient game.pls suggest what should be done? thanx in advance :) -- 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
Re: [android-developers] Re: In app billing...
Ok, you two. Now I'm hungry for a donut while I'm doing my laundry! On Sat, Feb 5, 2011 at 10:10 AM, Kostya Vasilyev kmans...@gmail.com wrote: 05.02.2011 18:59, Maps.Huge.Info (Maps API Guru) пишет: I believe being able to provide refunds is important. When you go to a real-world store Since a user upgrading to a pro version isn't buying anything tangible, it's more like going into a donut shop, buying a donut and eating it. How many consumers ask for refunds at that point? Under some circumstances, a refund is called for but not in the same way as a consumer returning an unopened package that can be resold. That's a different type of product, more like a health potion in an RPG game. You might call it a virtual consumable. To me, issuing a refund for a software product is only to be done under some unusual circumstance not because of buyer remorse. The donut has been eaten and that's that. For a virtual consumable, yes. But I'm talking specifically about upgrading from lite to pro, which is not a consumable at all. It's the right to use the software in a certain way, to repeatedly perform certain tasks, and is more like buying... hmm... a microwave or a washing machine, not a donut. -John Coryat -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] converting to regular java
How hard is it usually to convert an Android app to regular Java that will run on a PC? Is there an automatic way to do this so I can release my Android games for PC and Mac and Linux easily? -- 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: Where to put a broadcast receiver for a widget
If the widget initialization requires some calls to registerReceiver() passing a null pointer to get the values where is the best place to be doing this. In my case, I am maintaining Application state in an Application subclass. In a sense my whole widget application has a state. The state depends on some values that I can only get by calling registerReceiver() passing the null value. The docs indicate that not much processing should go on in the Application.onCreate() method so I am not sure if this is the right place to do the initialization. On the other hand it seems like keeping Wdiget Application State in the App subclass is the right place for it,. (I also have services, and activities associated with the Widget). Where should the application state for a Widget be maintained? In the Application subclass or in the Widget itself. I have decided to put the state of the App Widget in an app subclass but not sure if this is right, given I can't very well initialize everyting in the Application.onCreate() method. On Feb 4, 5:08 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Feb 4, 2011 at 1:13 AM, Jeffrey jeffisagen...@gmail.com wrote: Okay, figured it out. I guess I can't have anything from the AppWidgetProvider class activate a registerReceiver so I have to make a service to do it. I don't keep it running, just launch it to update everything then it dies. If the Context passed into your onReceive() method is named ctxt, use: ctxt.getApplicationContext().registerReceiver(null, myIntentFilter); Then, you won't need service and extra overhead of starting it up. I just remembered that I had a blog post on this: http://commonsware.com/blog/2010/09/12/real-use-getapplicationcontext... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android -- 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
Re: [android-developers] Re: Where to put a broadcast receiver for a widget
On Sat, Feb 5, 2011 at 5:19 PM, AndroidDevTime androiddevd...@gmail.com wrote: Where should the application state for a Widget be maintained? In the Application subclass or in the Widget itself. Neither. Ideally, an app widget has no state outside of data you maintain for your application as a whole, which hopefully is in a database or some other persistent store. The Widget itself has no meaning. If you mean AppWidgetProvider, it lives for milliseconds. If you mean the RemoteViews, they are read-only, and so you cannot store state in them to be read out later. The Application object will live only as long as your process lives, which could be for the same number of milliseconds that the AppWidgetProvider instance lives. Hence, anything related to an app widget that you want to live for more than an eye-blink should be in a persistent store or be re-retrievable from the OS. If you want to cache stuff in an Application object or static data members, in the off chance your process sticks around long enough to be useful, that's cool, just watch out for garbage collection issues. I have decided to put the state of the App Widget in an app subclass but not sure if this is right, given I can't very well initialize everyting in the Application.onCreate() method. Anything slow enough to cause a problem probably should be processed by an IntentService, or possibly an AsyncTask kicked off by the Application (I have never tried an Application-spawned AsyncTask). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.3 Programming Books: http://commonsware.com/books -- 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 Keep Widget Application Status/State
I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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] How to Keep Widget Application Status/State
I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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: converting to regular java
Well, someone could always come up with a port of the Android emulator to native Windoze/Mac/Linux, and then it would be easy. Otherwise, the UI, as usual, is the bottleneck. On Feb 5, 3:19 pm, bob b...@coolgroups.com wrote: How hard is it usually to convert an Android app to regular Java that will run on a PC? Is there an automatic way to do this so I can release my Android games for PC and Mac and Linux easily? -- 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
Re: [android-developers] How to Keep Widget Application Status/State
You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
Ok. Lets say that it goes into a static singleton, and say the status is level2 and the application/widget gets shutdown. I suppose I would need to implement a saveState() method on the singleton, and detect this shutdown somewhere so I could recover the correct state? I don't think there is any method on the Application that is guaranteed to get called during such a shutdown. There is terminate method but this is not really called for sure. The widget is long running, so where would be the best place to save off the application status/state during shutdown? or when process gets killed. Thanks On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. Are you referring to keeping a Context reference inside the singleton? If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Keep Widget Application Status/State
What is the advantage of using lazy initialize Java Singleton vs. using subclass of application as the Singleton itself? Since we already have getApplication() available in most places On Feb 5, 3:03 pm, Kostya Vasilyev kmans...@gmail.com wrote: You can use a lazy initialize Java Singleton, where you pass in a context in case one is needed to recreate state. If you need to keep a context reference, make sure to call getApplicationContext and keep that instead, so you don't run into object lifetime issues and leak memory (in case that Context is an Activity or a Service, and it goes away before the process does). The stuff about not doing much in the application's onCreate I take to be more of an architectural suggestion than a real framework limitation, you can probably do as much there as in any other callback (e.g activity onCreate), subject to ANR timeouts. -- Kostya Vasilyev --http://kmansoft.wordpress.com 06.02.2011 1:38 пользователь AndroidDevTime androiddevd...@gmail.com написал: I have an Widget Application that also has Activities, and a heavily used Service full of functions. I would like to keep a global status for the application. This is app/widget specific state like say STARTED, LEVEL1, LEVEL2 etc, so since the status is referenced in the widget, the service, and activities I thought a static variable in an Application Subclass might be good. So my question is twofold. 1) Where should I keep such a state/status variable as a syncronized static variable in an application subclass? And 2) Its first initial value depends on reading some values by calling registerReceiver(null, intent) passing null for the receiver in order to obtain some system values. Where should I do this initialization. The Application.onCreate() docs indicate that not much should happen in this method. I am thinking in the Widget.update method can call getApplication and perform the registerReceiver operation and then update the static variable in the Applicaiton subclass. Is this the right place to initialize the application state? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Where to put a broadcast receiver for a widget
On Feb 5, 2:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Feb 5, 2011 at 5:19 PM, AndroidDevTime androiddevd...@gmail.com wrote: Where should the application state for a Widget be maintained? In the Application subclass or in the Widget itself. true, but what I was thinking is an app widget that is reflecting the application's state. Neither. Ideally, an app widget has no state outside of data you maintain for your application as a whole, which hopefully is in a database or some other persistent store. The Widget itself has no meaning. If you mean AppWidgetProvider, it lives for milliseconds. If you mean the RemoteViews, they are read-only, and so you cannot store state in them to be read out later. The Application object will live only as long as your process lives, which could be for the same number of milliseconds that the AppWidgetProvider instance lives. Alright, but what I really want is the app widget reflects the state of the app. It makes no sense for the Widget to store the app state off for the app to me. Perhaps the service, but then again it is really the state of the app, not the state of the widget (although the widget reflects it), nor is it the state of the service. So the point is each component needs to reference the application level status state, (even if it just needs it for few milliseconds), and yes it needs to be stored, but it also needs to be kept in a synced/singleton manner at all times. Hence, anything related to an app widget that you want to live for more than an eye-blink should be in a persistent store or be re-retrievable from the OS. If you want to cache stuff in an Application object or static data members, in the off chance your process sticks around long enough to be useful, that's cool, just watch out for garbage collection issues. I have decided to put the state of the App Widget in an app subclass but not sure if this is right, given I can't very well initialize everyting in the Application.onCreate() method. registerReceiver(null, Intent) would be under 5 seconds for sure? I have not seen any guarantees related to android functions. Anything slow enough to cause a problem probably should be processed by an IntentService, or possibly an AsyncTask kicked off by the Application (I have never tried an Application-spawned AsyncTask). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 2.3 Programming Books:http://commonsware.com/books -- 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] Looking for L10nDemo sample
The localization draft article at http://groups.google.com/group/android-developers/web/localizing-android-apps-draft is a nice reference. There is a sample connected to the article, but I can't seem to get it. I get error messages when I try to access L10nDemo.zip. The other files that are associated with the article are available, but the source archive is not. I've tried to find the archive using my favorite search engine and all the hits point back to the file on Google Groups. Does someone have this file that they can share? 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] Application Shutdown
I would like to handle application shutdown gracefully. Whether the user ends the application or the system decides the kill the process, I want to know the best place to put hooks in the application to detect and handle this. I know that application level components have lifecycle methods the conform to system events, but I really want the best practice on this at the application level. This is after all an application level shutdown, so i want an app level(not just component level) handling. Not really sure where to put the global app shutdown code: In Application.terminate() ?: Not really guaranteed to get called. In a service?: I have n services. In an activity? : ok but just for the view data. The only thing I can think is to have a service dedicated to this shutdown activity manage the application level data, but I don't really want to start a service at a time when my app is getting shutdown perhaps for resource consumption. Perhaps one could just let each component deal with it, however I have shared data/state (that is not a preference) across the components, and I see no reason why one of those components other than the application (subclass) should be dealing with application global data management. 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
Re: [android-developers] Application Shutdown
On Sat, Feb 5, 2011 at 8:57 PM, AndroidDevTime androiddevd...@gmail.com wrote: I would like to handle application shutdown gracefully. There is no such concept as application shutdown in Android. Whether the user ends the application or the system decides the kill the process, I want to know the best place to put hooks in the application to detect and handle this. There are none. Design your app such that you don't care about application shutdown, whatever you consider that to be. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- 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: Application Shutdown
Save data when the user's no longer interacting with it. And even when they are. As you point out, there are no guaranteed callbacks. The system assumes that if you're idle, you can be killed. On Feb 5, 8:57 pm, AndroidDevTime androiddevd...@gmail.com wrote: I would like to handle application shutdown gracefully. Whether the user ends the application or the system decides the kill the process, I want to know the best place to put hooks in the application to detect and handle this. I know that application level components have lifecycle methods the conform to system events, but I really want the best practice on this at the application level. This is after all an application level shutdown, so i want an app level(not just component level) handling. Not really sure where to put the global app shutdown code: In Application.terminate() ?: Not really guaranteed to get called. In a service?: I have n services. In an activity? : ok but just for the view data. The only thing I can think is to have a service dedicated to this shutdown activity manage the application level data, but I don't really want to start a service at a time when my app is getting shutdown perhaps for resource consumption. Perhaps one could just let each component deal with it, however I have shared data/state (that is not a preference) across the components, and I see no reason why one of those components other than the application (subclass) should be dealing with application global data management. 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 + scrolling
WebView is not final class, so yes you can extend from WebView. On 5 фев, 12:31, sagar masuti sagar@gmail.com wrote: Hi Mark, I have implemented a class named WidgetView.java which extends from FrameLayout. This acts as a container for Webview.In my class I handle the touch events according to my specific requirements. Now when i remove FrameLayout and use some other layout I am not able to display any content. Could you please suggest a way wherein I can display the contents and also handle the touch events as per my requirements. Is it possible for me to extend my WidgetView.java class directly from WebView.java.Any pointers will be highly appreciated. Thanks in advance. Regards, Sagar On Fri, Feb 4, 2011 at 3:13 AM, Mark Murphy mmur...@commonsware.com wrote: On Wed, Feb 2, 2011 at 5:42 AM, sagar masuti sagar@gmail.com wrote: I am trying to embedded a webview in a framelayout. my launch.xml is as shown below. FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent WebView android:id=@+id/webview android:layout_width=fill_parent android:layout_height=fill_parent/ /FrameLayout Why do you have a FrameLayout? Why do you have android:orientation=vertical in your FrameLayout, considering that FrameLayout does not honor that attribute? I have implemented the WebChromeClient and WidgetViewClient. That's WebViewClient. I have implemented the onTouchEvent and passing the touch events to the WebView. That seems unlikely to work well. The problem i am facing is am not able to scroll inside the webview. For example, the content is some 5 lines then am able to see only 3 lines and not able to scroll. The touch events go to Webview, first action_down and then action_move, am not able to get what wrong am doing?? You are assuming that WebView is like any other widget. It is not. It is implemented via WebKit, which has its own notions of event handling that may or may not blend well with your own touch event handling. What are you trying to achieve by intercepting the touch events? Since WebView knows how to scroll on its own, I would recommend you simply get rid of the FrameLayout and your own touch handling, and let WebView do what it does naturally. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2 -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Changing audio path to earpiece from speakerphone
I have seen this question answered before in this group. Do a search on it. I think the answer was 'no'. The reason it cannot be done (or at least cannot be done simply) is that the phone's in-call audio and its multi-media audio are considered separate paths, the former is carefully guarded against tampering. But rather than rely on my answer, do the search: just don't be too disappointed if you find that the only way to do it is to modify the phone application software on your own ROM. On Feb 4, 3:25 am, golemnagesh nagesh.go...@pradhamas.com wrote: Hello Experts , I am developing an application which needs to play an audio file when call gets connected to callee, if callee lift that call i need to play song automatically, and should be disconnected after song playing done.. please help me guys if you know about this issue...thank you in advance.. -- 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: Dictionary for word game ..pls help :)
Have you considered Sqlite? I'm using it in a speeling app I'm developing. Jerry On Feb 5, 3:36 pm, nivedita arora vivaciousnived...@gmail.com wrote: hi, i really need help. i am making a word game for college which uses words of length 4 to 7. i have a certain array of string containing words of length 4 -7.i have to check if those words are valid english words or not.i was earlier trying to implement database containing 4 tables each having all possible for word of length 4,5,6,7 which were being added by reading respective file of words i had made . But its taking way too much time to create database for any user to wait,and the app times out. so i started searching alternate ways..cant decide what should be done and is best considering my req. 1)trie for dictionary 2)hashset for storing words of each length of 4,5,6,7 (would using this be better than trie as i hv to access just words of length 4,5,6,7 only?) 3)some dictionary api(some preinstalled db whch i cud query) pls any help would be really appreciated what should be selected? i want to make an efficient game.pls suggest what should be done? thanx in advance :) -- 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: Application Shutdown
Ok. In the particular case of a global (application level) shared static variable accessed via a singleton, that I want to be able to recover. Should I have this store this every time it gets updated in a single method call. for example public synchronized Singleton{ // derived from Application or just global singleton. updateSharedVariable(String val){ this.value=val; // here update value in shared preferences } } On Feb 5, 6:01 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Feb 5, 2011 at 8:57 PM, AndroidDevTime androiddevd...@gmail.com wrote: I would like to handle application shutdown gracefully. There is no such concept as application shutdown in Android. Whether the user ends the application or the system decides the kill the process, I want to know the best place to put hooks in the application to detect and handle this. There are none. Design your app such that you don't care about application shutdown, whatever you consider that to be. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android -- 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: Application Shutdown
Also what is the earliest point/hook in the code where I can begin to store in SharedPreferences? Can I access in Application.create()? On Feb 5, 6:03 pm, Hari Edo hari@gmail.com wrote: Save data when the user's no longer interacting with it. And even when they are. As you point out, there are no guaranteed callbacks. The system assumes that if you're idle, you can be killed. On Feb 5, 8:57 pm, AndroidDevTime androiddevd...@gmail.com wrote: I would like to handle application shutdown gracefully. Whether the user ends the application or the system decides the kill the process, I want to know the best place to put hooks in the application to detect and handle this. I know that application level components have lifecycle methods the conform to system events, but I really want the best practice on this at the application level. This is after all an application level shutdown, so i want an app level(not just component level) handling. Not really sure where to put the global app shutdown code: In Application.terminate() ?: Not really guaranteed to get called. In a service?: I have n services. In an activity? : ok but just for the view data. The only thing I can think is to have a service dedicated to this shutdown activity manage the application level data, but I don't really want to start a service at a time when my app is getting shutdown perhaps for resource consumption. Perhaps one could just let each component deal with it, however I have shared data/state (that is not a preference) across the components, and I see no reason why one of those components other than the application (subclass) should be dealing with application global data management. 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