[android-developers] Database error
Hi all, I am creating a database to store the list of earthquakes as an update to my existing app. I am receiving an error with the following caused by statement: Caused by: android.database.sqlite.SQLiteException: near ,: syntax error: create table earthquakes (_id integer primary key autoincrement, date INTEGER, details TEXT, latitude FLOAT, longitude FLOAT, magnitude FLOAT), link TEXT); My SQL statement is: private static class earthquakeDatabaseHelper extends SQLiteOpenHelper { private static final String DATABASE_CREATE = create table + EARTHQUAKE_TABLE + ( + KEY_ID + integer primary key autoincrement, + KEY_DATE + INTEGER, + KEY_DETAILS + TEXT, + KEY_LOCATION_LAT + FLOAT, + KEY_LOCATION_LNG + FLOAT, + KEY_MAGNITUDE + FLOAT), + KEY_LINK + TEXT);; As far as I can see the statement is fine. Please help. Thanks -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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: Can somebody give me a Google+ invitation?
Fei, please come and join Google+ (Is this good enougn invitation? :-) ) -- Ali Chousein Geo-Filtered Assistant http://geo-filtered-assistant.blogspot.com/ Cisco Android marketplace (Chosen for Cisco Cius) https://marketplace.cisco.com/apphq/products/510 On Jul 8, 1:07 pm, fei wang philip584...@gmail.com wrote: Thank all of you! -- 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: Database error
UPDATE: I fixed it. I had a typo in the create statement. I accidentally added a bracket after on of the floats. On Sat, Jul 9, 2011 at 12:17 PM, Raghav Sood raghavs...@gmail.com wrote: Hi all, I am creating a database to store the list of earthquakes as an update to my existing app. I am receiving an error with the following caused by statement: Caused by: android.database.sqlite.SQLiteException: near ,: syntax error: create table earthquakes (_id integer primary key autoincrement, date INTEGER, details TEXT, latitude FLOAT, longitude FLOAT, magnitude FLOAT), link TEXT); My SQL statement is: private static class earthquakeDatabaseHelper extends SQLiteOpenHelper { private static final String DATABASE_CREATE = create table + EARTHQUAKE_TABLE + ( + KEY_ID + integer primary key autoincrement, + KEY_DATE + INTEGER, + KEY_DETAILS + TEXT, + KEY_LOCATION_LAT + FLOAT, + KEY_LOCATION_LNG + FLOAT, + KEY_MAGNITUDE + FLOAT), + KEY_LINK + TEXT);; As far as I can see the statement is fine. Please help. Thanks -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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] Update widget(s) after application changes
Hi, I have an application that includes a couple of widgets. During development, I place the widgets on the homescreen of the emulator and start developing. When I'm working in Eclipse, and I'm pushing a new version of my app to the emulator, I sometimes have the impression that the widgets are becoming stale. Breakpoints that were on the widgets code don't appear to be active anymore (don't have the v marker), and the debugger doesn't suspend on them. When I remove the widget and I place it on the homescreen again, the breakpoint becomes active and the debugger starts suspending again. Is that something you need to take into account when developing widgets ? Also, when I push a new version of my app on the market, and my users already had the widgets on the homescreen, are they advised to refresh them by removing / adding them again ? Regards, Davy -- 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: Romain Guy/Diane Help!
Market questions don't usually get an official response here but I guess it is as good a place as any. I would have thought / hoped you had better support options. Does anyone know if Don’t worry, you won’t be creating a duplicate, the apps are exactly the same and the updated version will simply replace your existing one. is true? I have always thought preloaded apps updated via the market used up twice the space since you can uninstall updates and go back to firmware version. On Jul 9, 5:41 am, Matthew Powers mtpow...@gmail.com wrote: We are the ones handling the updates, and I am just looking for some insight from people who have delivered preinstalled apps. If this is not the forum to do so then I apologize. On Sat, Jul 9, 2011 at 12:33 AM, String sterling.ud...@googlemail.comwrote: First, I believe that blog post is wrong, at least for modern versions of Android. I never used the workaround they describe, and I get plenty of updates for preinstalled apps. Second, if your app's preinstalled you must have a contact at Toshiba. Can't they help you push updates? 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 -- 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: Question about the values of the Audio Buffer
On Jul 7, 12:53 pm, jdarladimas jdarladi...@gmail.com wrote: Do you happen to know what the negative vanues mean and what does each buffer element represent? Is it a specific audio frequency? You should read up on PCM audio data to know what to do with it (Google it). At this point, it's no longer an Android issue because PCM is used everywhere in the world of audio. Doug -- 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: MediaPlayer - Streaming
Is that URL a streamable media file playable by Android? It doesn't look like that to me. Doug On Jul 7, 1:51 am, Thanh Le Cong thanh...@gmail.com wrote: Hello Everybody, I want to use MediaPlayer play a file mp3 or video with Streaming. I have code: try { String path = http://codpro.tk/test.mp3;; mediaPlayer = new MediaPlayer(); mediaPlayer.setDataSource(path); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.prepare(); mediaPlayer.start(); } catch (Exception e) { Toast.makeText(PlayLocalFiles.this, e.getMessage(), Toast.LENGTH_LONG); txtStatus.setText(e.getMessage()); } I got error message: Prepare failed.: status=0x1. I have been search for slove it and repair it. But I didn't solve the problem yet. Could you please help me? Thank you, -- Thanh, Le Cong http://fit.utehy.edu.vn/codepro -- 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: Galaxy Tab and Market filtering
On Jul 7, 11:47 pm, nadam a...@anyro.se wrote: The old Galaxy Tab 7 is said to be a large mdpi device but it uses hdpi drawables. Yup. That's how they implemented it, and it kind of sucks. You can Google this for more info. My advice is not to sweat this one and let your app look bad on that device. Doug -- 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 can Button clicks be sent to a View that has been disabled?
What is do some stuff doing? When you make changes to the UI, they don't commit until after the current batch of code fully completes on the UI thread. In your case, do some stuff will execute prior to the button being disabled. So if you're doing some lengthy stuff in there, the user might have the chance to click the button again before it gets disabled. Doug On Jul 6, 5:31 pm, William Ferguson william.ferguson...@gmail.com wrote: I'm finding that some of my users are occasionally getting a button firing twice in rapid succession (less than 100 millis) even though the first thing the handler does is to disable the button. ie button.addOnClickListener(new OnClickListener() { public void onClick(View view) { button.setEnabled(false); // do some stuff. } }); Is this expected behaviour? Ie that the InputEvents (button clicks) stack and will be sent to a View even though the View is disabled? William -- 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] Update widget(s) after application changes
There are two issues here. One is, what happens to widgets when the application package is updated (during development or via a Market update). The way it's supposed to work is that all widgets get a chance to update via onUpdate. In practice, I've seen onUpdate get called, but the widget not reflecting the update, and stopping to function (not responding to clicks, the UI getting reset, etc.) on one device from a major company, out of the three I have. So for updates - there no need to instruct the users to always recreate your widgets, but it can be necessary on some devices. Two is debugging. I haven't seen this - but I'd check the DDMS perspective to make sure that the process actually connects to the Eclipse debugger (there is a bright green bug icon next to the process). Other than that, widgets are broadcast receivers, and as such, give you a very short time window once you've hit a breakpoint. If you spend more than a few seconds on a breakpoint that is triggered by onReceive, the process will get killed by Android, and lose the debugger connection. -- Kostya 09.07.2011 11:19, Davy пишет: Hi, I have an application that includes a couple of widgets. During development, I place the widgets on the homescreen of the emulator and start developing. When I'm working in Eclipse, and I'm pushing a new version of my app to the emulator, I sometimes have the impression that the widgets are becoming stale. Breakpoints that were on the widgets code don't appear to be active anymore (don't have the v marker), and the debugger doesn't suspend on them. When I remove the widget and I place it on the homescreen again, the breakpoint becomes active and the debugger starts suspending again. Is that something you need to take into account when developing widgets ? Also, when I push a new version of my app on the market, and my users already had the widgets on the homescreen, are they advised to refresh them by removing / adding them again ? Regards, Davy -- 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 -- 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: Galaxy Tab and Market filtering
Yup. They made it for a pretty good reason though. They tried using mdpi drawables, but so many apps simply looked better with hdpi drawables. Unfortunately, many developers still think that mdpi means 320x480. And many developers ignore tablets because they are expensive and the emulator is too slow. That's off-topic though. The topic of this thread is to find out how the Device Availability dialog in the Developer Console (and Android Market in general) deals with the compatible-screens tag. On 9 Juli, 10:51, Doug beafd...@gmail.com wrote: On Jul 7, 11:47 pm, nadam a...@anyro.se wrote: The old Galaxy Tab 7 is said to be a large mdpi device but it uses hdpi drawables. Yup. That's how they implemented it, and it kind of sucks. You can Google this for more info. My advice is not to sweat this one and let your app look bad on that device. Doug -- 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 display the current date in TextView
I am new to android can any say me how to display the current date in TextView? i tried but it displays both time and date in the TextView. -- 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 not visible from Android Market on the device
Android Market has behaved a bit strangely lately. I uploaded an update to one of my apps as well as an updated screenshot. The screenshot got updated immediately on the market while the app took some hours to appear. On 7 Juli, 20:31, Manuel R. Ciosici manuelrcios...@gmail.com wrote: All of a sudden the app is visible again, I haven't received any reply from Google though... Manuel On Jul 7, 3:01 pm, Manuel R. Ciosici manuelrcios...@gmail.com wrote: @TreKing Thank you for the reply. Interesting read, but doesn't apply in my case. In the meantime also sent an email to Android market support, maybe they have a explanation. Manuel On Jul 7, 2:45 pm, TreKing treking...@gmail.com wrote: http://www.google.com/support/androidmarket/developer/bin/static.py?p... See Can't Find App (and Applications Missing From Android Market - though not exactly your use case). These reeks of another Android Market Screw Up™ --- -- 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] How to get device version number programmatically
Hi All, We can get the model of the device using android.os.Build.MODEL My question is how do we get the device version? -- Best Regards, Suraj Gopalakrishnan -- 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 display the current date in TextView
This has nothing to do with Android. http://exampledepot.com/egs/java.text/FormatDate.html On Sat, Jul 9, 2011 at 6:07 AM, muthumani ct.muthum...@gmail.com wrote: I am new to android can any say me how to display the current date in TextView? i tried but it displays both time and date in the TextView. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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 get device version number programmatically
Devices don't have versions. On Sat, Jul 9, 2011 at 6:26 AM, Suraj Gopalakrishnan suraj...@gmail.com wrote: Hi All, We can get the model of the device using android.os.Build.MODEL My question is how do we get the device version? -- Best Regards, Suraj Gopalakrishnan -- 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- 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 get device version number programmatically
Then, what does TelephonyManager.getDeviceSoftwareVersion() return? Best Regards, Suraj Gopalakrishnan -- 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] Unable to run the streaming video - URGENT CRITICAL
On Jul 8, 2011 12:20 PM, BZ zaverch...@gmail.com wrote: Its urgent and critical no, it isn't. -- 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 get device version number programmatically
On Sat, Jul 9, 2011 at 6:47 AM, Suraj Gopalakrishnan suraj...@gmail.com wrote: Then, what does TelephonyManager.getDeviceSoftwareVersion() return? First, that refers to software, not hardware. Devices are hardware. Device software is software. Hardware is not software. Software has versions, which may change over the life of the device. Devices have models, which do not change over the life of the device. Second, the documentation for that method states: Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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] NEED HELP TO SHOW DIALOG
HELLO FRIENDS, I AM FRESHER AND I HAVE A DIFFICULTY FOR DEVELOPMENT... I HAVE MADE A APPLICATION WITH LOGIN PAGE, HOME PAGE DATA LIST PAGE,... ONCE I LOGIN AFTER THAT I WILL RUN A THREAD IN BACK GROUND WHEN IT COMPLETE I WANT TO SEE ITS DONE ALERT( DIALOG ).. EVEN I MAY BE SEE PAGE HOME OR DATA LIST . PLEASE HELP ME HOW TO DO THIS THANKS Regards, *Shailesh Mistry* -- 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: Can somebody give me a Google+ invitation?
ROFLMAO omg hillarious ! On Sat, Jul 9, 2011 at 11:58 AM, Ali Chousein ali.chous...@gmail.comwrote: Fei, please come and join Google+ (Is this good enougn invitation? :-) ) -- Ali Chousein Geo-Filtered Assistant http://geo-filtered-assistant.blogspot.com/ Cisco Android marketplace (Chosen for Cisco Cius) https://marketplace.cisco.com/apphq/products/510 On Jul 8, 1:07 pm, fei wang philip584...@gmail.com wrote: Thank all of you! -- 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
Re: [android-developers] How to get device version number programmatically
I would like to apologize for the tone of my previous reply -- it was uncalled for. On Sat, Jul 9, 2011 at 7:10 AM, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 9, 2011 at 6:47 AM, Suraj Gopalakrishnan suraj...@gmail.com wrote: Then, what does TelephonyManager.getDeviceSoftwareVersion() return? First, that refers to software, not hardware. Devices are hardware. Device software is software. Hardware is not software. Software has versions, which may change over the life of the device. Devices have models, which do not change over the life of the device. Second, the documentation for that method states: Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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 get device version number programmatically
Thats OK Mark and thanks for the info :) On Sat, Jul 9, 2011 at 4:59 PM, Mark Murphy mmur...@commonsware.com wrote: I would like to apologize for the tone of my previous reply -- it was uncalled for. On Sat, Jul 9, 2011 at 7:10 AM, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 9, 2011 at 6:47 AM, Suraj Gopalakrishnan suraj...@gmail.com wrote: Then, what does TelephonyManager.getDeviceSoftwareVersion() return? First, that refers to software, not hardware. Devices are hardware. Device software is software. Hardware is not software. Software has versions, which may change over the life of the device. Devices have models, which do not change over the life of the device. Second, the documentation for that method states: Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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 -- Best Regards, Suraj Gopalakrishnan -- 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] Localization
hi , i want to make button when i press it ... the app language will change without need to close the app and open it again can i do this step ??? -- 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: EditText and the unwanted Quick Search Box
I believe that I've come up with a work-around - at least in my case. I don't know why this works, but the problem hasn't reappeared in the last month after making these changes. The app has TTS and Voice Recognition. I was doing all the setup by creating an asynctask from the onCreate of the main activity. In an act of pure desperation, I moved the instantiation of the asynctask into a runnable that I executed with delay of approx 100ms. I have no idea why this worked, but apparently the create was able to finish and whatever was confusing the EditText seems to have gone away. While I'm not confident that this will work in all cases (or if I just got lucky), if you are still having difficulty, try moving whatever system altering/registering tasks otherwise done in the onCreate and see if that helps. While the following code snippets aren't going to be particularly relevant to your app, I'm including them for the sake of example. * At the end of onCreate* // Feeble Attempt to fix google qsb issue Handler handler = new Handler(); handler.postDelayed(new Runnable() { public void run() { new InitialLoads().execute(); } }, 100); * The AsyncTask that gets called * private class InitialLoads extends AsyncTaskVoid, Void, Void { @@Override protected Void doInBackground(Void... arg0) { PackageManager pm = getPackageManager(); /* establish whether the TextToSpeech class is available to us */ // static { try { WrapTTS.checkAvailable(); mTTSClassAvailable = true; } catch (Throwable t) { mTTSClassAvailable = false; } // } if (mTTSClassAvailable) { Intent checkIntent = new Intent(); checkIntent .setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); // Check intent to make sure TTS can be satisfied. Then start // the activity if it is OK to proceed. ResolveInfo resolveInfo = pm.resolveActivity(checkIntent, PackageManager.MATCH_DEFAULT_ONLY); if (resolveInfo == null) { // Not able to find the activity which should be started for // this intent } else { startActivityForResult(checkIntent, REQUEST_TTSOK); } } // Check to see if a recognition activity is present ListResolveInfo activities = pm.queryIntentActivities(new Intent( RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0); mVoiceAvailable = activities.size() 0; if (!Constants.IsProduction) { // Force voice available on the emulators mVoiceAvailable = true; } // For use with preference screen AdvPreferences.INSTANCE.setVoiceAvailable(mVoiceAvailable); return null; } } Best of Luck. -- 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] My Anti Cracking Function
Hello everyone, I am placing next my anti-cracking\anti-reverse- engineering function. The idea of sharing this function is to allow other developers to get its benefits, and also to get more ideas for improvement, and even though exposing it to hackers makes it weaker, the idea is also that the function should be tempered by developers before using it instead of just copy/paste, and even split it into several functions to be called across your application. At the end if a hacker wants to crack your app, he will, but sure we can make it a bit harder. For the CRC validation performed in the function follow the next steps: Export a signed package of your application the same as if you would be getting ready to publish it. Rename the file extention .apk to .zip, extract the classes.dex file. Then use any internet CRC calculator tool with the extracted classes.dex file, you can find many in google (i.e.: http://www.createwindow.com/programming/crc32/crcfile.htm) Copy the obtained CRC value, go back to your IDE and open any layout xml file, place this value as the tag of any element (i.e.: android:tag=d7abbe13). Though you can really store the CRC value into other ways as an asset file, etc. I encrypt this value before passing it and decrypt it at runtime so is even harder for the hacker by not allowing him just to copy his CRC value if he finds its location. The idea is that before calling the function you should get back the CRC value and pass it. Is very important that you do not copy the CRC value into any of your java code, if after the CRC calculation you temper on any way with your code the CRC value will change and you will need to star this process again. Finally you only need to export the signed application again. The CRC will still reamin the same for the classes.dex, but somewhere hidden in your layouts you will have your CRC value to be validated by the function. As final note when developing the application do not call this function or you will get crazy :) So any comments and new ideas? /** * Validates the application integrity against reverse engineering. * If the validation fails the the application is terminated automatically without warning. * * @param context *Application context used for operations * * @param applicaionPackageName *Original application package name, you should hard-code \encrypt this string and then pass it to this function un-encrypted, do not use the java api to get this value. * * @param applicationCrc *Application CRC value */ public static void dapplicationIntegrityCheck(final Context context, final String applicaionPackageName, final String applicationCrc) { // Check that the application package name has not changed if (applicaionPackageName != context.getPackageName()) { android.os.Process.killProcess(android.os.Process.myPid()); } // Check that the debuggable flag is set to False try { if (0 != (context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).applicationInfo.flags = ApplicationInfo.FLAG_DEBUGGABLE)) { android.os.Process.killProcess(android.os.Process.myPid()); } } catch (Exception ex) { Log.e(HelperFunctions, Error checking debuggable flag., ex); } // Check that the debugger is not connected if (Debug.isDebuggerConnected()) { android.os.Process.killProcess(android.os.Process.myPid()); } // CRC validation try { ZipFile zipFile = new ZipFile(context.getPackageCodePath()); ZipEntry zipEntry = zipFile.getEntry(new String(Common.CLASS_DEX)); if (zipEntry.getCrc() != Long.parseLong(applicationCrc)) { android.os.Process.killProcess(android.os.Process.myPid()); } zipEntry = null; zipFile = null; } catch (Exception ex) { Log.e(HelperFunctions, Error checking crc., ex); } // TO-DO: // Check that the application name has not changed // Keep an encrypted string constant of the application name and the compare it // with the application name string using the proper function to retrieve 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] My anti-cracking \ anti-reverse-engineering function
Hello everyone, I am placing next my anti-cracking\anti-reverse- engineering function. The idea of sharing this function is to allow other developers to get its benefits, and also to get more ideas for improvement, and even though exposing it to hackers makes it weaker, the idea is also that the function should be tempered by developers before using it instead of just copy/paste, and even split it into several functions to be called across your application. At the end if a hacker wants to crack your app, he will, but sure we can make it a bit harder. For the CRC validation performed in the function follow the next steps: Export a signed package of your application the same as if you would be getting ready to publish it. Rename the file extention .apk to .zip, extract the classes.dex file. Then use any internet CRC calculator tool with the extracted classes.dex file, you can find many in google (i.e.: http://www.createwindow.com/programming/crc32/crcfile.htm) Copy the obtained CRC value, remember to convert this value to a Long, as most of the these tools give you the value in HEX format. Go back to your IDE and open any layout xml file, place this value as the tag of any element (i.e.: android:tag=4212136116). Though you can really store the CRC value into other ways as an asset file, etc. I encrypt this value before passing it and decrypt it at runtime so is even harder for the hacker by not allowing him just to copy his CRC value if he finds its location. The idea is that before calling the function you should get back the CRC value and pass it. Is very important that you do not copy the CRC value into any of your java code, if after the CRC calculation you temper on any way with your code the CRC value will change and you will need to star this process again. Finally you only need to export the signed application again. The CRC will still reamin the same for the classes.dex, but somewhere hidden in your layouts you will have your CRC value to be validated by the function. As final note when developing the application do not call this function or you will get crazy :) So any comments and new ideas? /** * Validates the application integrity against reverse engineering. * If the validation fails the the application is terminated * automatically without warning. * * @param context *Application context used for operations * * @param applicaionPackageName *Original application package name, you should *hard-code\encrypt this string and then pass it to this function un-encrypted, *do not use the java api to get this value. * * @param applicationCrc *Application CRC value */ public static void dapplicationIntegrityCheck(final Context context, final String applicaionPackageName, final String applicationCrc) { // Check that the application package name has not changed if (applicaionPackageName != context.getPackageName()) { android.os.Process.killProcess(android.os.Process.myPid()); } // Check that the debuggable flag is set to False try { if (0 != (context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).applicationInfo.flags = ApplicationInfo.FLAG_DEBUGGABLE)) { android.os.Process.killProcess(android.os.Process.myPid()); } } catch (Exception ex) { Log.e(HelperFunctions, Error checking debuggable flag., ex); } // Check that the debugger is not connected if (Debug.isDebuggerConnected()) { android.os.Process.killProcess(android.os.Process.myPid()); } // CRC validation try { ZipFile zipFile = new ZipFile(context.getPackageCodePath()); ZipEntry zipEntry = zipFile.getEntry(new String(Common.CLASS_DEX)); if (zipEntry.getCrc() != Long.parseLong(applicationCrc)) { android.os.Process.killProcess(android.os.Process.myPid()); } zipEntry = null; zipFile = null; } catch (Exception ex) { Log.e(HelperFunctions, Error checking crc., ex); } // TO-DO: // Check that the application name has not changed. // Keep an encrypted string constant of the application // name and then compare it with the application // name string using the proper function to retrieve 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
Re: [android-developers] Localization
I don't know if there is a better way to do it. You could have an amazingly large number of setText();s for each and everything you want to change the text of. Thanks On Sat, Jul 9, 2011 at 5:57 PM, Ahmed Shoeib ahmedelsayed.sho...@gmail.comwrote: hi , i want to make button when i press it ... the app language will change without need to close the app and open it again can i do this step ??? -- 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 -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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] Invalidate only one map overlay
Hi, I'm doing my own MyLocationOverlay implementation to bypass extremely slow current position display. The problem that I've is that I want to make a little animation changing the color of the position marker and the only way I know to redraw is to call invalidate o MapView. But that way I also invalidate all the other overlays. Is there an efficient way if only I want to change color and other overlays don't need redraw? A lot of thanks in advance, PD: Is avaiable the current code of MyLocationOverlay? --- Joan Pujol Espinar www.joanpujol.cat -- 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] InApp Billing problems
Hi, I plan to use InApp billing to provide a premium version with some extra features and without ads. But I'm concerned of some problems reported here on the forum like thathttps://groups.google.com/d/topic/android-developers/soJCFObhfqk/discussion . I've been tracking some of that problems and seem to be solved. But for the ones that are using InApp billing, do you have problems yet? Or is working correctly by now? If there are still open issues, there are some to track? Cheers, --- Joan Pujol Espinar www.joanpujol.cat -- 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] InApp Billing problems
Joan, I'm seeing two somewhat serious issues right now. First, if an order doesn't go through on the first try (either incorrect credit card data, or the mysterious Google error where they are unable to process the transaction in a timely fashion), then the application will never receive a purchase complete notification. Google has been in the process of rolling out a fix for this since June 26. I'm not seeing as many cases in my application now as back then, so perhaps it's fixed to some extent, but at this time it's still on the known issues page: http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs Strangely enough, refund notifications go through immediately within a few seconds. Second, besides the first issue, some 3-5% of order notifications get lost. Asking the user to reinstall the app, which triggers a restore transactions operation, works every time (except in the first case, above). Some smaller issues are: the unable to process the transaction in a timely fashion error, misleading emails sent to the user when something goes wrong (the seller canceled your order for the above error - expect to get emails asking why you did that). -- Kostya 09.07.2011 18:13, Joan Pujol ?: Hi, I plan to use InApp billing to provide a premium version with some extra features and without ads. But I'm concerned of some problems reported here on the forum like that https://groups.google.com/d/topic/android-developers/soJCFObhfqk/discussion. I've been tracking some of that problems and seem to be solved. But for the ones that are using InApp billing, do you have problems yet? Or is working correctly by now? If there are still open issues, there are some to track? Cheers, --- Joan Pujol Espinar www.joanpujol.cat -- 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 -- 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] Help. I need to pull and eventually send a value via webview
OK. Awesome I will give it a try this week and let you know. I appreciate the help. On Fri, Jul 8, 2011 at 2:39 PM, Filip Havlicek havlicek.fi...@gmail.comwrote: To download the data, you can use either standard Java URL and URLConnection classes or the HttpClient from apache included in Android. Googling those classes should result in some decent hits. You can then parse the String to get the value and then pass the page to your WebView by calling it's loadData or loadDataWithBaseURL methods. 2011/7/8 Richard Diuk rickd...@gmail.com No, no I did not think of that. Mainly because I do not know how to do that. Is that done in a webview? Can you tell me what I am to google to learn how to do this or perhaps point me to some code or tutorial? Thanks for the help by the way. :) On Fri, Jul 8, 2011 at 6:40 AM, Filip Havlicek havlicek.fi...@gmail.comwrote: Did you consider just downloading the page and parsing the value manually (to get the value) and then providing the downloaded page to webview (to display the page)? 2011/7/7 Richard Diuk rickd...@gmail.com yes I need to display it and pull the hidden value. and i was just using an httpGet for supplying the other value back(but I'm really not set on any one method) On Thu, Jul 7, 2011 at 3:58 AM, Filip Havlicek havlicek.fi...@gmail.com wrote: Do you need to display the webpage? Or you are just interested in the value if the hidden input? How is the other value supposed to be sent back to the server, is it via javascript, is it a html form or something else? 2011/7/6 sabanim rickd...@gmail.com OK so it does not need to be webview but that's the closest I have gotten to solving my problem. (going on 2 weeks now). ok so right now I am using a webview to go and see a page. On that page is a hidden input tag with an id and value. I need to pull that value and use it in java. Eventually I need to send something also. I have this all working in a blackberry webworks app using javascript and ajax. I think I'm close but I cant seem to modify my code to get the right result. with this code I can get all the html on the page but not just the one thing I want. This is put into an alert. How do I get just the value and then how do I get it so the java will read it. client code: ~~~ public class button3 extends Activity{ WebView wb = null; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.buttons); wb = new WebView(this); wb.setWebViewClient(new HelloWebViewClient()); wb.getSettings().setJavaScriptEnabled(true); wb.addJavascriptInterface(new MyJavaScriptInterface(), HTMLOUT); /* WebViewClient must be set BEFORE calling loadUrl! */ wb.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { /* This call inject JavaScript into the page which just finished loading. */ wb.loadUrl(javascript:window.HTMLOUT.showHTML(document.getElementsByTagName('html').innerHTML);); } }); wb.loadUrl(http://www.whateverurl.com;); setContentView(wb); } private class HelloWebViewClient extends WebViewClient { public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } final Context myApp = this; class MyJavaScriptInterface { public void showHTML(String html) { new AlertDialog.Builder(myApp) .setTitle(Value of Hidden ID) .setMessage(html) .setPositiveButton(android.R.string.ok, null) .setCancelable(false) .create() .show(); } } ~~~ html code: ~~~ Lunchbrimg src='http://www.?/mimages/image002.jpg' style=width: 300px; brpinput type='hidden' id='sendtextcoupon' value='0' Do You SEE THIS/p ~~~ Any help would be great! -- 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,
[android-developers] Re: On CRC32, LVL and tamper-proof app
just in case anyone is interesting, I posted the my algorithm to avoid tempering of applications: http://groups.google.com/group/android-developers/browse_thread/thread/5e8f76ea5371f674/4637cbf1c42dfd22?lnk=gstq=crc#4637cbf1c42dfd22 On Jun 12, 11:02 pm, Kostya Vasilyev kmans...@gmail.com wrote: He can move to a different host at any time. Someone could file a DMCA notice with Blogger / Google, but at the same time, it seems useful to run his scripts on one's code, to see if it gets broken. -- Kostya 2011/6/13 String sterling.ud...@googlemail.com Wait... He's hosting this crap on BLOGGER?!? And we still can't get Google to shut the site down?? Wow. They care even less about Android piracy than I realized. 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 -- 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: My anti-cracking \ anti-reverse-engineering function
Good idea, but I can see immediately how anti-lvl can be adjusted to get around this with only a couple of lines of xml. I don't want to be dismissive of all the effort you've done here, but I've spent just as much time coming up with cunningly similar solutions only to see them broken by a single line of code added by a smali hack. So, to get around your issue, it simply requires you to stick this in the xml in anti-lvl: 1. Find a method in the app that accepts a Context, String, String as parameters 2. If this method includes a mention to getCrc() method of the class ZipEntry then continue. 3. Stick a return to the top of the method. I'm deliberately being vague here, but anyone who has looked in anti-lvl should be able to see that getting round your fix is *exactly* the sort of thing anti-lvl has been built for. However you can make this better by using the value of the crc for something in the app - e.g. compute the id for the main layout from the value of the crc and other fields added/subtracted/multiplied/etc. (NOTE: just an example, the id *may* change over time). If you can do something like that then if they hack the app to exit the method too soon, the app won't have the constructed the required value and later parts will fail. I strongly suggest splitting your method detailed above into several small pieces, chuck them about in many different abstract parts of the app. Call them in different orders and at random points through the app to construct a yes/no answer eventually. Don't make your app do this doing startup (as that's easy to spot), try spawning a background thread to do this after a random few seconds - don't make it to killProcess as that also sticks out to a hacker. Make it do something else like change important static values to something that is invalid and i.e. when they open the menu they get a nullpointer, etc, etc. All these things will help make it harder and give several more targets to aim for. Alternatively, a much more robust solution can be bought to you with the letters n, d, and k. :-) I really hope that helps you, good luck! -- 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: List in appwidget going blank suddenly, Error in updateMetaData
This issue is mainly coming up when the RemoteViewsService is killed automatically by android. And when we change the orientation from portrait to landscape or vice versa, the RemoteViewsService is getting created, the RemoteVIewsFactory is getting instantiated. However the getViewsAt is not getting called. And in the logs, I am seeing the error: Error in updateMetaData: null Could anyone please help me with this issue. On Jul 7, 5:55 pm, Padma jangala.pa...@gmail.com wrote: Hi, I have created an appwidget with a listview on Honeycomb 3.1. I am using the RemoteViewsService and RemoteViewsFactory. However sometimes I see that the listview suddenly becomes empty. The logs dont have anything specific to my application. However I see the following in the logs: E/RemoteViewsAdapter( 873): Error inupdateMetaData: null Did anyone see a similar issue previously? If so, could you please suggest a solution to this. Regards, Padma. -- 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: NullPointerException when checking for orientation
Thanks, Kostya, I found it. It was the getActivity(). On Jul 7, 12:05 pm, Kostya Vasilyev kmans...@gmail.com wrote: A complex expression like this can cause a bit of confusion with line numbers. You can watch it in the debugger, while single-stepping, the current line can jump down and up. I suppose it's the same with getting the stack trace. To pinpoint what's going on, rewrite this section of code to use local temporary objects, something along these lines: if((ViewByRoom.controls CAN_DISPLAY_QUEUE) == CAN_DISPLAY_QUEUE) { { Activity activity = getActivity(); View view = activity.findViewById(R.id.queueframe); if (view == null) { // old code here } } -- Kostya 07.07.2011 21:28, Kim пишет: Is it possible that the exception is actually caused by the getActivity(), even though the LogCat is pointing to the .findViewByID line? -- Kostya Vasilyev -- 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: On CRC32, LVL and tamper-proof app
On Jun 12, 9:59 pm, String sterling.ud...@googlemail.com wrote: Wait... He's hosting this crap on BLOGGER?!? And we still can't get Google to shut the site down?? Wow. They care even less about Android piracy than I realized. String Better yet they advertise on his site. Google sure do know how to make money from 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] NEED HELP TO SHOW DIALOG
On Sat, Jul 9, 2011 at 6:17 AM, shailesh mistry shailesh.mistry@gmail.com wrote: PLEASE HELP ME HOW TO DO THIS Please stop yelling. Please read the documentation section on dialogs. Please explain in clear terms what precisely you need assistance with. - 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: Using StaticLayout with a canvas to draw text.
The translate() method is, indeed, the easiest. For instance, canvas.save(); canvas.translate(25.0f, 15.0f); layout.draw(canvas); canvas.restore(); -- 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: Unable to run the streaming video - URGENT CRITICAL
On Jul 7, 7:26 am, BZ zaverch...@gmail.com wrote: I am trying to run the video but it gives me white screen. Can anyone please help me asap. Its urgent and critical First, calm down and take a deep breath. I don't think anyone is going to get hurt. Second, VideoView and stream video are not simple things to handle in Android. You might want to Google the topic first to gain an understanding of everything you have to do to make it work. After that, if there is a specific thing that is not working for you, some people might be able to help. It will still not be an urgent and critical issue, though. Doug -- 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: displaying thumbnails for the videos which are streamed from youtube
The documentation for ThumbnailUtils.createVideoThumbnail says it takes a file path (local) for the first argument, not a URL. I wouldn't expect it to somehow download the video and make a thumbnail out of it. Doug On Jul 8, 5:45 am, Anusha D anusha...@gmail.com wrote: Hi, I am trying to display thumbnails for the videos which are streamed into my app from youtube by using the following code Bitmap bMap = ThumbnailUtils.createVideoThumbnail(videoUrl, MediaStore.Video.Thumbnails.MICRO_KIND); here the videoUrl is the url of the url of the video which i am trying to play. Null value is being returned to the variable 'bMap'. can anyone help me in this issue? Thanks 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: android nfc tech API help
Hallo Sumit, Can you please tell me how can read data from this type of card? Also, is there any way to find the type of card from coding? Well, that depends on what type of card you have. Knowing that the card is ISO 14443 Type B is certainly not enough to figure out how this card's data can be accessed. You definitely need to know further details of the card (e.g. does it support NDEF?, does it support IsoDep?, what memory structures are used? what communication protocols are used? what chip does it contain? ...) As Dominik pointed out, a starting point is the tags tech-list. br, Michael -- 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] Track User moves
get bearing calculation gives angle between two coordinates to north . for example if I am in a car and turn 90° right, bearing calculation does not give me 90°, how can i convert it ? thank you On 6 July 2011 02:07, Kubilay D. Yılmaz kubilayd.yil...@gmail.com wrote: great man, thank you so much, i am trying On 6 July 2011 02:04, TreKing treking...@gmail.com wrote: On Tue, Jul 5, 2011 at 5:57 PM, Kubilay D. Yılmaz kubilayd.yil...@gmail.com wrote: How can i track, follow the if user in a car and turns right, or turns left? I have a map application and have to catch moves of user. http://developer.android.com/reference/android/location/Location.html#getBearing() - 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 -- 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] Track User moves
for e.q. on below address, they explained, android get bearing gives like below? http://www.mathsrevision.net/gcse/pages.php?page=12 On 9 July 2011 23:21, Kubilay D. Yılmaz kubilayd.yil...@gmail.com wrote: get bearing calculation gives angle between two coordinates to north . for example if I am in a car and turn 90° right, bearing calculation does not give me 90°, how can i convert it ? thank you On 6 July 2011 02:07, Kubilay D. Yılmaz kubilayd.yil...@gmail.com wrote: great man, thank you so much, i am trying On 6 July 2011 02:04, TreKing treking...@gmail.com wrote: On Tue, Jul 5, 2011 at 5:57 PM, Kubilay D. Yılmaz kubilayd.yil...@gmail.com wrote: How can i track, follow the if user in a car and turns right, or turns left? I have a map application and have to catch moves of user. http://developer.android.com/reference/android/location/Location.html#getBearing() - 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 -- 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: NFC card emulation, NXP PN544 and S2C (NFC-WI)
Hallo, the Nexus S device NXP PN544 NFC controller supports not only SWP for UICC based SE, but also the S2C (aka NFC-WI) Correct. for the external, e.g. micro SD card SE. Does anybody know how this can be enabled and what it means for the SD card? Well, as you mentioned yourself there is no SD card slot with the Nexus S. That is not relevant for the Google Nexus S (there is not SD card slot), but the NFC version of the Samsung Galaxy S II comes already with the SD card slot and here this will be a question. For the NFC version of the Galaxy S2 it won't change anything either (see below). I have tried to search for that and even the S2C standard seems to be relatively old (I think ECMA, 2006) I did not any related materials. What it means supporting S2C? The NXP544 has the built-in support, but what about the phone? Should the device have some hardware support like, e.g. antenna connectors in the slot and on the SD card to be connected directly to the RF interface? I think you misunderstood the concept of the NFC-WI here. A secure element that uses the NFC wired interface can support two modes: internal and external mode. In external mode, the SE uses the NFC chips (PN544) analog frontend + antenna for communication with RFID readers. In internal mode, the NFC chip accessed the SE as if it were an external contactless smartcard connected to the NFC chip. In either way the NFC-WI is used to transmit a digitized version of the signals that are normally transmitted over the contactless air interface. Thus, the SD card slot would not need some special features like antenna connectors, but it will need some special hardware support: To use SD card that support the NFC-WI, the SIGIN and SIGOUT signal lines of the NFC-WI would need to be connected to the NFC chip. But (yes, there's ofthen a but ;-) with the Nexus S (and I expect with the Galaxy S2 too) there is already a secure element connected to the NFC-WI. The Nexus S contains the PN65N (which is a combination of a PN544 and a SmartMX secure element chip). Those two chips are connected through the NFC-WI. br, Michael -- 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] Highlight text incrementally
I have an application that will read what will be on a webpage and it will be highlighted. I have finished reading the webpage and putting it into a converter that then start saying it out loud. I want to know how to highlight the word when it starts talking and change which word is highlighted. Is this possible? I have tried getting the html code from the page, and then trying to add span bla bla /span but it doesn't change. I just have to find a way to move the span, Do you have any ideas? I want it to be in sync with the text that is being read. 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] Update widget(s) after application changes
Thanks for the reply I'm also seeing on occasion that the widget is not reflecting the update, and stopped functioning. I even had at one point that the images on the widget were totally messed up (ex: drawables that are only shown on the main app activity all of a sudden appeared on the widget). Regarding the debugger, it was properly attached (green bug), but the (updated) broadcast receiver was somehow not properly loaded. (I made some changes in the broadcast receiver, and most likely due to a shift in line numbers, the linenumber where the breakpoint was located wasn't properly loaded, causing the debugger to never suspend on it). Other breakpoints (ex: on the main activity) kept on working fine. After I updated the widget (removing it and adding it again), the breakpoint got picked up, and the debugger would suspend on it. Never had real issues with updating apps (through market, or during local development in emulator) before I started working on the widgets. -- 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] Honeycomb and Gingerbread update introduced weird GPS behavior
Hi, I have a problem with an app using the LocationManager, to get location fixes via GPS on a user defined interval. I'm originally tested the app on 2 devices (Galaxy S running Eclair, and Asus Transformer tablet running Honeycomb 3.0.1). After I updated the Galaxy S) from Eclair to Gingerbread and the Asus Transformer tablet from Android 3.0 to Android 3.1, I noticed that my GPS was not working properly anymore. On both devices, it can now take several minutes (up to half an hour) to get a location fix. Before the upgrade, both devices were working fine before, and I never saw this behavior. The app that I'm testing uses the LocationManager to request location updates on a user-defined interval. I see the GPS icon blinking, but it doesn't get a fix. When I open other apps (Google Maps, Navigation, GPS Status.) it also takes a really long time to get a fix. Sometimes it does get regular fixes, but sometimes, it can take half an hour. Is it possible that my app can somehow be responsible for causing the GPS to get a lousy fix (and also impacting other apps) ? The only thing I noticed on the app is that in a particular corner case, multiple threads can requestLocationUpdates from the locationManager. This is currently marked as a bug (as it should do these calls sequentially, but I was just wondering if doing these calls multi-threaded can explain the bad GPS fixes, and if doing these calls can result in other apps having GPS issues as well. Regards, Davy -- 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] videoView onComplete
using a videoView stopPlayback does not seem to call the onComplete How can one force the onComplete call to take place at or near the end of a video ? Thanks 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: Closing AppWidget when force closing an application
Marcos, AFAIK, with that operation you're removing you appwidget from memory,that's the reason it doesn't work anymore. The only way to remove the widget from home screen is dragging it to the trashbin. Best regards, José -- 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] wireless screenshots
How do you take screenshots of an app when your phone isn't connected to your PC? -- 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] Lack of clicking in ListView
All, I'm writing an app that has 3 tabs and a ListView as its first screen. Here is a portion of the class that sets up the 3 tabs with icons and then creates an intent for the MyList.class that is my ListView class. This works. I can select the different tabs and it switches between the three views. If I select the Tracking tab, I get the ListView view. Below the line of asterisks is a portion of code for the MyList class. The issue is that I cannot select an item from the list. I have seen examples where Listeners are used and examples where they aren't used. This code DOESN'T have the listener. Is that why the list is unresponsive? Or does it have something to do with the fact that the ListView is part of the tabs scheme? I'ld love some direction here btw, R.layout.rowlayout in the code is the .xml defining the rows in the listview. Nothing special, 2 lines of text and a thin progress bar. As I said before, the ListView pains and scrolls fine. It just doesn't select. Thanks Tony public class WritersPubs extends TabActivity { long id; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.rowlayout); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; // Resusable TabSpec for each tab Intent intent; // Reusable Intent for each tab // Create an Intent to launch an Activity for the tab (to be reused) // . // removed the code for 2 tabs for brevity // . intent = new Intent().setClass(this, MyList.class); spec = tabHost.newTabSpec(Tracking).setIndicator(Tracking, res.getDrawable(R.drawable.ic_tab_tracking_selected)) .setContent(intent); tabHost.addTab(spec); tabHost.setCurrentTab(2); ** public class MyList extends ListActivity { boolean bPrompt = false; boolean bDate = false; boolean bNeither = true; boolean bTextTrue = false; boolean bUseStored = false; boolean bRPrompt = false; long id; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create an array of Strings, that will be put to our ListActivity String[] names = new String[] { Linux, Windows7, Eclipse, Suse, Ubuntu, Solaris, Android, iPhone }; setListAdapter(new ArrayAdapterString(this, R.layout.rowlayout, R.id.label, names)); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Object o = this.getListAdapter().getItem(position); String os = o.toString(); Toast.makeText(this, You have chosen OS: + + os, Toast.LENGTH_LONG).show(); } -- 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] Lack of clicking in ListView
How to block the call in 2.3 please help me... i have done in 2.2.. -- 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