[android-beginners] Random question on app market
Okay, so it's not a dev question, but I was wondering if anyone knew. For arguments sake, lets say I had G1, and then later I bought a HTC Hero. I've purchased paid apps on my G1, but now I want to transfer those over to my HTC Hero. Would I have to repurchase them again? or are they linked to my google account or something similar? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Widgets User input.
Argh! I thought so but I hoped that there were some walkaround :) Thx w On Jul 5, 9:03 pm, Mark Murphy mmur...@commonsware.com wrote: wonglik wrote: I see documentation mention only those classes are available for widgets : * AnalogClock * Button * Chronometer * ImageButton * ImageView * ProgressBar * TextView Non of them are input ones. Is it possible to gather user input from widget? Only via a Button or ImageButton. If you are looking for EditText or something like that, the answer is no. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to deal with service permission?
Hello, I have implemented a service which must start another service and I get a permission exception. The implementation of the two services are in two different projects, i.e. in two different apk. The first apk contains a package my.package, the first service my.package.service1 and an abstract class my.package.abstractservice which extends the Service class. The second apk contains the implementation of the second service my.package.service2 which extends my.package.abstractservice. When service1 starts service2 with the function startService(), I get an error telling that the system can't start service2 without private permissions. So I modify the manifest files: the first apk declares and uses my own permission, and in the second apk I added android:permission=... in the declaration of service2 in the manifest file. But I get a SecurityException telling that service2 can't be started without the requested permission. I have checked the application settings and the dumpsys of adb. Permission is well attributed, but this does not help. One thing I read in this group is that the order of the installation of packages declaring permissions and those using them is important. I noticed that when debugging service2, its apk is first installed in the emulator, then the first apk (which declares the permission) is installed. Probably due to the fact that service2 extends the abstract class of the first apk. Is it this the origin of my permission problem? Bye. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] mapActivity problem,cant use when already app's process dead.
hi, i wanna use alarmmanager and call new mapactivity. its test code.i checked bc_test is called.and if set line A,this class can call Activity_normal's activity. -its called by alarmmanager.--- public class bc_test extends BroadcastReceiver { public void onReceive(Context ctx, Intent intent) { Context context = ctx; Intent newIntent = new Intent(Intent.ACTION_VIEW); //newIntent = new Intent(context, Activity_normal.class);//line A newIntent = new Intent(context, Activity_map.class);//line B newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(newIntent); } } -- if i set line B code.log shows this error. -- 07-06 02:08:35.496: WARN/dalvikvm(12368): Unable to resolve superclass of Ltest/serviceText/Activity_map; (18) 07-06 02:08:35.496: WARN/dalvikvm(12368): Link of class 'Ltest/ serviceText/Activity_map;' failed -- this error happened when app's main process dead.if process alived,map avtivity was call without error. i think uses-library is called only app's main process. i tried like process:remote in manifest.xml.but couldn't clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Can't send SMS between 2 emulators
Hi I'm writing a widget for messages and was trying to let it run in the emulator. But I can't send messages between the emulators, even with the messaging app. I started one emulator from within Eclipse, started a second one from the terminal and used the ports as phone numbers, but I don't receive any SMS... I'm running it on Mac OS X if that matters. Any help is welcome. Thanks in advance, Till --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] image creating in code
Hi there, i am at the moment attempting to get my head round all this java and android stuff in the hope to making one of my games run on the android platform. The game i am hoping to port / convert is a tile base puzzle game, where you put pices onto a board, these pieces are shapes of different colours. Right now all my stuff is C and SDL based, so to create the pieces i have a grey shaded image of the shape, a black outline of the shape, and several colour textures, so to save having hundreds of images of all the shapes in all the colours, i create all the game pieces in the code, by putting the colour onto the grey with alpha, creating a coloured shape then overlaying the outline then set a mask, creating my game coloured outlined and masked game piece. is there any fucntions in the android set that i can achieve this sort of thing? here is my original c code... SDL_Surface *makeshape( int colourn , int shapen ) { // handlers for working surfaces SDL_Surface *surface ; SDL_Surface *image ; SDL_Surface *color; SDL_Surface *shae; SDL_Surface *shaem; // sdl rect to choose areas of surfaces SDL_Rect pos; // get the base images we are going to use color=SDL_DisplayFormat(colour[colourn]); shae=SDL_DisplayFormat(shape[shapen]); shaem=SDL_DisplayFormat(shapem[shapen]); // make the inside of the outline masked ready to go ober the shape at tyhe end setmaskwhite(shaem); // create a random texture to plot over grey shape surface=SDL_CreateRGBSurface(SDL_SWSURFACE, PCS, PCS, 32, rmask, gmask, bmask, amask); pos.x=randoon(64)-64; pos.y=randoon(64)-64; SDL_BlitSurface(texbase[randoon(2)+1] , NULL , shae , pos); pos.x=randoon(64)-64; pos.y=randoon(64)-64; SDL_BlitSurface(texbase[randoon(2)+1] , NULL , shae , pos); pos.x=randoon(64)-64; pos.y=randoon(64)-64; // plot the colour over the grey shape creating a coloured shape SDL_BlitSurface(color , NULL , shae , pos); // put the coloured shape into a fresh surface, not sure why this is here :/ SDL_BlitSurface(shae, NULL , surface , NULL); // put the outline over the new coloured shape SDL_BlitSurface(shaem, NULL , surface , NULL); // set the outside of the shape to mask setmaskblack(surface); // create the final coloured outlined masked shape at current screen settings image = SDL_DisplayFormat(surface); SDL_FreeSurface(surface); SDL_FreeSurface(color); SDL_FreeSurface(shae); SDL_FreeSurface(shaem); // return the new coloured shape return image; } hope this all makes sence... thanks. Neil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] ItemizedOverlay example
Hello to all peoples I also beginner on android since 2 months I thinks some one can help me all clever here... I working on maps... I needs help with this example http://developer.android.com/guide/tutorials/views/hello-mapview.html I try same... I have API key and used it I have made properly manifest and main. Map appears and goes to location But Marker does not appear i have store it in drawable folder also I waste lot of time over this... I think you can help me. Please do. My english is poor, please forgive it... Thank you advancely..God is bless you Arvind (arvindis...@gmail.com) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Webview and RTSP link
Hi All, I have a web page that displays product details and thumbnail image of that product. When a thumbnail is clicked, it plays the video of that product via a rtsp link. In Android phone G1, when I view the above page in the browser and click a thumbnail, it plays the rtsp link video perfectly. I have developed a small application in Android which uses the Webview control to display the same web page. In the Webview, the page is getting loaded. But, when I click a thumbnail, the rtsp link video (same as above) is not getting played. Instead, an error message stating that the page may not be available is displayed. I understand that the Webview uses the same code as the browser. But, it is not working in Webview. I am sure I am missing something simple here. Could someone please help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: trouble getting HelloGallery example for android sdk 1.5 to work
you can take the following steps: step 1. append file attars.xml in res/values with content: resources declare-styleable name=Gallery attr name=android:galleryItemBackground /attr /declare-styleable /resources step 2. modify the code from public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes (android.R.styleable.Theme); mGalleryItemBackground = a.getResourceId( android.R.styleable.Theme_galleryItemBackground, 0); a.recycle(); } to public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes(R.styleable.Gallery); mGalleryItemBackground = a.getResourceId( R.styleable.Gallery_android_galleryItemBackground, 0); a.recycle(); } On Jun 12, 1:18 am, ls86 lavanyashas...@gmail.com wrote: hi, I have just installed android 1.5 and finished trying out the Hello Android example. I am now trying out thegalleryexample and I think I am stuck.I pretty much copy pasted the code in the example - changing only the names of the images. I am facing a problem in the ImageAdapter class where I am getting a compile time error android.R.styleablecan not be resolved. I googled and it turns out that other newcomers have also faced this problem. I found this threadhttp://forum.xda-developers.com/showthread.php?p=3861872 here someone has suggested removing android and using just, R.styleable I tried this too and it doesnt seem to work. If someone has faced this problem before and knows how to deal with it or can point me to some useful references, I would really appreciate it. Thanks -ls --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: trouble getting HelloGallery example for android sdk 1.5 to work
you can take the following 2 step: step 1. append file attars.xml in res/values with content: resources declare-styleable name=Gallery attr name=android:galleryItemBackground /attr /declare-styleable /resources step 2. modify the code from public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes (android.R.styleable.Theme); mGalleryItemBackground = a.getResourceId( android.R.styleable.Theme_galleryItemBackground, 0); a.recycle(); } to public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes(R.styleable.Gallery); mGalleryItemBackground = a.getResourceId( R.styleable.Gallery_android_galleryItemBackground, 0); a.recycle(); } On Jun 12, 1:18 am, ls86 lavanyashas...@gmail.com wrote: hi, I have just installed android 1.5 and finished trying out the Hello Android example. I am now trying out thegalleryexample and I think I am stuck.I pretty much copy pasted the code in the example - changing only the names of the images. I am facing a problem in the ImageAdapter class where I am getting a compile time error android.R.styleablecan not be resolved. I googled and it turns out that other newcomers have also faced this problem. I found this threadhttp://forum.xda-developers.com/showthread.php?p=3861872 here someone has suggested removing android and using just, R.styleable I tried this too and it doesnt seem to work. If someone has faced this problem before and knows how to deal with it or can point me to some useful references, I would really appreciate it. Thanks -ls --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Turn page effect implementation
Hi all, since the previous functionality PageTurner is removed, is there any alternative to implement page-turning effect like Stanza on the iPhone? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Is there any method to showAlert?
You can use AlertDialog.Builder: new AlertDialog.Builder(this) .setTitle(Error) .setMessage(my error message') .setPositiveButton(OK, null) .show(); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 2, 11:02 pm, 伟伟 bapuwa...@gmail.com wrote: Hey everybody, I am writing a simply dial program, first I compare the phone number inputed with a pattern, if not match show some alert. but it seems that the showAlert method is not avalibal anymore. is there other method to alert the user? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] post removed about problem starting emulator from command line?
A couple hours ago I posted a message about the problem I am having when I try to start the emulator from the command line even though I can reliably start the emulator from within Eclipse. It appears the post was removed from the group. Why?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: post removed about problem starting emulator from command line?
My mistake. The post is still in the group, but further from the most recent post than I expected. On Jul 6, 12:50 pm, greg sep...@eduneer.com wrote: A couple hours ago I posted a message about the problem I am having when I try to start the emulator from the command line even though I can reliably start the emulator from within Eclipse. It appears the post was removed from the group. Why?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Tutorial for using Android SDK samples with Eclipse
In your Eclipse Menu go to File --Android Project which opens a new window. Select in the Contents section Create project from existing source. Now you can specify in the section called Location where to pick up your existing project (in this case the sample applications). For example the samples on my system are located at android-sdk-mac_x86-1.5_r1/platforms/android-1.5/samples/ApiDemos Now specify for which target you want to build (for example Android 1.5). If everything works fine, you should be able to click on the Finish button to create your Android project with the Android sample code. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 3, 1:27 pm, Brian Jorgenson bjorgenst...@gmail.com wrote: How do I use the android SDK samples with eclipse? Anything I try results in horrible failure, the import dialog fails to find the projects even though I navigated straight to them, so I tried making a new project from existing source and it said Invalid project description I can't find any useful information on how to work with the IDE and get started, all I can do successfully is make new projects from scratch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Google Maps on Android
Hi all, After some tinkering I found that it was a problem with the firewall. All up and running now. Cheers, Geoff. On Jun 17, 5:07 pm, Geoff Newson geoff.new...@googlemail.com wrote: Hi all, I'm joining this thread as I've had the same problem when following the tutorial. I have the INTERNET permission set, as per the tutorial. The manifest is below. I also have a key that was generated from my debug.keystore file. I've put the key into the manifest file, again as in the tutorial but I still only get the grid lines. I read something about signing the app. Does this need to be done as well? Geoff ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.newson.android android:versionCode=1 android:versionName=1.0 uses-sdk android:minSdkVersion=3 / uses-permission android:name=android.permission.INTERNET / application android:icon=@drawable/icon android:label=@string/ app_name uses-library android:name=com.google.android.maps / activity android:name=.HelloMapView android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application /manifest On May 29, 12:25 am, Dave Bordoley bordo...@gmail.com wrote: Did you sign up and configure your application specificmapsdeveloper key? dave On Wed, May 27, 2009 at 10:52 AM, simonfro...@googlemail.com simonfro...@googlemail.com wrote: Hello Everybody! I currently getting started with developing for Android and I was just doing the MapView Tutorial fromhttp://developer.android.com. I managed to get it all working, except I can't see an actualGoogle-Map on my emulator. Instead I'm only seeing that grid, so that I'm assuming the emulator has some problems connecting to the internet. Are there some settings that have to be changed in order to let my emulator use the internet connection of my computer? Thanks in advance! Simon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: CheckBox enabled/disabled reality check
Dear Jack, Thank you for the help with my checkbox reality check. When I programmed the button, there was a point in my onResume method where I have to call setEnabled(false). When switching from a button to a CheckBox, I missed that piece of code. It was easy to correct and is now working as expected. Cheers! Beth On Jul 2, 7:45 pm, Jack Ha jack...@t-mobile.com wrote: setEnabled(false) works fine for CheckBox. What version of SDK are you using? Can you post your code here? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 2, 6:18 pm, Beth Mezias emez...@gmail.com wrote: Hello, I want to switch a button out of my UI in favor of a CheckBox object. However, the enable = false parameter in my layout does not seem to have any effect on a CheckBox! My plan is to code the CheckBox to be enabled when certain other objects are valid. With a button object, the grayness and the lack of response to clicks is clear and obvious. When I use a CheckBox and set it to be disabled it has no effect. The object is drawn the same way with true as it is drawn with false in the enabled/setClickable parameter, the callbacks for the touch events work the same, the object continues to respond to onClick and onCheckedChange events when it is supposed to be disabled. This looks like a bug to me. Has anybody got the setEnabled(false) or setClickable(false) methods working on a CheckBox? Any workaround or explanation would be helpful. Thanks and regards, Beth -- Rita Rudner http://www.brainyquote.com/quotes/authors/r/rita_rudner.html - I was a vegetarian until I started leaning toward the sunlight. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to install and run applications from within another application?
How does the process for retrieving system rights look like? Its a matter of signatures. Whoever signs the system is also going to need to sign any app that wants system privileges. I suppose this problem shouldn't exist if I was able to save the .apk file in the private directory of my application and then invoke the system install UI on the file. Well, no, you can't have your cake and eat it to. The package manager needs to be able to read the APK file to install the app. In order to do this you need to place the APK in a world-readable location because you can't have the same UID or GID as the package manager. No matter what you do, if you want to allow the package manager to read the file, everyone can. Now, if you put the file in your private directory and set the mode to MODE_WORLD_READABLE, the package manager may be able to read the file, I think it should be able to. Everyone else can, but they would have to know the exact path because I don't believe they can list the directory in which the file resides. Now, regardless of where the APK is placed, you should probably delete it after installation, otherwise you're at least doubling storage space required per application. If you delete the APK after its installed, you also fix your install only to device downloaded on. Cheers, Justin Android Team @ Google On Jul 2, 3:48 am, calleandersson calleanders...@hotmail.com wrote: I have been testing with the 'file://' prefix and got the following results: When saving an .apk file in the private directory of my application and trying to invoke the system installation UI, an parse error occured due to permission issues: 07-02 07:15:27.826: WARN/zipro(726): Unable to open zip '/data/data/ test.calle.helloworld/files/AndroidHelloWorld.apk': Permission denied 07-02 07:15:27.826: DEBUG/asset(726): failed to open Zip archive '/ data/data/test.calle.helloworld/files/AndroidHelloWorld.apk' 07-02 07:15:27.846: WARN/PackageParser(726): Unable to read AndroidManifest.xml of /data/data/test.calle.helloworld/files/ AndroidHelloWorld.apk 07-02 07:15:27.846: WARN/PackageParser(726): java.io.FileNotFoundException: AndroidManifest.xml ... 07-02 07:15:27.856: WARN/PackageInstaller(726): Parse error when parsing manifest. Discontinuing installation When I saved the .apk file on the SD card, everything went as supposed and the system installation UI was displayed. So far so good. However, I only want a downloaded .apk file to be installed on the same phone which downloaded it. If the application is placed on the SD card, wouldn't it be possible to use the same SD card in another phone (or copy the .apk file to another SD card used by another phone) and install the application on that phone too? Am I correct in these assumtions? With regards to what I wrote above, is it somehow possible to restrict an application file from beeing installed on any other phone except the very same phone which downloaded the .apk file (using my application)? Is system rights needed? I suppose this problem shouldn't exist if I was able to save the .apk file in the private directory of my application and then invoke the system install UI on the file. Regards, Calle On 1 Juli, 18:22, calleandersson calleanders...@hotmail.com wrote: Hi Justin, Thanks for the tips about the 'file://' prefix and SD card, I will look into that tomorrow. How does the process for retrieving system rights look like? Is it the manufacturer of an Android device which decides if an application should have system rights? I suppose that that kind of clients must be installed/included in the device before it is released or am I wrong? Is there somehow possible to simulate that an application has system rights in the Emulator? By the way, I was thinking of using the same Intent code to start an already installed application but, currently, I'm using the following code which seems to work pretty well (and the class name doesn't need to be specified): Intent intent = getPackageManager().getLaunchIntentForPackage (packageName); startActivity(intent); Regards, Calle On 1 Juli, 17:18, Justin (Google Employee) j...@google.com wrote: The package manager way will not work, you need the permission you referenced, INSTALL_PACKAGES, which only the system has and is not obtainable by user-installed applications. I think your Intent-based method should work, I believe this is more or less what the browser does when you download an APK from the internet. I have two thoughts. First, you haven't specified a proper Uri, you've specified a file path, try file:///data/data/... Second, I'm not sure you can place the file in your app's private directory and have this work, to remove this variable, try placing the APK on the SD card. As far as removing packages, I'm not sure, I'm not sure what Intent you would use to do this, although certainly some
[android-beginners] Re: Can we use gcc for compilation in emulator
There are any number of reasons that might not be working; it sounds like your .so is not in the path. The other issue is that Android does not use the usual glibc, but instead a replacement called 'bionic'. If you are writing a native application, I would recommend looking into the upcoming 'native development kit' for that. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 1, 10:19 pm, ani anish198519851...@gmail.com wrote: Which all compilers are supported in emulator?Actualy i have created native library in .c file and created .so file using gcc and when i am trying to load this .so file in my java file i am getting unable to load .so not found library problem(i have placed .so file in system/ lib using push command) Can i not use gcc compiler or do i need to use some other compiler i tried with arm-eabi-gcc also which is provided in prebuilt directory under toolchain path. Kindly give an example or tell me how to go about it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] No output on the eclipse console
Hi, When i print any output to the console using System.out.println() or when i use the Log class for debug, it is not printing on the eclipse console. I could see the Log class debug message on DDMS monitor console. But not on the eclipse console. Any idea why? -- Thanks and Regards Chinnadurai M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: No output on the eclipse console
chinna Durai wrote: When i print any output to the console using System.out.println() or when i use the Log class for debug, it is not printing on the eclipse console. AFAIK, it is not supposed to. Don't use System.out or System.err in Android apps -- use android.util.Log. If you absolutely need to see stdout/stderr output (e.g., 3rd-party JAR), visit: http://developer.android.com/guide/developing/tools/adb.html and read the Viewing stdout and stderr section. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Tutorial for using Android SDK samples with Eclipse
On Monday 06 July 2009 09:54:59 Roman wrote: In your Eclipse Menu go to File --Android Project which opens a new window. File -- New -- Project... -- Android Project Select in the Contents section Create project from existing source. Now you can specify in the section called Location where to pick up your existing project (in this case the sample applications). For example the samples on my system are located at android-sdk-mac_x86-1.5_r1/platforms/android-1.5/samples/ApiDemos Now specify for which target you want to build (for example Android 1.5). If everything works fine, you should be able to click on the Finish button to create your Android project with the Android sample code. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 3, 1:27 pm, Brian Jorgenson bjorgenst...@gmail.com wrote: How do I use the android SDK samples with eclipse? Anything I try results in horrible failure, the import dialog fails to find the projects even though I navigated straight to them, so I tried making a new project from existing source and it said Invalid project description I can't find any useful information on how to work with the IDE and get started, all I can do successfully is make new projects from scratch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: adb - for developer handsets only
You can run adb against any Android device connected in debugging mode (supported on at least the G1). ADB basically enables a remote console to your device, although technically ADB will generally work carriers like T-Mobile may/are putting their own restrictions on what you can do from the local console (using ADB or launching a console locally on the phone). So, for instance of the commands you currently list, remount, push and install will work but root will not. BTW - I found that push (and likely pull) only works for small files (a few megabytes only). Anything larger than just a few megabytes appears to not only lockup but also dump unreadable files thereby requiring a reformat (I was trying to push to a SDCARD). Tony - Original Message - From: Shawn Brown big.coffee.lo...@gmail.com Sent: Sat, 7/4/2009 4:54am To: android-beginners@googlegroups.com Subject: [android-beginners] adb - for developer handsets only Hello, Is adb for developer phones only? I can't tell from the docs -- Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device!. For instance, if I have a regular phone , could I run ... adb kill-server adb root adb remount adb push test/test.ttf /system/fonts/ adb install test/test.apk or do I need a developer phone for this. Thanks for your reply. Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Doubts with SharedPreference
(1) Yes, it;' absolutely fine I am also using that (2) You can do that like this: user_data_in_shared = mPrefs.getString(Your_Key, NOT_EXIST); If you have already defined your value for the key Your_key, than it will return the value. If no value is set on key Your_Key, then it will simple return the defalut value (whatever you set as second parameter. here NOT_EXIST) (3) Simply replace the value with null. On Jul 6, 6:06 am, chinna Durai chinnadur...@gmail.com wrote: Hi I am developing a game in Android and need to store very few data in a persistance storage. I have few questions over it My first question is I am currently using SharedPreference instead of SQLLite as i have to deal with very less data. so i have chosen SharedPreferance over SQLLite. Is that ok?? Second Question is How to check if the Preference is alreadyExists? I could check if the Key is exists using the method SharedPreferences.containks(String key) but i could not see if there is any method to find if the preference with PreferenceName(Any preference name to store our datas) is already exists??? Third Question is How to delete the entire Preference? -- Thanks and Regards Chinnadurai M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem starting emulator from command line
The reason the android emulator starting from within Eclipse did not appear to have some emulator options available is that I did not fully extend the window shown in response to the Eclipse Run/Run Configurations/Target menu item. Vertically extending that window revealed the Additional Emulator Command Line Options field. The reason for the emulator not starting from the (64-bit Vista) command line is still a mystery. I'll post that problem to the Android Issue Tracker if I don't get any tips from the group. - Greg On Jul 6, 11:18 am, greg sep...@eduneer.com wrote: Although I can reliably start the android emulator from within Eclipse (version 3.4.2), I would like to use some emulator options (e.g., - scale) that don't appear to be available from within Eclipse. However I get a Microsoft Windows error dialog displaying emulator.exe has stopped working whenever I try to start the emulator using the command line emulator -avd my_avd If I disconnect the network, in addition to the emulator.exe has stopped working dialog, the command line response is Warning: No DNS servers found. Note that the android emulator starts avd my_avd reliably from within Eclipse with or without a network connection. This problem is occurring on the android 1.5 platform running on 64- bit Vista. There was a reference to a seemingly similar problem athttp://groups.google.com/group/android-developers/browse_thread/threa..., but I didn't see any resolution to it. By the way, I think the android development environment and documentation is very impressive, especially considering how new it is. I did happen to notice a couple typos in the SDK's emulator documentation athttp://developer.android.com/guide/developing/tools/emulator.html: -- files tht you want -- control the its behaviors Best regards, Greg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: VFY: unable to find class referenced in signature
On Jul 4, 6:28 am, hefeng hefeng.y...@gmail.com wrote: It seems that the XMPPConnection class with its method have been install properly already. I'd guess that the org.jivesoftware.smack.apk file is not present in the process responding to the instrumentation test request. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Garbage Collection of Threads
On Jul 3, 4:50 pm, Drifter daveh...@yahoo.co.uk wrote: I've finally figured out the discrepancy. Using the following code, I ran it through the debugger (in Eclipse, WinXP, emulator) and then ran it just through the emulator - I get different results. The debugger shows TestThread Running while the non-debugger version shows TestThread FinaIizing. I believe the debugger holds a reference to the TestThread which prevents it from getting garbage collected. Yes, I should've spotted that earlier. The debugger queries all threads, and references to the Thread objects get passed around. The debugger support in Dalvik is somewhat simple-minded, and takes the approach that anything the debugger might care about cannot be discarded. (This isn't necessary, but it does make life a lot simpler.) So yes, if you have a debugger attached you're not going to see Thread objects get collected. (You also won't see most Exception objects get cleaned up, which is rather more of a problem.) See Known Issues and Limitations in dalvik/docs/debugger.html, or http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/debugger.html;hb=HEAD . I'll add a note about Thread objects. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Is there any method to showAlert?
i rather preffer override the onCreateDialog method in order to set my dialogs in there but its up to you 2009/7/6 Jack Ha jack...@t-mobile.com You can use AlertDialog.Builder: new AlertDialog.Builder(this) .setTitle(Error) .setMessage(my error message') .setPositiveButton(OK, null) .show(); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 2, 11:02 pm, 伟伟 bapuwa...@gmail.com wrote: Hey everybody, I am writing a simply dial program, first I compare the phone number inputed with a pattern, if not match show some alert. but it seems that the showAlert method is not avalibal anymore. is there other method to alert the user? -- Atte [[Jose Luis Ayerdis Espinoza]] http://blognecronet.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Does anyone think it would be good to save a page in the browser?
--~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Shortcuts
On 2 Jul., 19:42, Danesh Mondegarian danesh...@gmail.com wrote: Hey how would yo make ur program go directly to somewhere in the system lets say settings/applications/manage applications ? startActivity(new Intent (android.intent.action.MANAGE_PACKAGE_STORAGE)); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem starting emulator from command line
that's pretty weird. Can you tell us what is the output of emulator -avd my_avd -debug-all before the crash? On Mon, Jul 6, 2009 at 5:18 PM, greg sep...@eduneer.com wrote: Although I can reliably start the android emulator from within Eclipse (version 3.4.2), I would like to use some emulator options (e.g., - scale) that don't appear to be available from within Eclipse. However I get a Microsoft Windows error dialog displaying emulator.exe has stopped working whenever I try to start the emulator using the command line emulator -avd my_avd If I disconnect the network, in addition to the emulator.exe has stopped working dialog, the command line response is Warning: No DNS servers found. Note that the android emulator starts avd my_avd reliably from within Eclipse with or without a network connection. This problem is occurring on the android 1.5 platform running on 64- bit Vista. There was a reference to a seemingly similar problem at http://groups.google.com/group/android-developers/browse_thread/thread/dcbe8e8fb305982c/b29565044e5abb51?show_docid=b29565044e5abb51 , but I didn't see any resolution to it. By the way, I think the android development environment and documentation is very impressive, especially considering how new it is. I did happen to notice a couple typos in the SDK's emulator documentation at http://developer.android.com/guide/developing/tools/emulator.html: -- files tht you want -- control the its behaviors Best regards, Greg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: ERROR Resource entry main is already defined.
having same problem right now with something i built from scratch, sometimes it does this and sometimes it dosent and it will jump from xml file to xml file --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Intent does not support FloatArrayList ?
Intent supports putIntegerArrayListExtra(String name, ArrayListInteger value) but no corresponding putFloatArrayListExtra. It has putFloatArrayExtra though. Same for Double. Does anyone know why those ArrayList are not supported ? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: ERROR Resource entry main is already defined.
I think I figured it out. When you hit run, make sure you are in (editing) a java program, not an xml file. -Mike On Mon, Jul 6, 2009 at 4:54 PM, Coder Jcoder...@gmail.com wrote: having same problem right now with something i built from scratch, sometimes it does this and sometimes it dosent and it will jump from xml file to xml file --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: adb - for developer handsets only
Thats generally a sign of a bad usb cable - I routinely push 70-90 meg updates and such to sd without issue (except on one cable, which can get really hosed up.) On Mon, Jul 6, 2009 at 2:21 PM, Tony Suton...@su-networking.com wrote: You can run adb against any Android device connected in debugging mode (supported on at least the G1). ADB basically enables a remote console to your device, although technically ADB will generally work carriers like T-Mobile may/are putting their own restrictions on what you can do from the local console (using ADB or launching a console locally on the phone). So, for instance of the commands you currently list, remount, push and install will work but root will not. BTW - I found that push (and likely pull) only works for small files (a few megabytes only). Anything larger than just a few megabytes appears to not only lockup but also dump unreadable files thereby requiring a reformat (I was trying to push to a SDCARD). Tony - Original Message - From: Shawn Brown big.coffee.lo...@gmail.com Sent: Sat, 7/4/2009 4:54am To: android-beginners@googlegroups.com Subject: [android-beginners] adb - for developer handsets only Hello, Is adb for developer phones only? I can't tell from the docs -- Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device!. For instance, if I have a regular phone , could I run ... adb kill-server adb root adb remount adb push test/test.ttf /system/fonts/ adb install test/test.apk or do I need a developer phone for this. Thanks for your reply. Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Random question on app market
After my third phone I can absolutely tell you that the NON paid apps do not follow. My guess is that the market relies on the AndroidID to associate downloads. Since I had not paid for an app yet I cannot give you an answer on paid apps. On Mon, Jul 6, 2009 at 5:47 AM, QLinks qli...@gmail.com wrote: You shouldn't have to pay again! It would be wrong if you did. Nicholas Radford wrote: Okay, so it's not a dev question, but I was wondering if anyone knew. For arguments sake, lets say I had G1, and then later I bought a HTC Hero. I've purchased paid apps on my G1, but now I want to transfer those over to my HTC Hero. Would I have to repurchase them again? or are they linked to my google account or something similar? __ Information from ESET NOD32 Antivirus, version of virus signature database 4219 (20090705) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Writing code is one of few things that teaches me I don't know everything. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: problem starting emulator from command line
Hi David, Thanks for suggesting the -debug-all emulator option. The last line of the -debug-all output was emulator: ERROR: the user data image is used by another emulator. aborting. After closing the existing emulator, the command line emulator -avd my_avd correctly starts the emulator. Apparently when starting the emulator from within Eclipse, my neglect of closing the emulator was countered by an automatic closing. Thanks again, Greg P.S., In reading the SDK emulator documentation at http://developer.android.com/guide/developing/tools/emulator.html, I noticed a few typos -- files tht you want -- control the its behaviors -- you ca start the emulator Is the Android Issue Tracker the proper place to report documentation typos? On Jul 6, 5:58 pm, David Turner di...@android.com wrote: that's pretty weird. Can you tell us what is the output of emulator -avd my_avd -debug-all before the crash? On Mon, Jul 6, 2009 at 5:18 PM, greg sep...@eduneer.com wrote: Although I can reliably start the android emulator from within Eclipse (version 3.4.2), I would like to use some emulator options (e.g., - scale) that don't appear to be available from within Eclipse. However I get a Microsoft Windows error dialog displaying emulator.exe has stopped working whenever I try to start the emulator using the command line emulator -avd my_avd If I disconnect the network, in addition to the emulator.exe has stopped working dialog, the command line response is Warning: No DNS servers found. Note that the android emulator starts avd my_avd reliably from within Eclipse with or without a network connection. This problem is occurring on the android 1.5 platform running on 64- bit Vista. There was a reference to a seemingly similar problem at http://groups.google.com/group/android-developers/browse_thread/threa... , but I didn't see any resolution to it. By the way, I think the android development environment and documentation is very impressive, especially considering how new it is. I did happen to notice a couple typos in the SDK's emulator documentation at http://developer.android.com/guide/developing/tools/emulator.html: -- files tht you want -- control the its behaviors Best regards, Greg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] File operations
Hi there I have an doubt regarding file operations(fread(),fwrite(),fopen (),fclose()) in the NDK,I have an JNI that calls the c program,but i have to do file operations either in JNI,pass to c program or in c or in Java program pass to JNI/C program,If any one know kindly say how to open a file in write mode(create output file),read from file. Thanks Regards Subram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---