[android-developers] Boot Camp: Mobile Application Development
For the first time in NCR region!! A golden opportunity to ride the next wave of Mobile Application Development! Come learn about the rapidly growing Mobile Applet Industry from the industry insiders. What? iPhone-Android: What lies beneath? Live interaction with industry experts Live iPhone-Android Demo Session Career opportunities in Mobile Application Development Best Ideas Contest Exciting Prizes including 1 day FREE Lab Session Visit us at: www.cdcgroup.in Like us at: www.facebook.com/cdcgroup Contact: 0120-4107197 -- 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: Not able to find adb.exe
Hello Yogesh, In my case, I have set the SDK Location as, S:\Android Win32\android-sdk_r09-windows, by opening the Window Preferences Android So, I think you should not include the Platform-tools in the path. Cheers, Prabhakar. On May 8, 6:54 pm, yogesh yogeshlanje...@gmail.com wrote: Hi all, I am new to Android.I have downloaded all the SDK Components from SDK Installer. I am using ecllipse Ganymede. Also, I have installed ADT-10.0.1 in ecllipse. But when I browse my sdk location in Window Preferences Android, it is showing error as 'Could not find adb.exe in Adroid-SDK\tools\'. In my Android sdk, adb.exe is located inside 'Android-SDK\platform-tools\' directory. How can I able to change this adb.exe file path? I have includedAndroid-SDK\platform-tools\ directory in PATH variable. Anybody please help me out. Cheers, Yogi -- 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] AlarmManager + SQLite + Refresh Activity Screen
Two possible choices: (1) Keep track of which activity(ies) are displaying data from the database in a list of callbacks, so you can tell them when you change the data. (2) Implement your database with a ContentProvider, which has a standard model for reporting and responding to changes. On Sat, May 7, 2011 at 7:26 PM, RegisMelo regism...@gmail.com wrote: Hello Everybody, I am developing an app that needs to refresh an information every X minutes from a remote server. To do that I am scheduling an Alarm in Android and persisting the data retrieved in a SQLite table. App's main activity shows this list retrieving from the same table in SQLite. My doubt is very simple - how can I say to main activity that exists fresh information in local database so the activity can run a cursor.requery() to refresh the screen? Regards, RM -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Service is not started automatically at app startup
Use activity, setup your service in onCreate() and finish() your activity there. No need to pop up any UI. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how do I change screen orientation from ADB or equivalent?
Orientation is global. The top-most app controls the orientation. If your app is not on the top, you can't force an orientation upon the app that is currently on top. On Fri, May 6, 2011 at 3:17 PM, Morgan morgan.kelly...@gmail.com wrote: Thank you everybody for your insight. I'm still at something of a loss here, I'm (literally) about to build a few robotic arms to accomplish this, but before I do I would like to hear from someone explicitly that this can not be done. I've attempted to launch an installed app which itself forces orientation change programmatically, but that only affects the orientation of that program instance, and the underlying orientation remains unchanged, i.e. if you open a browser instance on top of it, it retains the original orientation. The tests are by necessity comprised of some real-world material, and would be invalidated if they were re-instantiated in a customized form. Once again, thanks for those that have commented so far, Sincerely, Morgan Kelly On Apr 17, 8:24 pm, Diego Torres Milano dtmil...@gmail.com wrote: Flip command in monkey is expected to work only in emulator and Dream (see MonkeyFlipEvent.java). On Apr 15, 4:56 pm, Bill Napier nap...@android.com wrote: Then again, I just tried it with the Nexus S and it doesn't work. It may work on devices with keyboards like Droid. Here's how I tested it: $ adb shell monkey --port $ adb forward tcp: tcp: $ telnet localhost Connected to localhost. Escape character is '^]'. flip open OK flip close OK And nothing happened on my phone. It may actually work on a device that has a flip out keyboard (G1 or droid for example), but I don't have one handy. On Fri, Apr 15, 2011 at 11:24 AM, Bill Napier nap...@android.com wrote: It looks like the flip command from the protocol that monkeyrunner uses may do it for you. It looks like it never got added to MonkeyDevice to be exposed as part of the monkeyrunner API. http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cm... On Thu, Apr 14, 2011 at 4:26 AM, lbendlin l...@bendlin.us wrote: Well, the monkey can do it (change orientation, that is) so you might be able to learn how to do it from the monkey source code. -- 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 -- Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Sicronizar conta
2011/5/7 Peter Molski pmols...@gmail.com Boa tarde, amigos. Speak english here. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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 make custom layout for context menu?
hi, I want to make a custom layout for context menu? how i can set this layout to context menu? can anybody give me reference link or tell me how to do it? regards, hitendrasinh gohil -- 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 increase Notification Sound by my app
By default, notifications use the ring volume, and setting them has no effect. This is controlled by a system setting -- no hint of this in the AudioManager documentation that I ever recall seeing. You can change it, if it's appropriate -- but unless you're acting as a volume control manager for the user, it's probably not appropriate, as this is a user-selectable setting. Settings.System.putInt(ctx.getContentResolver(), NOTIFICATIONS_USE_RING_VOLUME, (flag ? 1 : 0)) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android NDK with templateclass T
Yes, it was in the first place what I do but I tried to experiment something different to understand my mistakes. So I have return my source code to his beginning So I give you my .h associated : #ifndef VECTOR2_H #define VECTOR2_H #include math.h #include typeinfo #include ../config/Define.h #include ../utilities/Utils.h namespace AS { /** * @class CVector2 * * @brief This class represents a vector with 2 components and its main operations */ template class T class CVector2 { public : template class T CVector2T::CVector2(T _X, T _Y); }; template class T inline CVector2T::CVector2(T _X, T _Y) : X(_X), Y(_Y) { } } /* namespace AS */ #endif /* VECTOR2_H */ And there is the mistakes associated with this header file : Compile++ thumb : opengl = opengl.cpp In file included from /home/gbadoual/Workspace/proj/template/ android_os/android/jni/opengl.cpp:13: /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:28: error: declaration of 'class T' /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:23: error: shadows template parm 'class T' /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:28: error: expected ',' or '...' before numeric constant /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:28: error: cannot declare member function 'AS::CVector2T::CVector2' within 'AS::CVector2T' /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:33: error: expected ',' or '...' before numeric constant /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:33: error: no 'AS::CVector2T::CVector2(T)' member function declared in class 'AS::CVector2T' make: *** [/home/gbadoual/Workspace/proj/template/android_os/android/ obj/local/armeabi/objs-debug/opengl/opengl.o] Erreur 1 That's the mistake I have in the first place, but I d'ont understand these mistakes, because I'm not seeing what I do wrong. On 6 mai, 23:32, TreKing treking...@gmail.com wrote: 2011/5/6 Grégoire Badoual gregle...@gmail.com And can you explain me if I'm doing something wrong. In C++ templates need to be defined inline. I'm sure you can find plenty of information on properly declaring and defining C++ templates on the inter-tubes. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android NDK with templateclass T
See below: 09.05.2011 11:45, Grégoire Badoual пишет: namespace AS { /** * @class CVector2 * * @brief This class represents a vector with 2 components and its main operations */ templateclass T class CVector2 { public : templateclass T CVector2T::CVector2(T _X, T _Y); The above declaration is wrong, it should be simply: CVector2(T _X, T _Y); All the other stuff is not needed: while inside the declaration of class CVector2, the compiler already know that: 1) it's a class template 2) T is a template parameter, and is a class. http://www.codersource.net/c/c-tutorial-on-templates/c-class-templates.aspx That being said, this is a question possibly for android-ndk, or preferably for some C++ forum or mailing list. -- Kostya }; templateclass T inline CVector2T::CVector2(T _X, T _Y) : X(_X), Y(_Y) { } } /* namespace AS */ -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Making an app backward compatible.
Hi , please do some modification in ur manifest file. for 1.5 uses-sdk android:minSdkVersion=*3* / android minSdkVersion must be 3. Right click on ur project : go to properties , select Android on opened dialog box and check on ur desired version (here 1.5). ur application automatically changed to 1.5. i hope it will help u. :) On Sat, May 7, 2011 at 8:00 PM, Krish gopikri...@gmail.com wrote: Hi guys. Im a newbie to android development. I managed to get source code for a piano application. The application is built for version 1.6. But i want to make it work in 1.5(cupcake). It shows some error and im foreced to close the app when i try to run in 1.5. Is there anything i can do so as to make it work in 1.5 ?? 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 -- 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 NDK with templateclass T
Sorry, You're right I've made a mistake declaring my class but that wasn't that I will want to understand. But I have modified like you said, and like was the header file in the first place. So there is the file and the errors : /** * @file Vector2.h * @brief A container with 2 components * @author Alternative Shift (Guillaume Rous) * @date 30/11/09 */ #ifndef VECTOR2_H #define VECTOR2_H #include math.h #include typeinfo #include ../config/Define.h #include ../utilities/Utils.h namespace AS { /** * @class CVector2 * * @brief This class represents a vector with 2 components and its main operations */ template class T class CVector2 { public : CVector2(T _X, T _Y); }; template typename T inline CVector2T::CVector2(T _X, T _Y) : X(_X), Y(_Y) { } } /* namespace AS */ #endif /* VECTOR2_H */ And there is the errors : In file included from /home/gbadoual/Workspace/proj/template/ android_os/android/jni/opengl.cpp:13: /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:28: error: expected ',' or '...' before numeric constant /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:33: error: expected ',' or '...' before numeric constant /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h: In constructor 'AS::CVector2T::CVector2(T)': /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:34: error: class 'AS::CVector2T' does not have any field named 'X' /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:35: error: class 'AS::CVector2T' does not have any field named 'Y' /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:35: error: '_Y' was not declared in this scope make: *** [/home/gbadoual/Workspace/proj/template/android_os/android/ obj/local/armeabi/objs-debug/opengl/opengl.o] Erreur 1 I want to know how to use template for Android NDK. Because I try to port a code who was functionnal for C++ Compiler (Unix), and for iPhone. But I want to understand why the use of template, that I had before doesn't work with the Android Compiler On 9 mai, 10:05, Kostya Vasilyev kmans...@gmail.com wrote: See below: 09.05.2011 11:45, Grégoire Badoual пишет: namespace AS { /** * @class CVector2 * * @brief This class represents a vector with 2 components and its main operations */ templateclass T class CVector2 { public : templateclass T CVector2T::CVector2(T _X, T _Y); The above declaration is wrong, it should be simply: CVector2(T _X, T _Y); All the other stuff is not needed: while inside the declaration of class CVector2, the compiler already know that: 1) it's a class template 2) T is a template parameter, and is a class. http://www.codersource.net/c/c-tutorial-on-templates/c-class-template... That being said, this is a question possibly for android-ndk, or preferably for some C++ forum or mailing list. -- Kostya }; templateclass T inline CVector2T::CVector2(T _X, T _Y) : X(_X), Y(_Y) { } } /* namespace AS */ -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] I require Code for profile changing
Profile changing in android please be speific . On Mon, May 9, 2011 at 10:24 AM, aashva services aashvaservi...@gmail.comwrote: I require source code for profile changing in android can any one please assist me provide me code -- 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] Changing brightness after every n seconds
hi u can use thread or AsyncTask for performing this task. i hope it will work 4 u. :) On Sun, May 8, 2011 at 3:37 PM, Nipun Batra nipunredde...@gmail.com wrote: I found out on http://android-er.blogspot.com/2011/02/change-android-screen-brightness.html how to change the brightness.However i wish to know how to modify this code to automatically change my brighntess to say 90% of it's current value after every n seconds. eg at t=0 i have brightness as 100,at t=n it becomes 90,at t =2*n it becomes 81 and so on -- 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 unsu bscribe 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 make custom layout for context menu?
develop your own layout and set that layout as view for context menu by using layout inflater. On May 9, 12:04 pm, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: hi, I want to make a custom layout for context menu? how i can set this layout to context menu? can anybody give me reference link or tell me how to do it? regards, hitendrasinh gohil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Emulator Stopped Working
Hello. On 8 Maj, 12:55, blog536 blog...@gmail.com wrote: I am using eclipse 32 bit IDE for andriod Development, when i run application on andriod emulator it just show me a message that emulator.exe has stopped working. I am using windows 7 home edition, Thanks in advance. Blog536. I know this sucks to hear, but... You should use Ubuntu, as that is the supported environment. And it is availabel for free and without any costs, compared to MS Windows. You can even install it as a Windows app, and then select it when you boot your computer. -- 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: Service is not started automatically at app startup
My suggestion is that, extend Application class for ur application and in onCreate() of application, start your service. Regards, Srihari babu. On May 9, 12:03 pm, Marcin Orlowski webnet.andr...@gmail.com wrote: Use activity, setup your service in onCreate() and finish() your activity there. No need to pop up any UI. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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] Shoutcast streaming app
hi Michanel, m using streaming in my application too , i dont think SDK version will affected . u must using something that is not available in previous version of android. so its creates problem. i dont know the exact proble so cant give u exact answer. m using this code for Streaming audio from web , and its working superb: String url = enter your Url that starts Streaming ; Intent intent = *new* Intent(Intent.*ACTION_VIEW*); intent.setData(Uri.*parse*(url)); ClassName.*this*.startActivity(intent); ClassName.*this*.finish();// it will return intent after streming .remove this line if u dont need. i hope it will work for u :) On Mon, May 9, 2011 at 4:12 AM, Michael Foster michael.fost...@gmail.comwrote: Hello all I am building an app that can play my shoutcast radio station. For starters, I'm just using the standard MediaPlayer and everything seemingly works fine. I just point it to my shoutcast url and it does the rest. However, this does not work for Android 2.1 or lower. Also, I have found that on various devices, people have complained that there is no sound. I'm wondering if anyone has had any success building a shoutcast media player that can work on all (or most) devices. I'm willing to purchase a 3rd party library if reasonably priced. Is there a better way to do this than using MediaPlayer? thanks in advance for any tips you all can offer. 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 -- 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] Music Playing
Hi, I would like to add some music functionality on my application. The idea is to show a list of device songs/albums/artists, and after user choose some of them, then start playing on my application. Also i would like to have some basic controls in one of my activities (next, prev, pause/play)... What would be the best way to implement something like this? 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] Music Playing
Hi, I would like to add some music functionality on my application. The idea is to show a list of device songs/albums/artists, and after user choose some of them, then start playing on my application. Also i would like to have some basic controls in one of my activities (next, prev, pause/play)... What would be the best way to implement something like this? 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] Re: Android NDK with templateclass T
09.05.2011 12:32, Grégoire Badoual пишет: Vector2.h: In constructor 'AS::CVector2T::CVector2(T)': /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:34: error: class 'AS::CVector2T' does not have any field named 'X' /home/gbadoual/Workspace/proj/template/android_os/android/jni/maths/ Vector2.h:35: error: class 'AS::CVector2T' does not have any field named 'Y' You forgot to declare fields X and Y in Vector2. Perhaps the other errors are related to that (C++ is difficult to parse, and sometimes one error makes compilers think there are others). And please take further discussion to a more appropriate forum - android-ndk or a C++ forum / mailing list. -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Calendar Day of Year issue
Hi , Try this : Calendar rightNow = Calendar.*getInstance*(); *int* daycount = rightNow.get(Calendar.*DAY_OF_YEAR*); i hope it will work :) On Sat, May 7, 2011 at 8:06 AM, Tony Rudzki tony.rud...@gmail.com wrote: Does the Day of Year work? All I'm trying to do is get the current day count. For example, if it was Jan 3rd, the day count would be 3. If it were Feb 2nd the day count would be 33. Calendar rightNow = Calendar.getInstance(); int daycount = rightNow.get(DAY_OF_YEAR); This doesn't seem to work. Any help would really be appreciated. TonyR -- 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] unit testing app widgets (AppWidgetProvider)
Hello, I have created a simple app widget: One Button and one TextView. When I click on the button, the text in the textview changes. Now I whould like to test this functionality in a junit test, but the framework only provides test helper for activities (ActivityInstrumentationTestCase2, ActivityUnitTestCase, etc.). Is there a way to test this? Thanks, Jonas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to make custom layout for context menu?
hi , u can use this . in this method m displaying a Alert Bulier with a custom view. you have to do the same with ur context menu. use LayoutInflater as i do. thanks: i hope it will help u :) * public * *void* AlertDisplay() { LayoutInflater factory = LayoutInflater.*from*(*this*); *final* View textEntryView = factory.inflate(R.layout.*homescreen*, *null*); AlertDialog.Builder alert = *new* AlertDialog.Builder(*this*); alert.setInverseBackgroundForced(*true*); alert.setView(textEntryView); AlertDialog *loginPrompt* = alert.create(); username = (EditText) textEntryView.findViewById(R.id.*username_edittext*); password = (EditText) textEntryView.findViewById(R.id.*password_editText*); email = (EditText) textEntryView.findViewById(R.id.*email_editText*); alert.setPositiveButton(Submit, *new* DialogInterface.OnClickListener() { *public* *void* onClick(DialogInterface dialog, *int* whichButton) { /* * code for sending response to the server * * */ } }); alert.show(); } } On Mon, May 9, 2011 at 2:11 PM, srihari babu hisriharib...@gmail.comwrote: develop your own layout and set that layout as view for context menu by using layout inflater. On May 9, 12:04 pm, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: hi, I want to make a custom layout for context menu? how i can set this layout to context menu? can anybody give me reference link or tell me how to do it? regards, hitendrasinh gohil -- 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] Adb drivers for Windows XP
On Sat, May 7, 2011 at 11:03 AM, Kenji Tan tan.kenji.2...@gmail.com wrote: Hi All, I was finally able to build the windows Adb drivers in the platform/ development/host/windows tree. Specifically, I had to use the WDK (Windows Driver Kit) to build just platform/development/host/windows/ usb/api/ and platform/development/host/windows/usb/winusb/, of which the corresponding built bits were in windows\usb\api \objchk_wxp_x86\i386AdbWinApi.dll and windows\usb\winusb \objchk_wxp_x86\i386\AdbWinUsbApi.dll. What am I supposed to do with the dll's? I'm not a Windows user ;) What are you trying to achieve? Those DLL's are used by adb.exe on Windows, so you need them to run the adb tool. BTW this list is not about building bits of the SDK, you might want to try android-building. -- 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] Music Playing
hi , u sud to fetch ur all music from ur sdcard,which will be stored with all detail information like album,artist. then fetch it , display all the songs in a listview and its onclick listener will start mediaplayer and that particular song_uri in default media player of android , u will find forward ,backward , play ,pause button inbuilt. for more functionality u need to creat ur own custom media player. i hope it will work 4 u On Mon, May 9, 2011 at 2:22 PM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: Hi, I would like to add some music functionality on my application. The idea is to show a list of device songs/albums/artists, and after user choose some of them, then start playing on my application. Also i would like to have some basic controls in one of my activities (next, prev, pause/play)... What would be the best way to implement something like this? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to make custom layout for context menu?
hi, i am using this method public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { //here my code } and just register it onCreate method. registerForContextMenu(lvTrackData); with my listview object so how can set layout for context menu? -- 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: Music Playing
Ok... So the unique way is to do a raw search for music files (using file extension for instance)? Isn't there any built control to select music and return data to application? On 9 mayo, 11:10, gaurav gupta gaurav.gupta...@gmail.com wrote: hi , u sud to fetch ur all music from ur sdcard,which will be stored with all detail information like album,artist. then fetch it , display all the songs in a listview and its onclick listener will start mediaplayer and that particular song_uri in default media player of android , u will find forward ,backward , play ,pause button inbuilt. for more functionality u need to creat ur own custom media player. i hope it will work 4 u On Mon, May 9, 2011 at 2:22 PM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: Hi, I would like to add some music functionality on my application. The idea is to show a list of device songs/albums/artists, and after user choose some of them, then start playing on my application. Also i would like to have some basic controls in one of my activities (next, prev, pause/play)... What would be the best way to implement something like this? 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 -- 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 define mp3 file in manifest?
On Sat, May 7, 2011 at 10:58 AM, Meba mehdi.bahr...@gmail.com wrote: I want to use a MP3 file as resource and copy this to res/raw and I can access in activity by R.raw.MP3_FILENAME but when start this application can't find this resource.(I'm try define it as meta-data but I don't know how can I define this name) how can I add mp3 file name in manifest and access to this. You do not add mp3 file name in manifest. Clean your project (Project Clean in Eclipse, ant clean in Ant) and try again. If the problem persists, please explain what you mean by can't find this resource. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] ASK GIS Application
Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your force close error. On Sat, May 7, 2011 at 7:53 AM, Ronald Imanuel ronald.um...@gmail.com wrote: i'm developing a simple GIS map with database. but all i get is force close error. can anyone help me correcting the code. the main activity look like this : public class peta extends MapActivity { private SQLiteDatabase db = null; private String longitude = null; private String latitude = null; private String TABLE_NAME = datauniv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); DataUniv datauniv = new DataUniv(this); db = datauniv.getWritableDatabase(); datauniv.createTable(db); datauniv.generateData(db); setContentView(R.layout.main); MapView mapView = (MapView) findViewById(R.id.mapView); mapView.setBuiltInZoomControls(true); double lat = -6.2532592788520005; double lng = 106.853239291777; GeoPoint point = new GeoPoint((int) (lat *1E6),(int) (lng * 1E6)); mapView.getController().animateTo(point); mapView.getController().setZoom(15); ListOverlay mapOverlays = mapView.getOverlays(); Drawable drawable = this.getResources().getDrawable(R.drawable.marker); MapsOverlay itemizedoverlay = new MapsOverlay(drawable, this); Cursor cursor = db.query(TABLE_NAME, new String[] { latitude, longitude }, null, null, null, null, null); cursor.moveToFirst(); //Log.i(Log, Displaying markers through iteration); while (cursor.isAfterLast() == false) { lat = Double.parseDouble(cursor.getString(2)); lng = Double.parseDouble(cursor.getString(3)); // Log.i(Points, lat + + lng); point = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6)); OverlayItem overlayitem = new OverlayItem(point, , ); itemizedoverlay.addOverlay(overlayitem); mapOverlays.add(itemizedoverlay); cursor.moveToNext(); } } The complete project is in here : http://www.mediafire.com/?94t1f9bm6ddmwt0 Thx before :) -- 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 Android Training...At Your Office: http://commonsware.com/training -- 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] Open/View Pdf, Doc, Xls and Ppt files from Internal storage
On Mon, May 9, 2011 at 1:11 AM, Ankit Shah iankits...@gmail.com wrote: I would like to open/view PDF/Doc files stored in internal storage (i.e file:///data/data/package_name/files/test.pdf) Is there any way to generate Uri object for file stored in internale storage (i.e file:///data/data/package_name/files/test.pdf) Use Uri.fromFile(). Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.fromFile(file:///data/data/package_name/files/ test.pdf); A String is not a File. Use a File with Uri.fromFile(). Also, bear in mind that this won't work for your desired purposes unless the file is world-readable. You can also create a ContentProvider to serve a local file, then use the content:// Uri in your Intent. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Problem in Creating Menu
Hi , I want to create menu like this(shown in fig ) . I want to display my menu without pressing Menu key . [image: 1.png] Also do tell what this bar is called in Android (API level 8/10) Any kind of help would be appreciated . -- 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=en1.png
Re: [android-developers] InputMethod
On Fri, May 6, 2011 at 4:56 PM, Cam McD cameron.george.mcdon...@gmail.com wrote: I would like to get information about clients binding to my custom InputMethod. For example, I would like to get the current URL from the client browser. Hopefully that is impossible, as it would represent a massive privacy breach. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] trying to use application object, but cant use android object
Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your crash. On Sun, May 8, 2011 at 3:24 PM, anddevbren b.ese...@gmail.com wrote: Ok guys, I have a very annoying problem. I am new to android and i am trying to use an application object and cast it to my application using android:name property defined in android manifest file. But the thing is when i use android:name as a property of the application tag in the manifest file, the app crashes in the beginning. So i need help. No idea how to get it work. The android manifest file is like: !-- When i put android:name=MyAppApp line in application tag, it crashes, if i remove it, the app works, any idea what the problem is ? I need to put name attribute there to use application object to save state. Any help would be appriciated. -- application android:name=MyAppApp android:icon=@drawable/icon android:label=MyApplication android:allowClearUserData=true android:debuggable=true activity android:name=.MyActivity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.MySecondActivity android:label=MySecondActivity intent-filter action android:name=getList / category android:name=android.intent.category.DEFAULT / /intent-filter /activity /application -- 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 Android Training...At Your Office: http://commonsware.com/training -- 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] Problem in Creating Menu
On Mon, May 9, 2011 at 5:40 AM, MOHIT SHARMA mohit7...@gmail.com wrote: I want to create menu like this(shown in fig ) . I want to display my menu without pressing Menu key . I imagine that what you see is a set of ImageButtons with custom backgrounds in a LinearLayout. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: onSharedPreferenceChanged is _not_ running on Main Thread! Why?
Thx! You gave me the hint to check the code and If my understanding is right the implementation (editor.commit()) has changed between 2.2 and 2.3 (2.3 runs in the main thread, 2.2 doesn't have this feature). It would be interesting to see the API documentation for 2.2 best regards, On May 6, 9:41 pm, Mark Murphy mmur...@commonsware.com wrote: Based on the source code, unless you have done some fairly strange things involving Loopers, onSharedPreferenceChanged() is called on the main application thread. On Fri, May 6, 2011 at 4:44 AM, laborg gerhard.aig...@gmail.com wrote: Hi! The API (http://developer.android.com/reference/android/content/ SharedPreferences.OnSharedPreferenceChangeListener.html) states that onSharedPreferenceChanged is run on your main thread. With this believe I implemented a activity which is registered as a SharedPreferenceListener within onStart and unregistered in onStop. When a broadcast receiver changes the sharedPreference of interest I receive an exception android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Why is this? I'm aware of the fact to use handlers for this kind of problem but is the API wrong or do I misinterpret the writing your main thread ? I read it as: Since it's on the main thread you don't have to worry... best reagards, Gerhard -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.4 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setTypeface
Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); tv.setTypeface(tf); Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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: onSharedPreferenceChanged is _not_ running on Main Thread! Why?
On Mon, May 9, 2011 at 5:48 AM, laborg gerhard.aig...@gmail.com wrote: Thx! You gave me the hint to check the code and If my understanding is right the implementation (editor.commit()) has changed between 2.2 and 2.3 (2.3 runs in the main thread, 2.2 doesn't have this feature). It would be interesting to see the API documentation for 2.2 commit() has existed since Android 1.0. apply() is the new one. apply() uses a background thread; commit() never has. In fact, that is the reason apply() was added -- so saving SharedPreference changes could be done off the main application thread. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] setTypeface
hi , ' use these lines in ur application On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); holder.text1=(TextView)vi.findViewById(R.id.text1); holder.text1.setTypeface(tf); i hope this will work 4 u.. Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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 define mp3 file in manifest?
no need to add it in manifest simply create an mediaplayer this will be the command: int i=getResources().getIdentifier(s,raw,getPackageName()); if(i!=0){ MediaPlayer player = new MediaPlayer().create(getBaseContext(),i);; player.setVolume(0.9f, 0.9f); player.start(); } s=name of the file raw is folder On May 7, 7:58 pm, Meba mehdi.bahr...@gmail.com wrote: Hi, I want to use a MP3 file as resource and copy this to res/raw and I can access in activity by R.raw.MP3_FILENAME but when start this application can't find this resource.(I'm try define it as meta-data but I don't know how can I define this name) how can I add mp3 file name in manifest and access to this. -- 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: Music Playing
yeah. u can search fciles by its extension like mp3 etc. Use default media controller for ur application . it wil work On Mon, May 9, 2011 at 3:06 PM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: Ok... So the unique way is to do a raw search for music files (using file extension for instance)? Isn't there any built control to select music and return data to application? On 9 mayo, 11:10, gaurav gupta gaurav.gupta...@gmail.com wrote: hi , u sud to fetch ur all music from ur sdcard,which will be stored with all detail information like album,artist. then fetch it , display all the songs in a listview and its onclick listener will start mediaplayer and that particular song_uri in default media player of android , u will find forward ,backward , play ,pause button inbuilt. for more functionality u need to creat ur own custom media player. i hope it will work 4 u On Mon, May 9, 2011 at 2:22 PM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: Hi, I would like to add some music functionality on my application. The idea is to show a list of device songs/albums/artists, and after user choose some of them, then start playing on my application. Also i would like to have some basic controls in one of my activities (next, prev, pause/play)... What would be the best way to implement something like this? 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 -- 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] Activity accidentally re-loading with AdMob
I have the following issue, where I load an ad with AdMob on my home screen. While it is busy loading the user can navigate away to another activity. If the ad didn't finish loading before then, it automatically takes the user back to the home screen from it's current activity. So how do I either block the user to navigate away while the ad is loading (though I don't really want to do that) OR how do I stop the ad from loading if the user navigates away? Basically, how can I improve the user experience and not have them have to wait for the ad to finish loading, but still have the ad present at a later stage Much appreciate any advice! -- 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 increase Notification Sound by my app
if you really, really want to annoy the user you can play your sounds via the audio stream, rather than over the notification system. That will pretty much guarantee your app being uninstalled quickly. -- 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] setTypeface
Hi Mr.gaurav gupta ! Thanks for your response , but i can't use this line Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); particularly i got err in getAssets(); On Mon, May 9, 2011 at 3:33 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: hi , ' use these lines in ur application On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); holder.text1=(TextView)vi.findViewById(R.id.text1); holder.text1.setTypeface(tf); i hope this will work 4 u.. Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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 -- 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] setTypeface
And your err in getAssets() is... what, exactly? On Mon, May 9, 2011 at 6:21 AM, subha subhashini.andr...@gmail.com wrote: Hi Mr.gaurav gupta ! Thanks for your response , but i can't use this line Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); particularly i got err in getAssets(); On Mon, May 9, 2011 at 3:33 PM, gaurav gupta gaurav.gupta...@gmail.com wrote: hi , ' use these lines in ur application On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); holder.text1=(TextView)vi.findViewById(R.id.text1); holder.text1.setTypeface(tf); i hope this will work 4 u.. Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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 -- 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 Android Training...At Your Office: http://commonsware.com/training -- 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] setTypeface
Hi Mr.Mark Murphy ! Thanks for your reply, i got The method getAssets() is undefined for the type ListAdapter this err. On Mon, May 9, 2011 at 3:59 PM, Mark Murphy mmur...@commonsware.com wrote: And your err in getAssets() is... what, exactly? On Mon, May 9, 2011 at 6:21 AM, subha subhashini.andr...@gmail.com wrote: Hi Mr.gaurav gupta ! Thanks for your response , but i can't use this line Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); particularly i got err in getAssets(); On Mon, May 9, 2011 at 3:33 PM, gaurav gupta gaurav.gupta...@gmail.com wrote: hi , ' use these lines in ur application On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); holder.text1=(TextView)vi.findViewById(R.id.text1); holder.text1.setTypeface(tf); i hope this will work 4 u.. Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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 -- 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 Android Training...At Your Office: http://commonsware.com/training -- 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: Async Task or Spawn a Thread?
I'm OK with having people who aren't very experienced with threads create a new AsynchTask for each recurrence. Better than debugging a synchronization problem -- or worse, living with it. And it's not really that high an overhead, either in code complexity or time and memory. It's not like it's creating a new thread each time. Just to be clear: Handler/Looper doesn't give you threads. I've seen people get very confused on this point! It does make using threads, well, not simpler, but safer. If you're interested in passing off work to another thread, then it's better to use Handler/Looper than to try to handle the synchronization of passing off the work item yourself. Still, since you have to create that work item to pass it off, generally speaking, you might as well make it an AsynchTask, and get thread pooling, clean interface to the UI thread, and convenient progress bar handling for free. The only time I can think of to prefer Handler/Looper is when the thread pooling behind AsynchTask doesn't fit your needs -- and if it doesn't, you may want to consider your needs, as having lots of threads takes lots of memory (for the stacks). On Sunday, May 8, 2011 4:33:44 PM UTC-7, Indicator Veritatis wrote: All the answers I have seen so far are true, but yours is the most informative. I would be a little careful about the generalization though, that if he has to ask, then AsyncTask is the answer. AsyncTask is not so convenient for recurring tasks, unless you are OK with having to start it up all over again each time the trigger occurs. And there is one other tool in Android that is still useful for Threads, when barebones Java Threads are too much of a bother to manage: Looper/Handler. This was the standard Android threading 'workhorse' before AsyncTask (or its unoficcial predecessor UserTask) became so popular. On May 7, 11:31 am, Bob Kerns r@acm.org wrote: Use an AsyncTask -- unless both of the following are true: - AsyncTask doesn't meet your needs somehow - You know very clearly and well how to properly synchronize between threads, and how to transfer work to the UI thread where needed, etc. If AsyncTask doesn't meet your needs, and you don't have the second requirement -- you have a very steep (and error-prone) learning curve ahead of you. The whole idea of AsyncTask is to make it easier to write reliable asynchronous code. Generally speaking -- if you have to ask, AsyncTask is probably the answer. On Saturday, May 7, 2011 8:53:29 AM UTC-7, Droid wrote: Seems I can use an async task OR roll my own thread to do a background task. Is one better than the other? -- 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] bluetooth printer on apps
Hi All, I want to implement bluetooth printer on my apps, I want to print a text file over bluetooth. Please let me know how to proceed. -- Thanks Regards Rakesh Kumar Jha -- 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] setTypeface
On Mon, May 9, 2011 at 6:34 AM, subha subhashini.andr...@gmail.com wrote: Thanks for your reply, i got The method getAssets() is undefined for the type ListAdapter this err. You need to call getAssets() on your Activity. For example, f the ListAdapter is an ArrayAdapter, there is a getContext() method you can use for this. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: Async Task or Spawn a Thread?
On Mon, May 9, 2011 at 6:34 AM, Bob Kerns r...@acm.org wrote: Just to be clear: Handler/Looper doesn't give you threads. No, though there is HandlerThread, a Thread with a baked-in Handler. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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
Aw: Re: [android-developers] trying to use application object, but cant use android object
I use a custom app class and my Manifest looks like that: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.package_path android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/app_name android:name=.MyApplication Don't forget that your MyApplication class needs to extend class Application. R. -- 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] setTypeface
hi, use this code in ur activity where u r calling ListAdapter ListItemView listitem = *new* ListItemView(PhoneBookScreen.*this*, R.layout. *list_item_view_phbook*, tracks.get(i).getContactName()); TextView tv=(TextView)listitem.findViewById(R.id.*address_textview*); Typeface tf=Typeface.*createFromAsset*(getAssets(), maduram.ttf); tv.setTypeface(tf); i just use these lines as demo. try to use it . here listItem is a custom listAdapter. try once , :) On Mon, May 9, 2011 at 3:51 PM, subha subhashini.andr...@gmail.com wrote: Hi Mr.gaurav gupta ! Thanks for your response , but i can't use this line Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); particularly i got err in getAssets(); On Mon, May 9, 2011 at 3:33 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: hi , ' use these lines in ur application On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); holder.text1=(TextView)vi.findViewById(R.id.text1); holder.text1.setTypeface(tf); i hope this will work 4 u.. Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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 -- 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 increase Notification Sound by my app
Thanks Bob for the your inputs. @Ibendlin - Well this is the requirement of the application to make the phone crazy and required user intervention :P Udit On May 9, 3:15 pm, lbendlin l...@bendlin.us wrote: if you really, really want to annoy the user you can play your sounds via the audio stream, rather than over the notification system. That will pretty much guarantee your app being uninstalled quickly. -- 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] trying to use application object, but cant use android object
Hi guys, I have one problem. I had created database and added some Employee datas. When i am searching employee i am using auto increment id but i need how to search using emp Name. Please help me. If u have any example please attach. Thank u Regards, Shakthi On Mon, May 9, 2011 at 12:54 AM, anddevbren b.ese...@gmail.com wrote: Ok guys, I have a very annoying problem. I am new to android and i am trying to use an application object and cast it to my application using android:name property defined in android manifest file. But the thing is when i use android:name as a property of the application tag in the manifest file, the app crashes in the beginning. So i need help. No idea how to get it work. The android manifest file is like: !-- When i put android:name=MyAppApp line in application tag, it crashes, if i remove it, the app works, any idea what the problem is ? I need to put name attribute there to use application object to save state. Any help would be appriciated. -- application android:name=MyAppApp android:icon=@drawable/icon android:label=MyApplication android:allowClearUserData=true android:debuggable=true activity android:name=.MyActivity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.MySecondActivity android:label=MySecondActivity intent-filter action android:name=getList / category android:name=android.intent.category.DEFAULT / /intent-filter /activity /application -- 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] setTypeface
Hi guys, I have one problem. I had created database and added some Employee datas. When i am searching employee i am using auto increment id but i need how to search using emp Name. Please help me. If u have any example please attach. Thank u Regards, Shakthi On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); tv.setTypeface(tf); Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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: Delete all rows from a table throws nullpointer
I have been using the debugger to step through and the error is caused by the line: db.delete(TempCourses, null, null); The error occurs whether I check if there is data in the table or not. I guess I could try and drop the table everytime I want to clear it but it certainly seems I should be able to delete the contents. I have also tried the following: String sql = String.format(DELETE FROM TempCourses WHERE _id 0 ); db.execSQL(sql); I get the same NullPointerException error on the line: db.execSQL(sql); Thanks... On May 7, 12:09 pm, Kostya Vasilyev kmans...@gmail.com wrote: Assuming that com.oys is your application's package, you have a null pointer access somewhere. The exact location is just below the lines you posted. You could also use the debugger to step through, checking that variables are not null before you access them. -- Kostya 07.05.2011 19:42, Capt Spaghetti пишет: 05-07 15:12:07.201: ERROR/AndroidRuntime(318): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oys.gfa.acecapper/ com.oys.gfa.acecapper.DownSelectCourse}: java.lang.NullPointerException -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Delete all rows from a table throws nullpointer
If the NullPointerException happens directly on that line, then your db variable is null. On Mon, May 9, 2011 at 7:49 AM, Capt Spaghetti gene_august...@msn.com wrote: I have been using the debugger to step through and the error is caused by the line: db.delete(TempCourses, null, null); The error occurs whether I check if there is data in the table or not. I guess I could try and drop the table everytime I want to clear it but it certainly seems I should be able to delete the contents. I have also tried the following: String sql = String.format(DELETE FROM TempCourses WHERE _id 0 ); db.execSQL(sql); I get the same NullPointerException error on the line: db.execSQL(sql); Thanks... On May 7, 12:09 pm, Kostya Vasilyev kmans...@gmail.com wrote: Assuming that com.oys is your application's package, you have a null pointer access somewhere. The exact location is just below the lines you posted. You could also use the debugger to step through, checking that variables are not null before you access them. -- Kostya 07.05.2011 19:42, Capt Spaghetti пишет: 05-07 15:12:07.201: ERROR/AndroidRuntime(318): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oys.gfa.acecapper/ com.oys.gfa.acecapper.DownSelectCourse}: java.lang.NullPointerException -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: Delete all rows from a table throws nullpointer
Is db == null, perhaps? 09.05.2011 15:49, Capt Spaghetti пишет: I have been using the debugger to step through and the error is caused by the line: db.delete(TempCourses, null, null); -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] I require Code for bluetooth printer
Hi All, I want a help on creating an apps which support the bluetooth print facility. Please help me. -- Thanks Regards Rocky -- 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: onSharedPreferenceChanged is _not_ running on Main Thread! Why?
Mhm... This is the code of SharedPreferences.Editor.commit() in 2.2.1 2825if (hasListeners) { 2826for (int i = keysModified.size() - 1; i = 0; i--) { 2827final String key = keysModified.get(i); 2828for (OnSharedPreferenceChangeListener listener : listeners) { 2829if (listener != null) { 2830 listener.onSharedPreferenceChanged(SharedPreferencesImpl.this, key); 2831} 2832} 2833} 2834} whereas in 2.3.3 following code was refactored to a new method and is executed at the same point 3020 private void notifyListeners(final MemoryCommitResult mcr) { 3021if (mcr.listeners == null || mcr.keysModified == null || 3022mcr.keysModified.size() == 0) { 3023return; 3024} 3025if (Looper.myLooper() == Looper.getMainLooper()) { 3026for (int i = mcr.keysModified.size() - 1; i = 0; i--) { 3027final String key = mcr.keysModified.get(i); 3028for (OnSharedPreferenceChangeListener listener : mcr.listeners) { 3029if (listener != null) { 3030 listener.onSharedPreferenceChanged(SharedPreferencesImpl.this, key); 3031} 3032} 3033} 3034} else { 3035// Run this function on the main thread. 3036ActivityThread.sMainThreadHandler.post(new Runnable() { 3037public void run() { 3038notifyListeners(mcr); 3039} 3040}); 3041} 3042} So yes, SharedPreferences.Editor.commit() was there since 1.0, but between 2.2 and 2.3 the implementation changed to be able to handle notifying listeners on the main thread. The difference between apply() and commit() is that the former enqueues the writing to the file in a separate thread. On May 9, 11:57 am, Mark Murphy mmur...@commonsware.com wrote: On Mon, May 9, 2011 at 5:48 AM, laborg gerhard.aig...@gmail.com wrote: Thx! You gave me the hint to check the code and If my understanding is right the implementation (editor.commit()) has changed between 2.2 and 2.3 (2.3 runs in the main thread, 2.2 doesn't have this feature). It would be interesting to see the API documentation for 2.2 commit() has existed since Android 1.0. apply() is the new one. apply() uses a background thread; commit() never has. In fact, that is the reason apply() was added -- so saving SharedPreference changes could be done off the main application thread. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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: onSharedPreferenceChanged is _not_ running on Main Thread! Why?
On Mon, May 9, 2011 at 8:03 AM, laborg gerhard.aig...@gmail.com wrote: So yes, SharedPreferences.Editor.commit() was there since 1.0, but between 2.2 and 2.3 the implementation changed to be able to handle notifying listeners on the main thread. The difference between apply() and commit() is that the former enqueues the writing to the file in a separate thread. Ah, I see where you're coming from. My apologies for the confusion. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] I require Code for bluetooth printer
I require code for may be the worst way for asking something around here... xD El 09/05/2011 13:59, Rocky rkjhaw1...@gmail.com escribió: Hi All, I want a help on creating an apps which support the bluetooth print facility. Please help me. -- Thanks Regards Rocky -- 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] Re: how to make custom layout for context menu?
On Mon, May 9, 2011 at 4:14 AM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: so how can set layout for context menu? You can't customize the context menu, AFAIK. You can roll your own using an AlertDialog with a listview as gaurav implied above. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] setTypeface
Hi! give any other idea? use holder with typeface concept give sample code On Mon, May 9, 2011 at 4:31 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: hi, use this code in ur activity where u r calling ListAdapter ListItemView listitem = *new* ListItemView(PhoneBookScreen.*this*, R.layout.*list_item_view_phbook*, tracks.get(i).getContactName()); TextView tv=(TextView)listitem.findViewById(R.id.*address_textview*); Typeface tf=Typeface.*createFromAsset*(getAssets(), maduram.ttf); tv.setTypeface(tf); i just use these lines as demo. try to use it . here listItem is a custom listAdapter. try once , :) On Mon, May 9, 2011 at 3:51 PM, subha subhashini.andr...@gmail.comwrote: Hi Mr.gaurav gupta ! Thanks for your response , but i can't use this line Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); particularly i got err in getAssets(); On Mon, May 9, 2011 at 3:33 PM, gaurav gupta gaurav.gupta...@gmail.comwrote: hi , ' use these lines in ur application On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi! how to implement the following concept Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf); holder.text1=(TextView)vi.findViewById(R.id.text1); holder.text1.setTypeface(tf); i hope this will work 4 u.. Here. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; ViewHolder holder; if(convertView==null){ System.out.println(inside null); vi = inflater.inflate(R.layout.item, null); holder=new ViewHolder(); holder.text=(TextView)vi.findViewById(R.id.text); holder.text1=(TextView)vi.findViewById(R.id.text1); //Typeface typeface = Typeface.createFromAsset(myContext.getAssets(), FONT.TTF); holder.image=(ImageView)vi.findViewById(R.id.image); vi.setTag(holder); } else holder=(ViewHolder)vi.getTag(); holder.text.setText(Listdisplay.name[position]); holder.text1.setText(Listdisplay.count[position]); holder.image.setTag(data[position]); System.out.println(inside not null...); imageLoader.DisplayImage(data[position], activity, holder.image); return vi; } } -- 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 -- 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 -- 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] EditText causes app to crash
On Sun, May 8, 2011 at 10:09 PM, Abhinav Asthana ricky...@gmail.com wrote: Caused by: java.lang.NullPointerException at *com.htc* .textselection.TextSelectionMethodImpl.initAnchorAndMagnifier(TextSelectionMethodImpl.java: 310) at *com.htc* .textselection.TextSelectionMethodImpl.initialize(TextSelectionMethodImpl.java: 297) The same thing happens with an EditTextPreference item. I have no idea how to solve this, and whatever I have tried has failed. Try HTC support forums - maybe it's their bug. - 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] Broadcast to a specific class in another app
Hello everyone, I have a problem when I try to send a broadcast intent from App1 to App2 and set my component name using *setComponent()* method That is, In my APP2 I have *String myAction = ..; IntentFilter filter = new IntentFilter(); filter.addAction(myAction); this.registerReceiver(receiver, filter); * //APP1 *String myAction = ..; Intent intent = new Intent(myAction); sendBroadcast(intent); * it works, but if I use *String myAction = ..; Intent intent = new Intent(myAction); intent.setComponent(new ComponentName(pkgApp2, clsApp2)); sendBroadcast(intent); *It doesn't works. So my question is: why?* * Thanks in advance. PG -- 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] Gyroscope heading change affects y axis
I've been playing around with the gyroscope on the Nexus S. I notice that if the phone is not held parallel to the ground, rapid changes in heading (z-axis) result in changes in the roll (y-axis). I would've thought that gyro output would be relative to the phone's orientation. Do I need to somehow compensate for the phone's orientation when calculating roll? -- 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] Broadcast to a specific class in another app
On Mon, May 9, 2011 at 9:00 AM, Paula Gabriela paul...@gmail.com wrote: Hello everyone, I have a problem when I try to send a broadcast intent from App1 to App2 and set my component name using setComponent() method That is, In my APP2 I have String myAction = ..; IntentFilter filter = new IntentFilter(); filter.addAction(myAction); this.registerReceiver(receiver, filter); //APP1 String myAction = ..; Intent intent = new Intent(myAction); sendBroadcast(intent); it works, but if I use String myAction = ..; Intent intent = new Intent(myAction); intent.setComponent(new ComponentName(pkgApp2, clsApp2)); sendBroadcast(intent); It doesn't works. So my question is: why? Because there is no BroadcastReceiver with your designated package and class. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Accessing database from android
On Sun, May 8, 2011 at 10:28 PM, Expressions Unlimitted expressions.jobs@ gmail.com wrote: when i login to the system What system? Your web service? If so, that has nothing to do with Android. , it gives the following error. url unresolved. unexpected exception any one know why this is so ? Given how little information you've provided, one can only assume that the URL your are using cannot be resolved and you're getting an expected exception. Try using a URL that can be resolved? - 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] I need portrait only for all screen sizes except xlarge screen size which needs to be landscape only
I cannot seem to find a solution to fix everything in portrait except xlarge (1275) which needs to be fixed in landscape. I have 4 main layout xml files in four folders (small, normal, large, xlarge). Each main layout shares an activity, so I have four activities. This is difficult to explain let alone solve. Maybe easy but I cannot find a solution.. -- 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] Digest HttpS connection
Okay I managed to work out I need to connect twice 1) just to get the nonce from the server and the Realm 2) to actually connect and send the username and password response Now I can get the first page, but how do I continue to get other pages ? or do further request ? This is my second request that works and gives me the index page // Prepare to TRULY connect if (serverNONCE != null serverREALM != null) { HttpGet httpGet= new HttpGet(https://www.mysite.org/index.html;); DigestScheme digestAuth = new DigestScheme(); digestAuth.processChallenge(hdrs[0]); Header auth = digestAuth.authenticate(new UsernamePasswordCredentials(username , password), httpGet); Log.w(-1 , Auth is +auth.getName()+ +auth.getValue()); httpGet.setHeader(auth); result = client.execute(httpGet); hdrs= result.getHeaders(Authentication-Info); } Now I want to check the result (which is a HttpResponse) and see that there is a link you_got_it now I want to request the page https://www.mysite.org/you_got_it What do I have to repeat ? the digestAuth.authenticate ?? or what ? Thanks again On May 8, 2011, at 2:48 PM, Kumar Bibek wrote: First check what 401 means. And then try to narrow down the possible causes of the problem. Full working sample code! Ah!! I don't think anyone has so much time for that. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Sun, May 8, 2011 at 11:29 PM, New Developer secur...@isscp.com wrote: I keep finding code snippets for use with https none have worked either get a 401 error or some other error Any got or know a full working tutorial that uses httpS not http and Digest Authentication that shows how to send and receive data from a website using these two parameters https 443 and Digest Authentication not Basic Please any full code segment, not snippets that I keep finding with a google search 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 -- 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] Broadcast to a specific class in another app
Well.. I'm sorry if I misunderstood what you said, but I register my broadcast receive in my app2. In my APP2 I have: *//APP2* String myAction = ..; IntentFilter filter = new IntentFilter(); filter.addAction(myAction); this.registerReceiver(receiver, filter); //--this line right here where my receiver is defined as: *//APP2 private BroadcastReceiver receiver= new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.w(TAG,intent received); } }; *In fact, when I try to start my activity (my class the has my receiver) like this: *//APP1 Intent intent = new Intent(); intent.setComponent(new ComponentName(pkgApp2, clsApp2)); startActivity(intent);* it works very well. 2011/5/9 Mark Murphy mmur...@commonsware.com On Mon, May 9, 2011 at 9:00 AM, Paula Gabriela paul...@gmail.com wrote: Hello everyone, I have a problem when I try to send a broadcast intent from App1 to App2 and set my component name using setComponent() method That is, In my APP2 I have String myAction = ..; IntentFilter filter = new IntentFilter(); filter.addAction(myAction); this.registerReceiver(receiver, filter); //APP1 String myAction = ..; Intent intent = new Intent(myAction); sendBroadcast(intent); it works, but if I use String myAction = ..; Intent intent = new Intent(myAction); intent.setComponent(new ComponentName(pkgApp2, clsApp2)); sendBroadcast(intent); It doesn't works. So my question is: why? Because there is no BroadcastReceiver with your designated package and class. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Broadcast to a specific class in another app
On Mon, May 9, 2011 at 9:42 AM, Paula Gabriela paul...@gmail.com wrote: Well.. I'm sorry if I misunderstood what you said, but I register my broadcast receive in my app2. In my APP2 I have: //APP2 String myAction = ..; IntentFilter filter = new IntentFilter(); filter.addAction(myAction); this.registerReceiver(receiver, filter); //--this line right here where my receiver is defined as: //APP2 private BroadcastReceiver receiver= new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.w(TAG,intent received); } }; This is not a public class. In fact, when I try to start my activity (my class the has my receiver) like this: //APP1 Intent intent = new Intent(); intent.setComponent(new ComponentName(pkgApp2, clsApp2)); startActivity(intent); it works very well. An Activity is not a BroadcastReceiver. You can only use setComponent() and ComponentName if the receiver is registered in the manifest, or *maybe* if it is a public class registered via registerReceiver(). Right now, you are trying to send a broadcast to the Activity, and an Activity is not a BroadcastReceiver. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Broadcast to a specific class in another app
Ok. Thanks a lot. 2011/5/9 Mark Murphy mmur...@commonsware.com On Mon, May 9, 2011 at 9:42 AM, Paula Gabriela paul...@gmail.com wrote: Well.. I'm sorry if I misunderstood what you said, but I register my broadcast receive in my app2. In my APP2 I have: //APP2 String myAction = ..; IntentFilter filter = new IntentFilter(); filter.addAction(myAction); this.registerReceiver(receiver, filter); //--this line right here where my receiver is defined as: //APP2 private BroadcastReceiver receiver= new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.w(TAG,intent received); } }; This is not a public class. In fact, when I try to start my activity (my class the has my receiver) like this: //APP1 Intent intent = new Intent(); intent.setComponent(new ComponentName(pkgApp2, clsApp2)); startActivity(intent); it works very well. An Activity is not a BroadcastReceiver. You can only use setComponent() and ComponentName if the receiver is registered in the manifest, or *maybe* if it is a public class registered via registerReceiver(). Right now, you are trying to send a broadcast to the Activity, and an Activity is not a BroadcastReceiver. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] NullPointerExceptions calling IMarketBillingService
I've been getting exceptions like the one below reported by ACRA. Is anyone seeing something similar? Any ideas for a workaround? java.lang.NullPointerException at android.os.Parcel.readException(Parcel.java:1253) at android.os.Parcel.readException(Parcel.java:1235) at com.android.vending.billing.IMarketBillingService$Stub$Proxy.sendBillingRequest(IMarketBillingService.java:100) Something similar has been reported here: http://code.google.com/p/android/issues/detail?id=16043, but apparently that's not right place for reporting it (where do we report bugs for the Market app?). Also, I don't think it only happens if the Market app's data has been cleared, since people manage to download and run the app, and it's kind of unlikely they will clear the Market data right after that. This: http://code.google.com/p/android/issues/detail?id=2387 suggests it's a bug in Android and happens with other services too, but it's quite old and with no comment. Of course, this only happens when people are just about to upgrade, and most probably give up after seeing the an error message... -- 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] Trouble running Android NDK
I'm want to compile native code in Windows. I downloaded cygwin and also installed it. Then i downloaded and installed Android NDK too. but i'm facing few issues. At first when i go to the project folder and run ndk-build then i get an error ** ERROR: Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it. ** So i think on maybe by assigning GNUMAKE path by C:\cygwin\bin it should work but then i get a new error * ERROR: Your GNUMAKE variable is defined to an invalid name: C:\cygwin\bin Please fix it to point to a valid make executable (e.g. /usr/bin/make) * I'm not sure what am i doing wrong. I checked google too. But wasn't able to solve the issue from solutions provided there. Few of the solutions which didn't work were 1. Spaces in the project path. My project path doesn't have any spaces. 2. I even had a new make.exe from the site if in case the make file was not a compatible file type. 3. I even reinstalled the whole cygwin development package. Can anyone please share how they have solved this issue. Regards Vinay Julme ** -- 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] Trouble running Android NDK
NDK questions are best asked in the android-ndk Google Group. On Mon, May 9, 2011 at 10:34 AM, Vinay Julme vinayju...@gmail.com wrote: I'm want to compile native code in Windows. I downloaded cygwin and also installed it. Then i downloaded and installed Android NDK too. but i'm facing few issues. At first when i go to the project folder and run ndk-build then i get an error ** ERROR: Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it. ** So i think on maybe by assigning GNUMAKE path by C:\cygwin\bin it should work but then i get a new error * ERROR: Your GNUMAKE variable is defined to an invalid name: C:\cygwin\bin Please fix it to point to a valid make executable (e.g. /usr/bin/make) * I'm not sure what am i doing wrong. I checked google too. But wasn't able to solve the issue from solutions provided there. Few of the solutions which didn't work were 1. Spaces in the project path. My project path doesn't have any spaces. 2. I even had a new make.exe from the site if in case the make file was not a compatible file type. 3. I even reinstalled the whole cygwin development package. Can anyone please share how they have solved this issue. Regards Vinay Julme ** -- 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 Android Training...At Your Office: http://commonsware.com/training -- 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] Multiple Callbacks from native to java
On Sun, May 8, 2011 at 11:55 PM, dhirendra dhirendraii...@gmail.com wrote: Plz suggest me what to do? Provide a better explanation of your problem - perhaps with a code sample. - 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] Local variable type mismatch
Hi, when compiling a project I get the following error: [2011-05-09 16:30:25 - MediaSenseAndroid] Dx UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type java.lang.Object[]. This is symptomatic of .class transformation tools that ignore local variable information. [2011-05-09 16:30:25 - MediaSenseAndroid] Dxat com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:550) [2011-05-09 16:30:25 - MediaSenseAndroid] Dxat com.android.dx.cf.code.BaseMachine.getLocalTarget(BaseMachine.java:405) […] I have no clue what that means, why this happens and how I can solve the problem. If necessary I can provide further information or full log files. Marco -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to define mp3 file in manifest?
Thank you friends, I suggest it's bug in Eclips because when I add resource in raw folder didn't add any item and update R file. On Mon, May 9, 2011 at 2:34 PM, harsh chandel harshdchan...@gmail.comwrote: no need to add it in manifest simply create an mediaplayer this will be the command: int i=getResources().getIdentifier(s,raw,getPackageName()); if(i!=0){ MediaPlayer player = new MediaPlayer().create(getBaseContext(),i);; player.setVolume(0.9f, 0.9f); player.start(); } s=name of the file raw is folder On May 7, 7:58 pm, Meba mehdi.bahr...@gmail.com wrote: Hi, I want to use a MP3 file as resource and copy this to res/raw and I can access in activity by R.raw.MP3_FILENAME but when start this application can't find this resource.(I'm try define it as meta-data but I don't know how can I define this name) how can I add mp3 file name in manifest and access to this. -- 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] I need help on Bluetooth printer implementation
Hi All, Please give me some information/tutorial to implements bluetooth printer. -- Thanks Regards Rocky. -- 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: Local variable type mismatch
As it is shown in the log file you are trying to use array where a single object is expected. -- 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: Gyroscope heading change affects y axis
All sensors report their values with respect to the phone's coordinates system and you have to find out how to detect device orientation and then how to convert XYZ from phone into the world coordinates. -- 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] Enable/Disable Broadcastreceiver from widget
Do you mean initialize the receiver in the service's onCreate instead of onStart? if I Register the receiver in the service's onCreate instead of onStart the pressing the widget will register it but if i press it again it wont un register it because it will just run the onStart method? Thanks for your help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] help for database ?
hi, currently i am using below to add data to table but it takes too much time. for (int i = 0; i Utility.TrackList.size(); i++) { db.InsertIntoNowPlaying( Utility.TrackList.get(i).getTrackId() } somewhere i found this pseudocode accepted You should do batch inserts. Pseudocode: db.startTransaction(); for (entry : listOfEntries) { db.insert(entry); } db.setTransactionSuccessful(); db.commit(); how can i use this with my for loop. can anybody help me? -- 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] Multiple Layout within an expandable list
On Sun, May 8, 2011 at 11:09 PM, Big Al bigal6...@gmail.com wrote: Sorry I could give a picture of what I want. That would help. Is this possible? Should be possible. ExpandableListView can display any arbitrary view as its children, including a TableLayout defined as you described. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android Build dont work on Nexus S
On Sun, May 8, 2011 at 4:49 PM, Markus markus.tau...@gmail.com wrote: I got the android sourcecode and made a built and then I flashed my Nexus S with that built. This group is for the Android SDK. Check the documentation for a group more appropriate for your topic. - 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] ListView - is it possible to limit the fling speed?
Hi Everyone, I would like to knoe if I can limit the speed of the fling gestures in my ListActivity and if it is possible to stop the scrolling of the same list when I touch it. My current situation is the following: If I perform a vertical scroll that trigers the Fling state, sometimes (often actually) my List View scrolls full speed to the bottom (or to the top) and dose't stop till it reaches the final position. This is not really user friendly... is there a way to limit it? I have already tried with setFastScrollEnabled(false); but it seems to don't work. Thanks to everyone who would like to help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Activity accidentally re-loading with AdMob
On Mon, May 9, 2011 at 5:14 AM, Richard Marsh richardandrewma...@gmail.comwrote: I have the following issue, where I load an ad with AdMob on my home screen. While it is busy loading the user can navigate away to another activity. If the ad didn't finish loading before then, it automatically takes the user back to the home screen from it's current activity. I use AdMob in my free app and I've never seen this behavior. Are you doing anything explicitly involving AdMod? Any errors or messages in LogCat? - 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: check before publish with LVL, the Application Licensing
would it make any different of the version is higher than that in the published app? On May 6, 3:47 am, Marcin Orlowski webnet.andr...@gmail.com wrote: If your device you test your app on uses different email address than one your publisher account is on, then server answer is quite correct. In console settings you can add certain email addresses to be considered testers - once you do that you can manually set there what response your app get from LVL server. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * On 5 May 2011 23:33, veetowner veetow...@gmail.com wrote: We have finished implementation with LVL, and about ready to publish. Previously, we developed the app with separated publish account so that the whole team can get access to test environment. Now, we have done that, we created a build with package name and key with our official publish account info. I side-loaded the app to device, when app starts, it received the ERROR_NOT_MARKET_MANAGED response. I am bit confused why I receive this. My package name is the same, my version number is updated, why I get this response from server? How could I run a check before publishing on Android Market? What do I need to in order to get test response? We have already had a paid app in the market, I am pretty careful doing anything that might mess up with our published app. Google documentation isn't that clear. :-( -- 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] Bluetooth external touchpad interaction
Folks, This one is for someone who has played around with Bluetooth devices a bit, which I haven't. I have a simple swipe(fling)-tap interaction demo app that works perfectly on the device (DroidX). I am attempting to drive it with a Bluetooth connected touchpad. The Bluetooth touchpad connects fine and mimics the Droid touchpad for the home screen and apps just fine but will not interact with my demo app. Am I making a naive assumption that once the Bluetooth touchpad connection/interaction is established it should be universal across all apps (which it appears to, except mine) or am I missing something fundimental in enableing it in the app. I am not using the app to connect to the Bluetooth touchpad, it is established and working before the app comes up. I have scoured the docs but to no avail. Thanks, Steve -- 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] I need help on Bluetooth printer implementation
I admire your persistence, but at some point you need to realize you're either asking a bad question or no one has answer for you. http://groups.google.com/group/android-developers/browse_thread/thread/565104112ce6bcdd http://groups.google.com/group/android-developers/browse_thread/thread/565104112ce6bcdd http://groups.google.com/group/android-developers/browse_thread/thread/3af0f76efae075a8 http://groups.google.com/group/android-developers/browse_thread/thread/3af0f76efae075a8 http://groups.google.com/group/android-developers/browse_thread/thread/d9d6dc2d10d6bd2e http://groups.google.com/group/android-developers/browse_thread/thread/d9d6dc2d10d6bd2e http://groups.google.com/group/android-developers/browse_thread/thread/7762755a153f/4f903d087a309db8 http://groups.google.com/group/android-developers/browse_thread/thread/7762755a153f/4f903d087a309db8 http://groups.google.com/group/android-developers/browse_thread/thread/6ebff4b6babdcbf6 http://groups.google.com/group/android-developers/browse_thread/thread/6ebff4b6babdcbf6 - 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: java.io.FileNotFoundException: (Device or resource busy)
Can someone tell me how to handle Device or resource busy error? Or how to fix it? On May 6, 2:51 pm, faah farah.ha...@gmail.com wrote: On the 3.0 honeycomb, I am getting this error when trying to access a file. It does not happen all the time. What causes is that I browse around the market a bit and then i come back to my app. It tries to access a file, and i get this error: Exception caught in com.app.android.activities.Preview$DLTask: /mnt/ sdcard/tmp/1304702202502.jpg (Device orresourcebusy) java.io.FileNotFoundException: /mnt/sdcard/tmp/1304702202502.jpg (Device orresourcebusy) at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method) at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java: 239) at java.io.FileOutputStream.init(FileOutputStream.java:101) at java.io.FileOutputStream.init(FileOutputStream.java:77) at com.app.android.activities.Preview $DLTask.doInBackground(Preview.java:200) at com.app.android.activities.Preview $DLTask.doInBackground(Preview.java:1) at com.app.android.activities.appAsyncTask$2.call(appAsyncTask.java: 176) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1081) at java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:574) at java.lang.Thread.run(Thread.java:1020) To get the same code working again after I restart the device, i.e. power off/on. The same code works fine on the android version 7, but at times it crashes on v11. -- 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] Change a widgets icon when pressed.
I have a widget and when it is pressed it runs a service. the code is below. How can i change the image/icon of the widget when it is pressed (not just while it is pressed until the next time it is pressed again). Any help would be great. thanks. public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { final int N = appWidgetIds.length; globalCon=context; // Perform this loop procedure for each App Widget that belongs to this provider for (int i=0; iN; i++) { int appWidgetId = appWidgetIds[i]; Log.i(TAG,Widget onUpdated); // Create an Intent to launch ExampleActivity Intent intent = new Intent(context, SignalSpotWidgetService.class); PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0); // Get the layout for the App Widget and attach an on-click listener to the button RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout); views.setOnClickPendingIntent(R.id.widgetButton, pendingIntent); // Tell the AppWidgetManager to perform an update on the current App Widget appWidgetManager.updateAppWidget(appWidgetId, views); } } -- 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 make an app in Android to add support of Urdu Language in SMS Program of Android
Hi every one.. plz guide me how can i make an app for Urdu support in SMS programmm of Android. guide me plz.. i am new in Android development. Regards Naveed -- 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: check before publish with LVL, the Application Licensing
On 9 May 2011 18:11, veetowner veetow...@gmail.com wrote: would it make any different of the version is higher than that in the published app? No, as this i scommon scenario - you simply test the never version. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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: check before publish with LVL, the Application Licensing
No, as this i scommon scenario - you simply test the never version. is and newer of course. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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] Change a widgets icon when pressed.
Use RemoteViews.setImageViewResource / setImageViewUri / setImageViewBitmap. You will most likely need something to track the current state (which image to display). Regarding your other question: registering a broadcast receiver in a service's onCreate makes sure that it's registered once and only once during the service's lifetime. If the service is killed or stopped, next time the service is created it will create and register a new receiver (don't forget to unregister the receiver in onDestroy). On the other hand, keeping a service running just for a receiver's sake is considered a poor design pattern. If the broadcast you're interested in is sticky, you can gets its most recent value with registerReceiver(null, intentFilter). If you do this periodically, driven by AlarmManager updates, you'll be able to track the broadcast's values and not have an eternal service. -- Kostya 09.05.2011 21:59, Boozel ?: I have a widget and when it is pressed it runs a service. the code is below. How can i change the image/icon of the widget when it is pressed (not just while it is pressed until the next time it is pressed again). Any help would be great. thanks. public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { final int N = appWidgetIds.length; globalCon=context; // Perform this loop procedure for each App Widget that belongs to this provider for (int i=0; iN; i++) { int appWidgetId = appWidgetIds[i]; Log.i(TAG,Widget onUpdated); // Create an Intent to launch ExampleActivity Intent intent = new Intent(context, SignalSpotWidgetService.class); PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0); // Get the layout for the App Widget and attach an on-click listener to the button RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout); views.setOnClickPendingIntent(R.id.widgetButton, pendingIntent); // Tell the AppWidgetManager to perform an update on the current App Widget appWidgetManager.updateAppWidget(appWidgetId, views); } } -- 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 -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Activity accidentally re-loading with AdMob
Nope. there's nothing strange that I can notice. My only guess is that if the ad isn't finished loading and the user goes to another activity, the AdView gets refocused if that makes any sense. You have to be quick for this to happen or the ad has to take a long time. On Mon, May 9, 2011 at 6:10 PM, TreKing treking...@gmail.com wrote: On Mon, May 9, 2011 at 5:14 AM, Richard Marsh richardandrewma...@gmail.com wrote: I have the following issue, where I load an ad with AdMob on my home screen. While it is busy loading the user can navigate away to another activity. If the ad didn't finish loading before then, it automatically takes the user back to the home screen from it's current activity. I use AdMob in my free app and I've never seen this behavior. Are you doing anything explicitly involving AdMod? Any errors or messages in LogCat? - 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] How is In App Billing?
I haven't done any inapp billing yet, but a survey indicates there might be a decent Accessory market for my app, and I may be licensing content from a third party. So now I need to figure out if in app billing is worthwhile. This involves large binaries (50-80 Megabytes), so some server side support would be helpful. For those who have done in app billing, how are things? Does it work reliably? Was implementing it a major pain? What server side solution are you using? Homespun? Third party? Is it giving you lots of support headaches? I have looked at Urban Airship's solution. http://urbanairship.com/products/in-app-purchase/ It looks promising, and I would adopt it to save time. But I can't even evaluate it without the SDK. Support's messages have been inconsistent. They say: 1. It is beta. 2. But it's ready for production use. 3. They give access to the beta SDK in batches, and they will consider me for the next round. Nathan -- 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