[android-developers] Lazy Loading
Quality Image Lazy Loading Strategy - http://www.ryangmattison.com/post/2011/12/15/AsynchronousImageProvider.aspx -- 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: Problem about passing intent between two activities
Ditto. On Dec 13, 5:01 am, Abhishek Chaudhari abhi...@yahoo.in wrote: unsubscribe my email id from this group please. From: SH sung...@identityhive.com To: Android Developers android-developers@googlegroups.com Sent: Monday, 12 December 2011 10:22 AM Subject: [android-developers] Problem about passing intent between two activities Hi all. I have an app and fixing errors/bugs. But I have problem when NewPictureNote.java calls PhotoTaker.java using startActivityForResult() to take a photo and save. My code uses callback and put binary data into Intent to return to previous activity. Here is the code: //PhotoTaker.java public class PhotoTaker extends BetterDefaultActivity implements SurfaceHolder.Callback{ //.. public void clickHandler(view v){ //. Intent returningIntent = new Intent(); returningIntent.putExtra(EXTRA_IMAGE_DATA, jpegPictureData); setResult(RESULT_OK,returningIntent); finish(); break; } } //NewPictureNote.java public class NewPictureNote extends BetterDefaultActivity { // protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); try { //If we are getting a response from our picture taking activity if(requestCode ==REQUEST_CODE_TAKE_IMAGE) { //If it was successful if(resultCode == Activity.RESULT_OK) { //do something } else { //The user cancelled or an error occured setResult(Activity.RESULT_CANCELED); finish(); } } else { //... } } catch (Throwable e) { //... } } When I debug code, clickHandler() method in PhotoTaker.java works well. It calls till the end of the clickHanlder() but the Activity won't close and onActivityResult() does not work. Please let me know what problem is? 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 athttp://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 do a Thread that only executes itself one time? (but continues alive)
I think saex is looking for a producer / consumer model using a LinkedBlockingQueue with Weak references, so he can read the settings into a queue when they're available, but his application may not need them until slightly later, and needs to aggregate the results. Weak reference would allow this stack to grow and garbage collect itself for memory as needed - keeping as much relevant sensor history as possible? http://download.oracle.com/javase/6/docs/api/java/util/concurrent/LinkedBlockingQueue.html This isn't a good start ... new Thread() { public void run() { sensorMan = (SensorManager) getSystemService(Context.SENSOR_SERVICE); sensorMan.registerListener(SensorListener, sensorMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_UI); sensorMan.registerListener(SensorListener, sensorMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_UI); } }.start(); On Sep 26, 10:41 am, Kristopher Micinski krismicin...@gmail.com wrote: In most reality, using bare threads in Android also seems a bit contrived, there are a few more system appropriate utilities you might look into.. Kris On Mon, Sep 26, 2011 at 11:35 AM, TreKing treking...@gmail.com wrote: On Mon, Sep 26, 2011 at 10:25 AM, saex elpablos...@gmail.com wrote: It is for Augmented Reality App, i really need to use Threads for this, or the camera doesn't works properly No, you really don't. If you need help with the camera, try explaining what doesn't works properly means, and why you think this one off thread is the solution. --- -- 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: How to do a Thread that only executes itself one time? (but continues alive)
:P :P :P On Sep 26, 8:03 am, saex elpablos...@gmail.com wrote: Hi i need to put some listeners on a Thread (to optimize my app), then, the Thread should be executed one time, but it needs to continue alive, because the listeners have to be alive to listen for events. I tryed with this code, but this code gives me an EXCEPTION (java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()) new Thread() { public void run() { sensorMan = (SensorManager) getSystemService(Context.SENSOR_SERVICE); sensorMan.registerListener(SensorListener, sensorMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_UI); sensorMan.registerListener(SensorListener, sensorMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_UI); } }.start(); Then, i tryed adding Looper.prepare() and Looper.loop(), and it gives not exception, but it iterates, and i dont want to get the Thread iterating. How can i do a thread that only executes itself one time but continues alive? -- 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: Silence Alarms Based on Ringer Mode
Hey Sycobob, This varies a lot depending on weather you're using the 1.6, 2.1, or 2.2 SDK. It is possible to use the 1.6 SDK and have successful results on every phone, but it is very tedious. If I could take it all back, I'd wrote a different version for 1.6,2.1,2.2 and then allowed anything 2.2+ fall into the 2.2 category when stability was achieved. I'd suggest looking into: http://developer.android.com/resources/articles/backward-compatibility.html section - using a wrapper class. This may only be true if you want to support 1.6 phones and beyond. I haven't approached testing 2.2 audio control build on a 1.6 phone, I'm guessing it doesn't work 100% Ryan Mattison http://www.ryangmattison.com On Sep 25, 2:00 pm, Sycobob adam1.b...@gmail.com wrote: I'm writing a small application to silence alarms when the phone's ringer mode is set to vibrate or silent. Some phones have an option in the Clock app to enable or disable alarms when the phone is set to silent, but my Samsung Epic 4G Touch does not. I've tried using the AudioManager class to mute STREAM_ALARM when the ringer mode is changed, but it doesn't actually mute my alarms. I used both setStreamMute(int streamType, boolean state) setStreamVolume(int streamType, int index, int flags) and neither did the job. I'm wondering if someone can point me in the correct direction for muting alarms (preferably still allowing them to vibrate if they are set to). Can I maybe access the 'alarm in silent mode' setting that (I think) is built into Android, even if Samsung has hidden 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: How to use LocationListener without “implements LocationListener”?
Nothing to see here... On Sep 25, 12:16 pm, TreKing treking...@gmail.com wrote: On Sun, Sep 25, 2011 at 12:08 PM, saex elpablos...@gmail.com wrote: i need to do it without implementing it, because i have to do a class that doesn't implement methods. Um ... why? --- -- 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: standalone popup: UI question
android:layout_height=match_parent / /LinearLayout LinearLayout android:layout_width=match_parent android:layout_weight=.5 android:layout_height=wrap_content Button android:id=@+id/twobuttondialog_button_two style=?android:attr/buttonStyleSmall android:layout_width=match_parent android:layout_height=match_parent / /LinearLayout /LinearLayout /LinearLayout To simplify coding in the future and keep everything consistent, it is nice to follow the Android developers code style and create a class to work with this. I titled this, TwoButtonDialog.java import android.app.Dialog; import android.content.Context; import android.text.util.Linkify; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class TwoButtonDialog { private Dialog twoButtonDialog; private Button buttonOne; private Button buttonTwo; private TextView message; public TwoButtonDialog(Context mCtx) { twoButtonDialog = new Dialog(mCtx, R.style.Theme_CustomDialog); twoButtonDialog.setContentView(R.layout.twobuttonpopupdialog); buttonOne = (Button)twoButtonDialog.findViewById(R.id.twobuttondialog_button_one); buttonTwo = (Button)twoButtonDialog.findViewById(R.id.twobuttondialog_button_two); message = (TextView)twoButtonDialog.findViewById(R.id.twobuttondialog_title); } public void showTwoButtonDialog(String buttonOneMessage, String buttonTwoMessage, String Message, boolean linkify, final onTwoButtonDialogShow commands) { buttonOne.setText(buttonOneMessage); buttonTwo.setText(buttonTwoMessage); message.setText(Message); twoButtonDialog.show(); buttonOne.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { if (commands != null) commands.onButtonOneClicked(); twoButtonDialog.dismiss(); } }); buttonTwo.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { if (commands != null) commands.onButtonTwoClicked(); twoButtonDialog.dismiss(); } }); if(linkify) { Linkify.addLinks(message, Linkify.WEB_URLS); } } public interface onTwoButtonDialogShow { void onButtonOneClicked(); void onButtonTwoClicked(); } } Now, to tie it all together whenever you want to use the popup you can call the show snippet in the following snippet. This activity TransparentDialogActivity was also setup to be transparent in the Android Manifest, so it'll appear see through as the alarm activity does. public class TransparentDialogActivity extends Activity { /** Called when the activity is first created. */ Context _context; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); _context = this; TwoButtonDialog tbd = new TwoButtonDialog(this); tbd.showTwoButtonDialog(Off, Snooze, Take Alarm Action, false, new onTwoButtonDialogShow(){ @Override public void onButtonOneClicked() { Toast.makeText(_context, Off Button Pressed, Toast.LENGTH_LONG).show(); finish(); } @Override public void onButtonTwoClicked() { Toast.makeText(_context, Snooze Button Pressed, Toast.LENGTH_LONG).show(); finish(); }}); } Thanks for reading, if you found this helpful - please follow one of the social networks above for future original tutorials. To those that have been stealing my tutorials open source and posting it as their own, please don't follow! Be the first to rate this post 12345 Tags: Alarm Dialog, Transparent Popup, Custom Dialog, Android, Ryan Mattison, UX, User Interface, Learning Android, Android Tutorials Thanks, Ryan Mattison On Sep 26, 1:37 pm, John Goche johngoch...@googlemail.com wrote: Hello, I would like to know whether it is somehow possible to create a popup window which does not take up the whole display area. I am asking because I need to display a message when an alarm expires but do not want to resort to notifications because they seem to be squished in the top right corner of the phone and I think would make it hard to turn an alarm off it it were a notification. On the other hand bringing up an entire window could obfuscate other applications. I guess there is nothing like HP/Palm webOS's notification mechanism on android (there you can pop up a window and the users can still keep on interacting with whatever app they were using or close the popup window)??? Regards, John Goche -- You received this message because you are subscribed to the Google Groups Android
[android-developers] Re: standalone popup: UI question
These forums have mad lag: http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transparent-Dialog-Alarm-Style-.aspx If it didn't go through before ... I made a post for you. On Sep 26, 3:00 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Sep 26, 2011 at 3:50 PM, John Goche johngoch...@googlemail.com wrote: This must indeed be what is happening in my case. When I setContentView() there is a TextVIew to hold the message which is empty. When I setText() on the message view it must push the button out of view. What I would need is to know how to reset the size of the window so that the message can fit inside it. Any ideas on what methods I can call to achieve such a purpose? I would suggest that perhaps instead you focus on designing a layout that provides more room for the text in the first place, then use android:ellipsize to handle cases where the text is too long. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://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] Re: standalone popup: UI question
Sorry Mark, Not sure what is up with Blog Engine .NET .. when I link the URL it works locally, but seems to break when I put it on forums. If you navigate to http://www.ryangmattison.com and go to the first post, Android Custom Transparent Dialog Alarm Style it should have all the information Mark needs. Thanks, Ryan Mattison http://www.ryangmattison.com On Sep 26, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Sep 26, 2011 at 4:47 PM, Ryan Mattison rmattis...@gmail.com wrote: These forums have mad lag: http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transpare... If it didn't go through before ... I made a post for you. I'm getting a 404 on that URL. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://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] Re: standalone popup: UI question
Is there moderation time or something on these forums, why do posts appear, go invisible, appear again. Honestly, worlds greatest search engine fails at forums. http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transparent-Dialog-Alarm-Style-.aspx Ryan Mattison On Sep 26, 1:37 pm, John Goche johngoch...@googlemail.com wrote: Hello, I would like to know whether it is somehow possible to create a popup window which does not take up the whole display area. I am asking because I need to display a message when an alarm expires but do not want to resort to notifications because they seem to be squished in the top right corner of the phone and I think would make it hard to turn an alarm off it it were a notification. On the other hand bringing up an entire window could obfuscate other applications. I guess there is nothing like HP/Palm webOS's notification mechanism on android (there you can pop up a window and the users can still keep on interacting with whatever app they were using or close the popup window)??? Regards, John Goche -- 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: standalone popup: UI question
Hey John, The only way to learn a lot of stuff is to browse the Android source tree (http://source.android.com/source/index.html) I think the tree is down right now. This source code should be easily adaptable into a ListView, I actually have an implementation of it in a project ListViewDialog, but it isn't on this PC. To me, it feels exactly like CSS doesn't work the same on all phones 99% of the time it feels like a hack job getting something working correctly :P. If you're early into Android development, my tool is clutch in saving your wrists: http://www.ryangmattison.com/page/Lazy-Android-Code-Gen-Android-findViewById-carpal-tunnel-syndrome-eclipse.aspx All you need to do is drag and drop the eclipse install button into your environment. It has a youtube video explaining what to do. This will save you a lot of trial and error time. Thanks, Ryan On Sep 26, 4:19 pm, John Goche johngoch...@googlemail.com wrote: Hi Ryan, Thanks for posting the tutorial. I was indeed looking for something like that. Just that since I have one to N messages to display inside the popup I will have to include a listview in there and am not sure this will be possible (I don't know how long or how many messages I will have, even though this may sound somewhat odd.) I think your tutorial is going to be very helpful, by the looks of it it seems very well done. Thanks, John Goche P.S. Where did you learn about all the styling bits besides in the android developer docs and how far can this be taken when compared to an HTML/CSS solution like on webOS? On Mon, Sep 26, 2011 at 11:03 PM, Ryan Mattison rmattis...@gmail.comwrote: Is there moderation time or something on these forums, why do posts appear, go invisible, appear again. Honestly, worlds greatest search engine fails at forums. http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transpare... Ryan Mattison On Sep 26, 1:37 pm, John Goche johngoch...@googlemail.com wrote: Hello, I would like to know whether it is somehow possible to create a popup window which does not take up the whole display area. I am asking because I need to display a message when an alarm expires but do not want to resort to notifications because they seem to be squished in the top right corner of the phone and I think would make it hard to turn an alarm off it it were a notification. On the other hand bringing up an entire window could obfuscate other applications. I guess there is nothing like HP/Palm webOS's notification mechanism on android (there you can pop up a window and the users can still keep on interacting with whatever app they were using or close the popup window)??? Regards, John Goche -- 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: How to maintain session in Android
Hey Christopher, There are a lot of ways. Simplest is to extend application, set this as your application in the manifest. Then initialize a class with getters setters to a hashlist. Create an accessor in your application class. When you want to access this cast getApplication from an Activity or Context. Just typed this whole message in the Sense UI. I want to throw this phone at a wall. On Sep 12, 11:59 pm, christopher christ...@gmail.com wrote: hi I want to maintain user details using session in Android, Please tell me how to maintain session in 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] Cure your android cancer
Hi, I'm surprised, I wrote a snippet tool to cure one of the 5,000 Android cancer cells running through your veins. Only a 50-100 downloaders. http://marketplace.eclipse.org/node/113218 This should should feel like heroin. Once a brilliant idea for an OS now a garbage dump, get whatever you have to do done and get paid. I was a sandwich artist once, I made good sandwiches. Ryan -- 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] Code Gen the 45 boring minutes after writing a layout.
I wrote a eclipse plugin that recursively parses a selected XML file and keeps track of all the nodes with IDs, then adds variable declarations to your clipboard, so you can paste them into your class. I've type findViewById too many times and I'm sure others have as well, so I'm looking for places to share. To get the full picture: http://youtu.be/2t0c-x7HFJw If you would like to use it: http://www.ryangmattison.com/post/2011/09/01/Lazy-Android.aspx I feel like it is a tool that should have been integrated from the beginning. Ryan -- 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] In-App Billing
Hello, I'm currently looking at using the in-app billing process, and a few things worry me. On - http://developer.android.com/guide/market/billing/billing_overview.html If your device is running Android 3.0, in-app billing requires version 5.0.12 (or higher) of the MyApps application. If your device is running any other version of Android, in-app billing requires version 2.3.4 (or higher) of the Android Market application. I'm running a relatively new Droid Incredible -- version of the Market Place (2.2.6). This doesn't appear to meet the requirements for In- App billing. On - https://www.google.com/support/androidmarket/developer/bin/answer.py?answer=190860 Selecting the upgrade Android Market link, it leads me to Page Not Available. ... This looks like a huge issue for people that are attempting to use the InApp billing process. It says that my Market is supposed to be automatically keeping itself up-to-date - https://market.android.com/support/bin/answer.py?answer=190860 My question being, what percent of Android Phones actually support the InApp billing process? Thanks, Ryan -- 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: Integrating Proguard using recently posted instructions
I still have an issue, please help! add-proguard-release.xml:31 is where it occurs. I'm eating a candy bar every hour until this is resolved! Please save my health [echo] Signing final apk... [signjar] Signing JAR: C:\Android\AndroidWorkspace\GeoTextXandy\Die \bin\Geo t-unsigned.apk to C:\Android\AndroidWorkspace\GeoTextXandy\Die\bin \GeoText-un gned.apk as speaksms [echo] Running zip align on final apk... [echo] Release Package: C:\Android\AndroidWorkspace\GeoTextXandy \Die\bin oText-release.apk BUILD SUCCESSFUL Total time: 9 seconds C:\Android\AndroidWorkspace\GeoTextXandy\Die Without add-proguard-release; With it, C:\Android\AndroidWorkspace\GeoTextXandy\Dieant release Buildfile: C:\Android\AndroidWorkspace\GeoTextXandy\Die\build.xml [setup] Android SDK Tools Revision 7 [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 2.1-update1 [setup] API level: 7 [setup] [setup] -- [setup] Resolving library dependencies: [setup] -- [setup] Ordered libraries: [setup] -- [setup] [setup] [setup] Importing rules file: tools\ant\ant_rules_r3.xml -set-release-mode: -dirs: [echo] Creating output directories if needed... -pre-build: -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... -pre-compile: compile: [javac] C:\Android\android-sdk_r05-windows\android-sdk-windows \tools\ant\an _rules_r3.xml:336: warning: 'includeantruntime' was not set, defaulting to buil .sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to C:\Android\AndroidWorkspace \GeoTextXandy Die\bin\classes -dex-obfuscate: [delete] Deleting: C:\Android\AndroidWorkspace\GeoTextXandy\Die\obf \original jar [jar] Building jar: C:\Android\AndroidWorkspace\GeoTextXandy\Die \obf\orig nal.jar [proguard] ProGuard, version 4.5.1 [proguard] Reading input... [proguard] Reading program jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\o f\original.jar] [proguard] Reading library jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\l bs:C:\Android\android-sdk_r05-windows\android-sdk-windows\platforms \android-7\a droid.jar] BUILD FAILED C:\Android\AndroidWorkspace\GeoTextXandy\Die\add-proguard-release.xml: 31: Can't read [C:\Android\AndroidWorkspace\GeoTextXandy\Die\libs:C:\Android \android-sdk_ 05-windows\android-sdk-windows\platforms\android-7\android.jar] (No such file o directory) Total time: 2 seconds On Sep 26, 3:25 pm, Ryan Mattison rmattis...@gmail.com wrote: Can't for the life of me get this stuff to work. It looks like it is trying to combine folders or something? [proguard] ProGuard, version 4.5.1 [proguard] Reading input... [proguard] Reading program jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\ob f\original.jar] [proguard] Reading library jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\li bs:C:\Android\android-sdk_r05-windows\android-sdk-windows\platforms \android-7\an droid.jar] BUILD FAILED C:\Android\AndroidWorkspace\GeoTextXandy\Die\build.xml:92: Can't read [C:\Androi d\AndroidWorkspace\GeoTextXandy\Die\libs:C:\Android\android-sdk_r05- windows\andr oid-sdk-windows\platforms\android-7\android.jar] (No such file or directory) Total time: 2 seconds Any ideas?! On Sep 23, 1:40 am, Stephen Lau st...@grommit.com wrote: akatka wrote: I am integrating Proguard obfuscation in my application using the recently posted instructions on the Android developers blog. Everything works fine as long as my project doesn't use any third party jars. When I use a third party jar, admob-sdk-android.jar in my case, the ant release step fails with this warning [proguard] Initializing... [proguard] Warning: com.pqrs.XYZ: can't find referenced class com.admob.android.ads.AdManager [proguard] Warning: com.pqrs.XYZ: can't find referenced class com.admob.android.ads.AdManager [proguard] Warning: there were 2 unresolved references to classes or interfaces. [proguard] You may need to specify additional library jars (using '-libraryjars'). BUILD FAILED D:\testandroid\eclipseworkspace\MyProj\add-proguard-release.xml:38: Please correct the above warnings first. Where do I specify the list of third party jars so that the proguard can find those while the obfuscation step? change the -libraryjars line in add-proguard-release.xml to look like: -libraryjars ${external.libs.dir}:${libraryjarpath} and you should be all set cheers, steve -- stephen lau | st...@grommit.com |http://whacked.net|@stevel -- 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
[android-developers] Re: Integrating Proguard using recently posted instructions
I'm not quite sure what you mean. I just set up a new Android Eclipse project. Followed the instructions from the Android developers blog post. I get the same exact error. I figured I messed with some Android configuration along the way. Can you be more verbose please? Much appreciated. C:\Android\AndroidWorkspace\LifeOrganizedant release Buildfile: C:\Android\AndroidWorkspace\LifeOrganized\build.xml [setup] Android SDK Tools Revision 7 [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 2.1-update1 [setup] API level: 7 [setup] [setup] -- [setup] Resolving library dependencies: [setup] -- [setup] Ordered libraries: [setup] -- [setup] [setup] [setup] Importing rules file: tools\ant\ant_rules_r3.xml -set-release-mode: -dirs: [echo] Creating output directories if needed... -pre-build: -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... -pre-compile: compile: [javac] C:\Android\android-sdk_r05-windows\android-sdk-windows \tools\ant\ant _rules_r3.xml:336: warning: 'includeantruntime' was not set, defaulting to build .sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to C:\Android\AndroidWorkspace \LifeOrganized \bin\classes -dex-obfuscate: [delete] Deleting: C:\Android\AndroidWorkspace\LifeOrganized\obf \original.jar [delete] Deleting: C:\Android\AndroidWorkspace\LifeOrganized\obf \postobf.jar [jar] Building jar: C:\Android\AndroidWorkspace\LifeOrganized\obf \original .jar [proguard] ProGuard, version 4.5.1 [proguard] Reading input... [proguard] Reading program jar [C:\Android\AndroidWorkspace \LifeOrganized\obf\o riginal.jar] [proguard] Reading library jar [C:\Android\AndroidWorkspace \LifeOrganized\libs: C:\Android\android-sdk_r05-windows\android-sdk-windows\platforms \android-7\andro id.jar] BUILD FAILED C:\Android\AndroidWorkspace\LifeOrganized\add-proguard-release.xml:31: Can't rea d [C:\Android\AndroidWorkspace\LifeOrganized\libs:C:\Android\android- sdk_r05-win dows\android-sdk-windows\platforms\android-7\android.jar] (No such file or direc tory) Total time: 2 seconds C:\Android\AndroidWorkspace\LifeOrganized On Sep 27, 3:40 pm, Xavier Ducrohet x...@android.com wrote: It looks like you have an add-on that doesn't export a library. Its path is added to the list of library proguard should know about but it's a folder not a jar file. Why are you compiling against an add-on that does not export a library? On Mon, Sep 27, 2010 at 1:37 PM, Ryan Mattison rmattis...@gmail.com wrote: I still have an issue, please help! add-proguard-release.xml:31 is where it occurs. I'm eating a candy bar every hour until this is resolved! Please save my health [echo] Signing final apk... [signjar] Signing JAR: C:\Android\AndroidWorkspace\GeoTextXandy\Die \bin\Geo t-unsigned.apk to C:\Android\AndroidWorkspace\GeoTextXandy\Die\bin \GeoText-un gned.apk as speaksms [echo] Running zip align on final apk... [echo] Release Package: C:\Android\AndroidWorkspace\GeoTextXandy \Die\bin oText-release.apk BUILD SUCCESSFUL Total time: 9 seconds C:\Android\AndroidWorkspace\GeoTextXandy\Die Without add-proguard-release; With it, C:\Android\AndroidWorkspace\GeoTextXandy\Dieant release Buildfile: C:\Android\AndroidWorkspace\GeoTextXandy\Die\build.xml [setup] Android SDK Tools Revision 7 [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 2.1-update1 [setup] API level: 7 [setup] [setup] -- [setup] Resolving library dependencies: [setup] -- [setup] Ordered libraries: [setup] -- [setup] [setup] [setup] Importing rules file: tools\ant\ant_rules_r3.xml -set-release-mode: -dirs: [echo] Creating output directories if needed... -pre-build: -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... -pre-compile: compile: [javac] C:\Android\android-sdk_r05-windows\android-sdk-windows \tools\ant\an _rules_r3.xml:336: warning: 'includeantruntime' was not set, defaulting to buil .sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to C:\Android\AndroidWorkspace \GeoTextXandy Die\bin\classes -dex-obfuscate: [delete] Deleting: C:\Android\AndroidWorkspace\GeoTextXandy\Die\obf \original jar [jar] Building jar: C:\Android\AndroidWorkspace\GeoTextXandy\Die \obf\orig nal.jar [proguard] ProGuard, version 4.5.1 [proguard] Reading input... [proguard] Reading program jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\o f
[android-developers] Re: Integrating Proguard using recently posted instructions
I downloaded the latest of those two files and was unable to get it to work. Still eating candy bars! Thanks, Ryan On Sep 27, 12:51 pm, Dan Galpin d...@android.com wrote: In an effort to integrate the change for external libraries, I believe that I broke building on Windows machines. I believe that I've corrected this problem with the latest version. Let me know if it works for you. Cheers, Dan - Dan Galpin Developer Advocate, Google - The collective minds on this forum far exceed my own, so post messages here, rather than my e-mail address. On Sep 26, 1:25 pm, Ryan Mattison rmattis...@gmail.com wrote: Can't for the life of me get this stuff to work. It looks like it is trying to combine folders or something? [proguard] ProGuard, version 4.5.1 [proguard] Reading input... [proguard] Reading program jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\ob f\original.jar] [proguard] Reading library jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\li bs:C:\Android\android-sdk_r05-windows\android-sdk-windows\platforms \android-7\an droid.jar] BUILD FAILED C:\Android\AndroidWorkspace\GeoTextXandy\Die\build.xml:92: Can't read [C:\Androi d\AndroidWorkspace\GeoTextXandy\Die\libs:C:\Android\android-sdk_r05- windows\andr oid-sdk-windows\platforms\android-7\android.jar] (No such file or directory) Total time: 2 seconds Any ideas?! On Sep 23, 1:40 am, Stephen Lau st...@grommit.com wrote: akatka wrote: I am integrating Proguard obfuscation in my application using the recently posted instructions on the Android developers blog. Everything works fine as long as my project doesn't use any third party jars. When I use a third party jar, admob-sdk-android.jar in my case, the ant release step fails with this warning [proguard] Initializing... [proguard] Warning: com.pqrs.XYZ: can't find referenced class com.admob.android.ads.AdManager [proguard] Warning: com.pqrs.XYZ: can't find referenced class com.admob.android.ads.AdManager [proguard] Warning: there were 2 unresolved references to classes or interfaces. [proguard] You may need to specify additional library jars (using '-libraryjars'). BUILD FAILED D:\testandroid\eclipseworkspace\MyProj\add-proguard-release.xml:38: Please correct the above warnings first. Where do I specify the list of third party jars so that the proguard can find those while the obfuscation step? change the -libraryjars line in add-proguard-release.xml to look like: -libraryjars ${external.libs.dir}:${libraryjarpath} and you should be all set cheers, steve -- stephen lau | st...@grommit.com |http://whacked.net|@stevel -- 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: Integrating Proguard using recently posted instructions
Can't for the life of me get this stuff to work. It looks like it is trying to combine folders or something? [proguard] ProGuard, version 4.5.1 [proguard] Reading input... [proguard] Reading program jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\ob f\original.jar] [proguard] Reading library jar [C:\Android\AndroidWorkspace \GeoTextXandy\Die\li bs:C:\Android\android-sdk_r05-windows\android-sdk-windows\platforms \android-7\an droid.jar] BUILD FAILED C:\Android\AndroidWorkspace\GeoTextXandy\Die\build.xml:92: Can't read [C:\Androi d\AndroidWorkspace\GeoTextXandy\Die\libs:C:\Android\android-sdk_r05- windows\andr oid-sdk-windows\platforms\android-7\android.jar] (No such file or directory) Total time: 2 seconds Any ideas?! On Sep 23, 1:40 am, Stephen Lau st...@grommit.com wrote: akatka wrote: I am integrating Proguard obfuscation in my application using the recently posted instructions on the Android developers blog. Everything works fine as long as my project doesn't use any third party jars. When I use a third party jar, admob-sdk-android.jar in my case, the ant release step fails with this warning [proguard] Initializing... [proguard] Warning: com.pqrs.XYZ: can't find referenced class com.admob.android.ads.AdManager [proguard] Warning: com.pqrs.XYZ: can't find referenced class com.admob.android.ads.AdManager [proguard] Warning: there were 2 unresolved references to classes or interfaces. [proguard] You may need to specify additional library jars (using '-libraryjars'). BUILD FAILED D:\testandroid\eclipseworkspace\MyProj\add-proguard-release.xml:38: Please correct the above warnings first. Where do I specify the list of third party jars so that the proguard can find those while the obfuscation step? change the -libraryjars line in add-proguard-release.xml to look like: -libraryjars ${external.libs.dir}:${libraryjarpath} and you should be all set cheers, steve -- stephen lau | st...@grommit.com |http://whacked.net| @stevel -- 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: Linkify and Context Menu
I think I went down this road like 2 years ago and ended up doing something crazy/dumb like using a web view. Instead of startActivity you could do pop ups and just feed the web view the text. A little css might be needed : / If you are stuck this may work for u. Use the Linkify to add tel: to the front of your phone numbers. Garbage code, but sometimes o well. private static final String mimetype = text/html; private static final String encoding = UTF-8; private string newIncoming WebView mWebDesc = (WebView)findViewById(R.id.webView_paragraph_termsAndConditions); mWebDesc.loadDataWithBaseURL(fake://FAKEADDRESS/FAKE/, newIncoming, mimetype, encoding, fake://FAKEADDRESS/FAKE/); mWebDesc.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.startsWith(http)) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); } else if(url.startsWith(tel:)) { startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse(url))); } return true; } }); On Sep 23, 1:12 am, jithin syam ms danijanuv...@gmail.com wrote: As part of my project I need to create TextView that contains message ,in which all phone numbers are linkified. I could do it. But my need is to create a context menu on that link.That is when I hold that link I need a context menu appears with many options. Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Launch application from url
intent-filter data android:scheme=lol.haha.scheme / action android:name=android.intent.action.VIEW / /intent-filter a href=lol.haha.scheme://pass/here On Sep 24, 9:50 am, AnasSamara anas86sam...@gmail.com wrote: Hello All Any one knows how to launch certain application in my android from URL send via email or SMS. I mean if I have an SMS: Http://GOOGLE.COM then I am able to click on it so the browser opened with that URL. the same thing I want, so when clicking a URL gotten from email or SMS like: appName://arguments.to.be.passed the appName application launched and those arguments passed to the first activity of the application. any help is appreciated. 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] Gmail Public Intent
Is their a way to get at a GMail provider without screwing the user into two different sets of pulls from the email server? Is there a Gmail content provider? Are there public Intents fired by the Gmail application. The Gmail application is funky to use. Instead you force a developer to write a secondary system, doing the same work another application is already doing. This work consists of network connections, battery drain. Why can't I uninstall Facebook off my nexus without rooting, this is sinful. Forced Facebook, Can't uninstall the GMail application, No Gmail Content Provider .. I'm sure there is an easy way to make this secure ! This shows where Google is going Option A: Allow users to delete Gmail. Option B: Securely make the data available to outside applications. Last, has anyone been able to get rid of Facebook without having to root? Thanks, Ryan -- 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: Is it possible to merge dex files?
No idea, but what is the APK file size? On Sep 24, 10:46 am, gbear chris.regni...@gmail.com wrote: Hello, I'm wondering if anyone has come up with a way to merge multiple dex files into one. Or if anyone can point me in the proper direction (or am I just going to have to write the tool myself?) Use case: I have a very large app that I'm trying to put on android. We're talking about tens of thousands of classes here. The app is split up into multiple components/projects/libraries. The build time for this is horrendous thanks to the conversion to dex! Anywhere from 5-10 mins on a dual core 3ghz with 4 gigs of ram. Debugging and one line changes are becoming a nightmare! There's obviously no need to build most of the libraries every time. So I'd like to only build the ones that have changed, and then merge all the separate dex files. Any help would be appreciated! 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: How to remove a notification with flag FLAG_NO_CLEAR ?
public class SuperActivity extends Activity { @override public Context getApplicationContext() { throw new STOPIT(); } public class STOPIT extends Exception { ... getMessage() { return WTF DUDE, we discussed this } } } public class SuperActivity extends Activity { onCreate } On Sep 24, 11:39 pm, TreKing treking...@gmail.com wrote: On Wed, Sep 22, 2010 at 9:41 PM, Nikhil nik...@superfacts.org wrote: why is that? The big reason is that there are UI-related functions that take Contexts but really expect Activities and if you use getApplicationContext() instead of your Activity as the Context for, say, creating a dialog, your app breaks. Search this group for getApplicationContext and you will find post after post of people running into this problem. Unfortunately, people keep falling into this trap because that's what's shown on the documentation samples for creating dialogs even though it is blatantly wrong, has been brought up repeatedly on this group, and would take about 5 seconds to fix. In other places where you don't need the UI it would work but it's completely unnecessary and redundant since getApplicationContext() is a member of the Context class, so anywhere you can use it implies you are already in or have access to a context anyway, so there's hardly a point to making the extra function call. I pretend that function doesn't exist. --- -- 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: How to remove a notification with flag FLAG_NO_CLEAR ?
Below works to help yourself through! public class SuperActivity extends Activity { @override public Context getApplicationContext() { throw new STOPIT(); } public class STOPIT extends Exception { ... getMessage() { return WTF DUDE, we discussed this } } } public class FunctionalActivity extends SuperActivity { onCreate } On Sep 24, 11:39 pm, TreKing treking...@gmail.com wrote: On Wed, Sep 22, 2010 at 9:41 PM, Nikhil nik...@superfacts.org wrote: why is that? The big reason is that there are UI-related functions that take Contexts but really expect Activities and if you use getApplicationContext() instead of your Activity as the Context for, say, creating a dialog, your app breaks. Search this group for getApplicationContext and you will find post after post of people running into this problem. Unfortunately, people keep falling into this trap because that's what's shown on the documentation samples for creating dialogs even though it is blatantly wrong, has been brought up repeatedly on this group, and would take about 5 seconds to fix. In other places where you don't need the UI it would work but it's completely unnecessary and redundant since getApplicationContext() is a member of the Context class, so anywhere you can use it implies you are already in or have access to a context anyway, so there's hardly a point to making the extra function call. I pretend that function doesn't exist. --- -- 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