[android-beginners] Re: sdk version
When you set up your SDK Location in Eclipse, you should know which SDK version you are using. -- 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 Jun 3, 6:39 am, MMC2 m...@mmc2.com.au wrote: I am using Android and Eclipse. How can I check which version of the android SDK that is installed? --~--~-~--~~~---~--~~ 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: sdk version
Assuming you are using Windows. In Eclipse, click on Windows- Preferences. Then click on Android in the left pane and it will show you the SDK Location on the right pane. Android is usually unpacked in a directory called android-sdk-windows-version. The version number indicates which SDK version your Eclipse is using. Hope that helps. -- 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 Jun 4, 12:02 pm, MMC2 m...@mmc2.com.au wrote: Yes but my question is can the version be checked at a later time or do you have to rely on the memory of the person who installed it. Mike - Original Message - From: Jack Ha jack...@t-mobile.com To: Android Beginners android-beginners@googlegroups.com Sent: Wednesday, June 03, 2009 11:46 AM Subject: [android-beginners] Re: sdk version When you set up your SDK Location in Eclipse, you should know which SDK version you are using. -- 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 Jun 3, 6:39 am, MMC2 m...@mmc2.com.au wrote: I am using Android and Eclipse. How can I check which version of the android SDK that is installed? --~--~-~--~~~---~--~~ 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: Setting up AVD?
Have you installed Java on your machine? You need to make sure java is your PATH or the JAVA_HOME environment variable is defined. -- 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 Jun 4, 6:32 am, alexanderwigm...@googlemail.com alexanderwigm...@googlemail.com wrote: Hey all. (I'm using windows vista) I'm trying to create the hello word app. I set my cmd enviromental variable to the android SDK location, (C: \Android\android-sdk-windows-1.5_r2) In cmd I paste the following: android create avd --target 2 --name my_avd Then I get the following error: Microsoft Windows [Version 6.0.6001] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Users\Alexandroid create avd --target 2 --name my_avd 'java' is not recognized as an internal or external command, operable program or batch file. C:\users\alex... Just noticed that, shouldn't it be? c:\android? --~--~-~--~~~---~--~~ 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: Issues with Hello World
Do you see any error messages in the Console? -- 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 Jun 6, 7:03 pm, Fahd fahdb...@gmail.com wrote: Hi All, I am following the hello world example and when I run it through eclipse, the emulater starts showing android... then it comes in to the system and asks me to press menu to unlock. When I do it, it justs unlocks but there no helloworld or application window, just the normal android desktop! Am I missing somthing?? Following is the code I am running (which is the copy of the example) package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText(Hello, Android); setContentView(tv); //setContentView(R.layout.main); } } Why isnt the helloworld window coming?? Any help plss Fahd --~--~-~--~~~---~--~~ 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 test Sipdroid using an emulator?
Assuming you've already downloaded the SipDroid source (not apk). http://code.google.com/p/sipdroid/source/checkout In Eclipse, 1. Select the File-Import menu item 2. Expand the General group and select Existing Projects into Workspace 3. Click on the Next button 4. Make sure the Select root directory checkbox is selected 5. Click on the Browse... button, navigate to your SipDroid project folder and select it -- 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 Jun 27, 6:16 am, Personality mr.pers...@gmail.com wrote: Thank you for your response. But intention is to run the application using the ADT plugin in Eclipse (which includes the emulator). How do I add this application package as an Eclipse project? I think if I can succeed to that point- then I can complete the work. On Sat, Jun 27, 2009 at 8:11 AM, Nicholas Radford nikradf...@googlemail.com wrote: assuming you have a .apk file adb install package file example adb install myPackage.apk This will require the emulator to have been started, and no android devices connected via usb. On Fri, Jun 26, 2009 at 2:57 AM, Personality mr.pers...@gmail.com wrote: Hello. I have downloaded Sipdroid and I want to test how it works so that I can learn some of the skills that have been used in its development. The problem is- I cannot load the program into the Android emulator. While I know how to create a new folder myself and work with the emulator, how can I load this program into the emulator? (FYI: I am using emulator within Eclipse). Please assist... --~--~-~--~~~---~--~~ 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 can I detect a Landscape and portrait mode in Android?
getResources().getConfiguration().orientation -- 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 Jun 26, 6:05 am, hani kikyoung.k...@gmail.com wrote: How can I know a Landscape and portrait mode in Android programmatically? When I flip on or off using G1, the Android recall onCreate method. When it happens, how can I know the mode ? Is there any API in Activity to know the mode? The below method is not called automatically. public void onConfigChanges(Configuration newConfig) public void onConfigurationChanged(Configuration newConfig) 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: Playing video files
Hi Luca, You may want to take a look at the VideoViewDemo and MediaPlayerDemo sample apps that are part of ApiDemos. -- 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 1, 2:26 am, Luca lucayo...@googlemail.com wrote: Hi, I am trying to play a video file using the following code: MediaPlayer mp = MediaPlayer.create(v.getContext(), R.raw.myvideo); mp.start(); I have tried both an mp4 file and a 3gp file. But when the file plays I can hear it but I cannot see it... Do I have to do something else to give it a surface to render upon? I have followed the instructions in the dev guide but to no avail. 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: Activity / Screen rotation relationship
When you switch from portrait to landscape mode or vice-versa, your activity's onDestroy() and onCreate() will be called. -- 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, 7:13 am, csyperski csyper...@dupage88.net wrote: I have a very simple app activity within an app where there is a single Buttton and an Edit Text used for a user to enter a pin code. Here is my issue, everything works great if the app is kept in portrait mode, but if the screen is rotated to landscape mode it seems like another instance of the activity is being pushed onto the stack, because if you enter the valid pin code the activity does a: setResult( RESULT_OK ); finish(); But returns to (what seems) another instance of the same activity but with the text field cleared. Maybe I am just not understanding that is happening in the activity lifecycle here, if someone could shed some light? Below is the bulk of the code: private SharedPreferences prefs; private String strPin; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.andpinlogin); prefs = PreferenceManager.getDefaultSharedPreferences (this); Button btn = (Button)findViewById(R.id.Button01); btn.setOnClickListener(this); strPin = prefs.getString(pin, ); } @Override public void onClick(View arg0) { if( arg0 instanceof Button ) { EditText txt = (EditText)findViewById(R.id.EditText01); if ( txt != null ) { String strText = txt.getText().toString(); if ( strText != null ) { if ( strText.trim().compareToIgnoreCase(strPin)==0) { setResult( RESULT_OK ); finish(); } else { Toast.makeText(this, Invalid pin code, Toast.LENGTH_LONG).show (); } } } } } Thanks again to anyone that can help me out! --~--~-~--~~~---~--~~ 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
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: Getting images to appear in the Gallery
If your photo data is a Bitmap, you can use the following code segment to insert the photo and it should appear in the Gallery. String uriString = MediaStore.Images.Media.insertImage(getContentResolver(), photo_bitmap, title, description); Uri uri = Uri.parse(uriString); -- 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, 7:44 pm, Jonathan Daugherty drcyg...@gmail.com wrote: Hi all, I'm working on a program that acquires camera captures and I'd like them to appear in the Gallery. I'm storing them on the SD card alongside pictures stored by the native camera application and I've verified with adb shell that the images are physically present, but when I open the Gallery I don't see the ones I've captured with my own application. Any thoughts? The storage URI I'm using to store the images is: android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI I use this code to insert into the ContentProvider: ContentValues values = new ContentValues(); values.put(Media.TITLE, filename); values.put(Media.DESCRIPTION, Image capture by camera); Uri uri = getContentResolver().insert(EXTERNAL_CONTENT_URI, values); And later I open an OutputStream to that URI and save the photo data. Thanks! -- Jonathan Daugherty --~--~-~--~~~---~--~~ 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 is not detecting my new android phone
Did you turn on USB debugging? Settings-Applications-Development-USB debugging -- 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 4, 1:25 pm, N3vik rose.ke...@gmail.com wrote: Anyone got any ideas? Thanks Kevin On Jul 2, 9:35 am, N3vik rose.ke...@gmail.com wrote: Hi I have two G1 phone's, the first one got wet and no longer gets a signal so I had to buy another :( My problem is adb does not detect my new phone :( It can detect my old phone ok, but not the new one. Running adb devices with my old phone connected shows my old phone, but with my new phone I just get an empty list. I'm using Windows Vista. Before people tell me to install the USB drivers, I've already done that. And I've tried adb kill-server. And I've restarted the phone and computer many times. And yes, USB debugging is ticked in the settings of my new phone. And, like I said, it is detecting my old broken phone ok. Any ideas? Please help! Kevin --~--~-~--~~~---~--~~ 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] Re: Adding a view to a viewgroup
Your Court.onDraw() function will not get called by default for efficiency. You need to call setWillNotDraw(false) to enable it. -- 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 7, 5:30 am, Carl carl...@gmail.com wrote: I'm trying to do some simple UI stuff in a game (Basketball). I've created my own Court class (which extends ViewGroup) and I want to add a Ball (extends View) to the court. Unfortunately my ball doesn't show up on the court, and in fact the court doesn't draw either. What have I done wrong? package test.com; import android.app.Activity; import android.os.Bundle; import android.view.ViewGroup.LayoutParams; import android.widget.FrameLayout; import android.widget.LinearLayout; public class test extends Activity { /** Constants */ final int FPAR = LinearLayout.LayoutParams.FILL_PARENT; private FrameLayout main; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.addContentView(new Court(this), new LayoutParams(FPAR, FPAR)); } } package test.com; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.view.ViewGroup; public class Court extends ViewGroup { // court dimensions private int height = 0; private int width = 0; private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); // ball Ball ball; public Court(Context context) { super(context); } @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); // fix the sizes here height = this.getMeasuredHeight(); width = this.getMeasuredWidth(); this.layout(0, 0, width, height); // create a new ball ball = new Ball(this, 100, 100, 20, Color.RED); // put a ball on the court this.addView(ball); } @Override public void onDraw(Canvas canvas) { paint.setColor(Color.RED); Rect rect = new Rect(this.getLeft(), this.getTop(), width, height); canvas.drawRect(rect, paint); // tell the ball to draw itself ball.draw(canvas); } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { // TODO Auto-generated method stub } } package test.com; import android.graphics.Canvas; import android.graphics.Paint; import android.view.MotionEvent; import android.view.View; public class Ball extends View { private int x; private int y; private int r; private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); public Ball(Court court, int x, int y, int r, int color) { super(court.getContext()); mPaint.setColor(color); this.x = x; this.y = y; this.r = r; this.layout(this.x, this.y, this.x + (r * 2), this.y + (2 * r)); this.setOnTouchListener(this.ballTouchListener); } private OnTouchListener ballTouchListener = new OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent event) { // get the location of the click int X = (int)event.getRawX(); int Y = (int)event.getRawY(); Ball ball = (Ball)view; // do stuff, depending on what type of touch motion is occurring switch (event.getAction()) { case MotionEvent.ACTION_DOWN: break; case MotionEvent.ACTION_MOVE: ball.layout(X, Y, X + ball.getWidth(), Y + ball.getHeight()); break; case MotionEvent.ACTION_UP: break; } return true; } }; @Override protected void onDraw(Canvas canvas) { super.onDraw
[android-beginners] Re: Camera issue that i dont understand (PreviewCallBack/PictureCallback)
You might need to create a thread to perform your image processing since the lifetime of the data is limited. That said, you probably need to create a copy of the byte[] buffer from onPreviewFrame() into the thread you created prior to processing. You probably already aware that the preview format is semi-planar YUV420. -- 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 8, 2:47 am, Tinuz i...@webworkz.nl wrote: Hi guys, I have this little thing regarding the camera. Why is the byte array in PreviewCallBack different then the byte array in PictureCallback? The byte array data in the previewCallback is the data i need but i cant seem to acces this. I implemented a PreviewCallback and set the byte[] data into a manager but that causes a out of memory. There must be a way to access this in a nice way. Any thoughts on how to get the byte array i want? Thanks in advance, Martijn --~--~-~--~~~---~--~~ 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: Hello Tutorials - Gallery Example
Create a file called attrs.xml and place the following in it: ?xml version=1.0 encoding=utf-8? resources declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable /resources Then replace the code in ImageAdapter with the following: TypedArray a = obtainStyledAttributes (R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); -- 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 16, 6:30 am, Neilz neilhorn...@googlemail.com wrote: Hi all. I tried this example (http://developer.android.com/guide/ tutorials/views/hello-gallery.html) and found the compilation problems which having done some searching I see that many other people have found the same thing. No one seems to have found a solution to this. It would be great if someone involved could update this example, or provide clear instructions on how to get it working - as it would be a nice feature to try out. The problem stems from the 'styleable' attribute of the following line: public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes (android.R.styleable.Theme); mGalleryItemBackground = a.getResourceId( android.R.styleable.Theme_galleryItemBackground, 0); a.recycle(); } 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: Hello Tutorials - Gallery Example
What's the error message? obtainStyledAttributes() is defined in android.content.Context You might consider cleaning the project and rebuild. -- 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 16, 2:21 pm, Neilz neilhorn...@googlemail.com wrote: Hi Jack, thanks for your response. It still doesn't compile... what is the method obtainStyledAttributes ()? This doesn't resolve. On Jul 16, 4:15 pm, Jack Ha jack...@t-mobile.com wrote: Create a file called attrs.xml and place the following in it: ?xml version=1.0 encoding=utf-8? resources declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable /resources Then replace the code in ImageAdapter with the following: TypedArray a = obtainStyledAttributes (R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); -- 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 16, 6:30 am, Neilz neilhorn...@googlemail.com wrote: Hi all. I tried thisexample(http://developer.android.com/guide/ tutorials/views/hello-gallery.html) and found the compilation problems which having done some searching I see that many other people have found the same thing. No one seems to have found a solution to this. It would be great if someone involved could update thisexample, or provide clear instructions on how to get it working - as it would be a nice feature to try out. The problem stems from the 'styleable' attribute of the following line: public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes (android.R.styleable.Theme); mGalleryItemBackground = a.getResourceId( android.R.styleable.Theme_galleryItemBackground, 0); a.recycle(); } 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: Hello MapView tutorial
Did you obtain the Maps Api key and insert that in android:apiKey in the layout file? Also make sure that your application has requested the INTERNET permission. -- 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 20, 8:12 am, Neilz neilhorn...@googlemail.com wrote: Hi all. I've worked my way through all the tutorials, and the Maps one is now the only one I can't get working. http://developer.android.com/guide/tutorials/views/hello-mapview.html I've followed the instructions, but when the application starts up I get the following message: Sorry! The application HelloMapView has stopped unexpectedly. Please try again. I'm not getting any clues as to why. Does anyone have any ideas what may be wrong, or how I can get some better debug output for this? Many 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: Hello MapView tutorial
Did you see any errors in logcat? Make sure you have the following line in the manifest file: uses-library android:name=com.google.android.maps / Can you post your source file and manifest file 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 20, 9:46 am, Neilz neilhorn...@googlemail.com wrote: Yes, everything is in place as specified in the tutorial. On Jul 20, 4:34 pm, Jack Ha jack...@t-mobile.com wrote: Did you obtain the Maps Api key and insert that in android:apiKey in the layout file? Also make sure that your application has requested the INTERNET permission. -- --~--~-~--~~~---~--~~ 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: XML Documentatin?
Try http://developer.android.com/reference/android/R.styleable.html -- 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 20, 1:56 pm, Micah mic...@gmail.com wrote: Another page that contains some information ishttp://developer.android.com/reference/android/R.attr.htmlwhich appears to list all XML attributes for all elements. Unfortunately, this list doesn't include any information about which elements the attribute goes with. Thickness attribute, for example, is meant to be used with shape anroid:shape=ring android:thickness=3.5sp and it doesn't make much sense in a LinearLayout element LinearLayout android:thickness=3.5sp. Note: To avoid confusion I am still searching for an answer if anyone has one. I'm just trying to keep this thread updated on what I learn in case someone else ends up googling for XML Documentation like I did. On Jul 20, 1:49 pm, Micah mic...@gmail.com wrote: The documentation athttp://developer.android.com/guide/topics/resources/available-resourc... appears to be what I'm looking for except it's incomplete. It doesn't contain information about the shape tag, and I'm not sure what else is missing. :( On Jul 20, 1:36 pm, Micah mic...@gmail.com wrote: When working with android XML files there are a bunch of tags available such as TextView, shape, alpha, set, menu, LinearLayout, etc. Where can I find a list of all of the tags available along with (ideally) documentation on what they are used for and what attributes are available for them? Searching the reference documentation athttp://developer.android.com/reference/packages.htmldoesn'tturnup any useful results, it only seems to return results for the various Java classes. An example of what I'm looking for is the shape tag. Based on examples, It can have solid, stroke and padding tags within it as well as an android:sahpe attribute which can be line and maybe other things (I don't know what else). So where can I find documentation on what tags are valid within a shape/shape block and what attributes are valid on a shape? If I look at the the ShapeDrawable Java class (http://developer.android.com/reference/android/graphics/drawable/ ShapeDrawable.html) I can see some attributes, but android:shape attribute isn't listed yet it's used in one of the examples. I am not even sure if ShapeDrawable is the same as shape or not. :/ At this point I would be even interested in the definitions in code form (perhaps and XML Schema file or something so I at least know what I can type and then I can play around with it to figure out exactly what it does. --~--~-~--~~~---~--~~ 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:
The purpose of TextSwitcher is to animate a text label on screen such that whenever its setText() function is called, it animates the existing text out and animates the new text in. -- 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 21, 7:33 am, saurabh sinha saurso...@gmail.com wrote: I have attached textswicher what is role of textswitcher and its purpose in what situation we use textswitcher what is viewswitcher.viewFactory plz check my example on your emulator and back email with response TextSwitcher.rar 40KViewDownload --~--~-~--~~~---~--~~ 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:
Please refer to the documentation. -- 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 21, 8:22 am, saurabh sinha saurso...@gmail.com wrote: I want to know the difference between intent and intent-filter in android I am just confusing the difference between intent and intent-filter --~--~-~--~~~---~--~~ 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: What is the package name and the Create Activity in wizard of new project (eclipse)
Please take a look at the HelloWorld tutorial: http://developer.android.com/guide/tutorials/hello-world.html -- 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 22, 4:57 am, Carlos Maldonado carlosmaldonadogo...@gmail.com wrote: Hi, im really newbie to java. I know some php and c# and want to start to program for android phones. I get stuck in the very first steps. I already have an eclipse ide with the sdk and the android plugin, but when i try to made a new project it ask me for two things that i have no idea what means. Package name (force) Create Activity (optional) Searching by internet i found that is the same that in java, but i dont know a lot of java, so... ¿any help? By the way, if you know any online tutorial for dummys to get starting to java oriented to android, it would be nice. Thanks for your time and sorry for my english, im spanish :) --~--~-~--~~~---~--~~ 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: Spinner Data Trouble
Take a look at the Spinner1 example in ApiDemos. -- 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 23, 7:01 am, Skeniver skeni...@gmail.com wrote: I suppose I would need to bind the Adapter to the Spinner, wouldn't I... Just noticed that. So while that would help, it still doesn't work... It is force closing... It runs through all the code shown, but my Eclipse debugging skills aren't up to scratch yet, so I don't know really where it is going wrong... Any help would be most appreciated. Thanks again! On Jul 23, 2:32 pm, Skeniver skeni...@gmail.com wrote: Hi there I am a teach-yourself-Android beginner, and this is my first post... I am trying to fill a spinner with a few strings. The layout on its own runs fine, and the code as I have it runs fine, but the spinner involved is not showing the data in the String array... Here is the code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ArrayListString users = new ArrayListString(); ArrayAdapterString aa = new ArrayAdapterString(this, R.layout.main, R.id.SpinAccount, users); users.add(Neil); users.add(Amy); aa.notifyDataSetChanged(); TextView balA = (TextView)findViewById(R.id.TextBalA); balA.setText(1.00); } Where have I gone wrong/what am I missing! Thanks in advance! --~--~-~--~~~---~--~~ 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: Multiple EditText fields per row
Your layout file seems to work fine. I do see 4 EditText fields in the second row. -- 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 25, 6:46 pm, Alex A. ogaku...@gmail.com wrote: Hi all, I started Android development this morning, and that's pretty much what I was doing all day :) It's very exciting and Eclipse plug in is so easy to use!!! Here's a little problem that I ran into with XML. Trying to put 4 EditText fields in one row of a TableLayout as follows: - TableLayout android:layout_height=fill_parent android:layout_width=fill_parent android:id=@+id/MainTable xmlns:android=http://schemas.android.com/apk/res/android; TableRow android:id=@+id/Row1 android:layout_width=wrap_content android:layout_height=wrap_content TextView android:id=@+id/label1 android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/first/ /TableRow TableRow android:id=@+id/Row2 android:layout_width=wrap_content android:layout_height=wrap_content EditText android:id=@+id/inputField1 android:layout_column=0 android:layout_width=30dip android:layout_height=wrap_content android:padding=3dip/ EditText android:id=@+id/inputField2 android:layout_column=1 android:layout_width=30dip android:layout_height=wrap_content android:padding=3dip/ EditText android:id=@+id/inputField3 android:layout_column=2 android:layout_width=30dip android:layout_height=wrap_content android:padding=3dip/ EditText android:id=@+id/inputField4 android:layout_column=3 android:layout_width=30dip android:layout_height=wrap_content android:padding=3dip/ /TableRow /TableLayout - But what this results in is just one EditText field (the first one) taking up the whole second row. What I need is all 4 entry fields in one row. What is the problem here? Any help is appreciated. Alex --~--~-~--~~~---~--~~ 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 convert XML into java code ?
Add the following line after ListView myTextView = new ListView (this); myTextView.setId(android.R.id.list); -- 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 26, 3:44 am, RainBow drvir...@gmail.com wrote: Hi, I am trying to use the LinearLayout class directly in my code , rather than using XML. If I use the XML code, it works fine. However, if I supply my own code in OnCreate() of ListActivity-derived class, it crashes. Here is the XML code and corresponding Java code that I wanna write. Could someone tell me whats wrong with my code? // XML Code : This works just fine LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=fill_parent android:drawSelectorOnTop=false/ /LinearLayout // Corresponding Java Code : this crashes at setContentView() call: LinearLayout ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); ListView myTextView = new ListView(this); int lHeight = LinearLayout.LayoutParams.FILL_PARENT; int lWidth = LinearLayout.LayoutParams.WRAP_CONTENT; ll.addView(myTextView, new LinearLayout.LayoutParams(lHeight, lWidth)); setContentView(ll); //-- this line crashes Thanks, ~Viren --~--~-~--~~~---~--~~ 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: Adding view resource
The error shown in Eclipse should tell you which resource is missing. Double check the resources under the res folder. If possible, please post your code and indicate where the problem is. -- 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 30, 1:57 pm, rizn108 rizn...@gmail.com wrote: there is a problem with .java code. it gives an error when i build it i am using eclipse. it says for a resource id that is not in project i have taken the code from internet . how can i add a resource id that has view type data structure. --~--~-~--~~~---~--~~ 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 Move an Image Using Finger Touch
You can take a look at this tutorial. http://www.anddev.org/viewtopic.php?p=11603 -- 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 Aug 7, 11:24 am, Hamed3d hamed.sa...@gmail.com wrote: Hi there, I am trying to move an image using finger touch.I tried to find a tutorial or sample code for it but I couldn't find anything. Could anyone please help me out here? Thanks in advanced... --~--~-~--~~~---~--~~ 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: plz send me example of startActivityForResult in android
Take a look at the notepad tutorial: http://developer.android.com/guide/tutorials/notepad/notepad-ex2.html -- 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 Aug 8, 8:23 am, saurabh sinha saurso...@gmail.com wrote: plz send me example of startActivityForResult in android --~--~-~--~~~---~--~~ 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: setLayoutParams on a TextView prevents TextView from being displayed
Add the following line in your code: results_table.setColumnShrinkable(0, true); And comment out the descripton_e.setLayoutParams() line as your mentioned. -- 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 Aug 8, 1:52 pm, Stu stuart.gilb...@gmail.com wrote: I'm populating a TableLayout with TableRows containing a TextView each. I want the TextViews to FILL_PARENT width and WRAP_CONTENT on the height. If I don't specify any LayoutParams for the TextView then it shows up in the emulator all on one line going off the screen on the right. If I specify some LayoutParams like the ones below then absolutely no text shows up whatsoever: description_element.setLayoutParams(new LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); I'll paste the relevant code (it gets looped over for a number of JSONObjects) //CODE BEGINS HERE // Create a new TableRow element. TableRow description_row = new TableRow(this); description_row.setLayoutParams(new LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); // Create the new textview for the list and style it. TextView description_e = new TextView(this); description_e.setLayoutParams(new LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); description_e.setText(description); description_e.setPadding(0, 3, 0, 1); // Put the TextView into the row and the row into the table. description_row.addView(description_e); results_table.addView(description_row, new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); //CODE ENDS HERE That code results in the none of the TextViews showing up. Commenting the descripton_e.setLayoutParams line results in single- line TextViews that overshoot the screen width. Adding something like description_e.setWidth(240) results in the TextView being multiple lines, but obviously at a fixed width, which isn't really much use to me. Has anyone encountered this before, or does anyone have any ideas/ suggestions? I'll post my layout file below in case that has anything to do with it: ?xml version=1.0 encoding=utf-8? TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:stretchColumns=0 android:padding=10sp TableRow TextView android:id=@+id/showName / /TableRow TableRow android:layout_width=fill_parent ScrollView android:id=@+id/resultsScrollView android:layout_width=fill_parent android:layout_height=wrap_content android:layout_span=2 TableLayout android:id=@+id/showResults android:layout_width=fill_parent android:layout_height=wrap_content /TableLayout /ScrollView /TableRow /TableLayout Any help or suggestions will be thankfully received as this is driving me crazy! --~--~-~--~~~---~--~~ 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 share data between the program that launches the thread and the thread itself?
You may declare pippo outside of onCreate(). Appropriate locking is needed for shared variable. -- 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 Aug 7, 2:43 am, Android Beginner codesys.cano...@gmail.com wrote: Sorry... must be a very easy question... otherwise I would't be a real Android Beginner... :-) How to share the variable pippo between the program that launches the thread and the thread itself? @Override public void onCreate() { super.onCreate(); int pippo = 5; new Timer().scheduleAtFixedRate(new TimerTask() { public void run() {pippo; };};},0,1000); This is the result of the compiler... Cannot refer to a non-final variable pippo inside an inner class defined in a different method. Many thanks in advance. Regards Android Beginner --~--~-~--~~~---~--~~ 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: Accelerometer and dpad
The accelerometer supports three axes of rotation: forward-backward, left-right, and up-down. Take a look at his sensor simulator: http://code.google.com/p/openintents/wiki/SensorSimulator -- 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 Aug 6, 3:37 pm, Steeler cowboyd...@yahoo.com wrote: I want to include accelerometer support in my app, but the documentation seemed pretty spotty. How many axes of rotation does the accelerometer support, and how do you differentiate between the axes? Also, do *any* current Android phones actually have a dpad? The emulator's not as useful as it could be if it doesn't have any emulation of the accelerometer (if it does, please let me know) and has a dpad instead of the real-life trackball. --~--~-~--~~~---~--~~ 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: Struggling with google maps
Which line in the code that caused the exception? Can you post the complete stack trace 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 Aug 9, 2:20 pm, trostum tros...@gmail.com wrote: Hi. I was following this tutorial:http://mobiforge.com/developing/story/using-google-maps-android on creating map activities, Now i am unable to understand why my application crashes. I get a NoClassDefFoundError and that exception is caused by a Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class. Now i have added the uses-library android:name=com.google.android.maps / as a child element to my aplication and uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/uses- permission and uses-permission android:name=android.permission.INTERNET/ as children of the Manifest element. My avd is running on api level 4 with the google apis. What is wrong? i have searched the web, but nnot found a solution to my problem. Appreciate any thoughts or comments on what might be wrong --~--~-~--~~~---~--~~ 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: Need code sample for double lon= loc.getLongitude();
You need to use the LocationManager: lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); -- 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 Aug 9, 9:22 pm, cellurl gpscru...@gmail.com wrote: From GPS, I am trying to get latitude longitude, bearing and speed. Just a one time snapshot. My code is here:http://code.google.com/p/speedlimit/source/browse/#svn/trunk/Speedlim... Pblm: The loc is always 0. Q: Must I initialize the GPS provider somehow?? Any complete code snippet most welcomed... -excerpt from Speedlimit.java--- Gps gps = new Gps(); gps.doit(); --Gps.java package org.speedlimit; import android.app.Activity; import android.location.Location; public class Gps extends Activity { private Location loc; public void doit() { if (loc != null) { double lat= loc.getLatitude(); double lon= loc.getLongitude(); } }} -- --~--~-~--~~~---~--~~ 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: Need code sample for double lon= loc.getLongitude();
Location is just a class representing a geographic location. You need to do something like this: LocationManager lm = (LocationManager)getSystemService (Context.LOCATION_SERVICE); List providers = lm.getAllProviders(); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener); Location loc = lm.getLastKnownLocation (LocationManager.GPS_PROVIDER); if (loc != null) { // loc.getLatitude() // loc.getLongitude() } private final LocationListener locationListener = new LocationListener() { public void onLocationChanged(Location newloc) {} public void onProviderDisabled(String provider) {} public void onProviderEnabled(String provider) {} public void onStatusChanged(String provider, int status, Bundle extras) {} }; Note: The getLastKnownLocation() method will return null until the provider you specify has gotten at least one update. -- 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 Aug 10, 10:55 am, cellurl gpscru...@gmail.com wrote: Thanks for that. I just want one fix one time, not updates. I will try LM, but why can't I use vanilla Location like the API says? (My question is more of a learning one, if there is a more appropriate Class, why shouldn't I use it?) Everyone says GPS is a battery hog, so I just want to get a fix and turn it off as quickly as possible. -jp Location A class representing a geographic location sensed at a particular time (a fix). LocationManager This class provides access to the system location services. On Aug 10, 12:25 am, Jack Ha jack...@t-mobile.com wrote: You need to use the LocationManager: lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); -- 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 Aug 9, 9:22 pm, cellurl gpscru...@gmail.com wrote: From GPS, I am trying to get latitude longitude, bearing and speed. Just a one time snapshot. My code is here:http://code.google.com/p/speedlimit/source/browse/#svn/trunk/Speedlim... Pblm: The loc is always 0. Q: Must I initialize the GPS provider somehow?? Any complete code snippet most welcomed... -excerpt from Speedlimit.java--- Gps gps = new Gps(); gps.doit(); --Gps.java package org.speedlimit; import android.app.Activity; import android.location.Location; public class Gps extends Activity { private Location loc; public void doit() { if (loc != null) { double lat= loc.getLatitude(); double lon= loc.getLongitude(); } }} -- --~--~-~--~~~---~--~~ 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: Struggling with google maps
Try changing your class name from Map to something else as it might cause conflict with the Android Map class. -- 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 Aug 9, 11:17 pm, trostum tros...@gmail.com wrote: I start my main activity and open the menu. When i click on the map menu i try to launch my mapactivity with the following code: startActivity(new Intent(this, Map.class)); Then my Map class looks like this: public class Map extends MapActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); } protected boolean isRouteDisplayed() { return false; } } I get the following stacktrace: W/KeyCharacterMap( 931): No keyboard for id 0 W/KeyCharacterMap( 931): Using default keymap: /system/usr/keychars/ qwerty.kcm.bin I/ActivityManager( 574): Displayed activity com.deffing.android.jibba/.ShowCounty: 3551 ms W/dalvikvm( 931): Class resolved by unexpected DEX: Lcom/deffing/ android/jibba/Map;(0x43734c18):0x1917a0 ref [Lcom/google/android/maps/ MapActivity;] Lcom/google/androi d/maps/MapActivity;(0x43734c18):0x187680 W/dalvikvm( 931): Unable to resolve superclass of Lcom/deffing/ android/jibba/Map; (62) W/dalvikvm( 931): Link of class 'Lcom/deffing/android/jibba/Map;' failed D/AndroidRuntime( 931): Shutting down VM W/dalvikvm( 931): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 931): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 931): java.lang.NoClassDefFoundError: com.deffing.android.jibba.Map E/AndroidRuntime( 931): at com.deffing.android.jibba.ShowCounty.onOptionsItemSelected (ShowCounty.java:103) E/AndroidRuntime( 931): at android.app.Activity.onMenuItemSelected(Activity.java:2085) E/AndroidRuntime( 931): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected (PhoneWindow.java:820) E/AndroidRuntime( 931): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 139) E/AndroidRuntime( 931): at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:813) E/AndroidRuntime( 931): at com.android.internal.view.menu.IconMenuView.invokeItem (IconMenuView.java:519) E/AndroidRuntime( 931): at com.android.internal.view.menu.IconMenuItemView.performClick (IconMenuItemView.java:122) E/AndroidRuntime( 931): at android.view.View.onTouchEvent (View.java:3828) E/AndroidRuntime( 931): at android.widget.TextView.onTouchEvent (TextView.java:6291) E/AndroidRuntime( 931): at android.view.View.dispatchTouchEvent (View.java:3368) E/AndroidRuntime( 931): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) E/AndroidRuntime( 931): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) E/AndroidRuntime( 931): at com.android.internal.policy.impl.PhoneWindow $DecorView.dispatchTouchEvent(PhoneWindow.java:1691) E/AndroidRuntime( 931): at android.view.ViewRoot.handleMessage (ViewRoot.java:1525) E/AndroidRuntime( 931): at android.os.Handler.dispatchMessage (Handler.java:99) E/AndroidRuntime( 931): at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 931): at android.app.ActivityThread.main (ActivityThread.java:3948) E/AndroidRuntime( 931): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 931): at java.lang.reflect.Method.invoke (Method.java:521) E/AndroidRuntime( 931): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:782) E/AndroidRuntime( 931): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) E/AndroidRuntime( 931): at dalvik.system.NativeStart.main (Native Method) E/AndroidRuntime( 931): Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class E/AndroidRuntime( 931): at dalvik.system.DexFile.defineClass (Native Method) E/AndroidRuntime( 931): at dalvik.system.DexFile.loadClass (DexFile.java:193) E/AndroidRuntime( 931): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203) E/AndroidRuntime( 931): at java.lang.ClassLoader.loadClass (ClassLoader.java:573) E/AndroidRuntime( 931): at java.lang.ClassLoader.loadClass (ClassLoader.java:532) E/AndroidRuntime( 931): ... 22 more I/Process ( 574): Sending signal. PID: 931 SIG: 3 I/dalvikvm( 931): threadid=7: reacting to signal 3 I/dalvikvm( 931): Wrote stack trace to '/data/anr/traces.txt' D/dalvikvm( 740): GC freed 492 objects / 23968 bytes in 205ms I/Process ( 931
[android-beginners] Re: prting procedure for Android on SMDK2440 board
This question is more suitable for the android-porting group. -- 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 Aug 10, 10:04 pm, prasad NSRS prasad.9...@gmail.com wrote: Hi with reference to the posting on the google group of android-beginners@googlegroups.com, Internet Access on ANDROID as it is mentioned like* am working on SMDK2440 board. Android is up and running on the target platform*. and as iam also working for the same but i want some support like how to make to work android on the SMDK2440 boardcan anyone please provide me the *Procedure to Load ANDROID OS on to the SMDK2440 board*.?and supported links if any..and is there any toolchains specific for doing this...? please help me in this regard... -- Regards, prasadNSRS +91 9393858787 --~--~-~--~~~---~--~~ 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: WifiReceiver not part of SDK 1.5???
WifiReceiver is not part of the SDK. Are you referring to the following example? You'll see WifiReceiver extends BroadcastReceiver. http://www.androidsnippets.org/snippets/9/ -- 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 Aug 11, 6:37 am, Abhi abhishek.r.sha...@gmail.com wrote: I don't see this in the list of WiFi classes on the latest documentation found herehttp://developer.android.com/reference/android/net/wifi/package-summa... I am refering to a WifiScanner code (snippet below) to scan wireless networks public class WifiTester extends Activity { TextView mainText; WifiManager mainWifi; WifiReceiver receiverWifi; ListScanResult wifiList; ... and it gives me an error in Eclipse saying 'WifiReceiver cannot be resolved to a type'. Any help would be appreciated. Please also let me knw how to replace the part of code that has WifiReceiver in it with any of the existing classes. Thanks, Abhi --~--~-~--~~~---~--~~ 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: Camera Preview on Emulator
The emulator doesn't support camera emulation. You may want to check out this link: http://www.tomgibara.com/android/camera-source -- 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 Aug 11, 5:23 am, swapnil kamble swap.kam...@gmail.com wrote: Hi, I want to preview my camera on emulator. I have also written small app for that. But it only show black and white squares and gray square moving. Does anybody has any idea about this ? Thanks in advance, Swapnil --~--~-~--~~~---~--~~ 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: trying to download latest, but the downloaded doc reports it's not the latest
There is already a bug report filed against it. http://code.google.com/p/android/issues/detail?id=3424 -- 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 Aug 10, 4:46 pm, Curtis. drum...@gmail.com wrote: Hi all, excuse the doutbless newbie question .. but a quick scan of the FAQ didn't turn up a pertinent answer. I've downloaded 2 version of the dev kit now: http://developer.android.com/sdk/1.5_r2/index.htmlhttp://developer.android.com/sdk/1.5_r3/index.html When I download and unpack, and look at RELEASE_NOTES.html in the top level directory there's a big screaming message that goes like: Android 1.1 SDK, Release 1 February 2009 This is NOT the current Android SDK release. Download the current Android SDK The sections below provide an overview of the SDK package. For more information on this SDK release, read the Release Notes. Is this message just incorrect and needs fixing, or are the files I'm downloading with 1.5 in the title really just 1.1 dev kits? yours confusedly.. Curtis. --~--~-~--~~~---~--~~ 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: WifiReceiver not part of SDK 1.5???
Make sure you have the following line in your AndroidManifest file. uses-permission android:name=android.permission.CHANGE_WIFI_STATE/ uses-permission -- 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 Aug 11, 10:55 am, Abhi abhishek.r.sha...@gmail.com wrote: Hi Jack, posting my reply again... dunno where my previous post went. I have the complete code now but the app force closes on my emulator. Is it because the emulator doesn't support WiFi apps? and force closes when it tries to scan for networks? I thought the emulator would just get stuck at the Starting Scan phase but wouldn't crash... correct? Abhi On Aug 11, 11:41 am, Jack Ha jack...@t-mobile.com wrote: WifiReceiver is not part of the SDK. Are you referring to the following example? You'll see WifiReceiver extends BroadcastReceiver. http://www.androidsnippets.org/snippets/9/ -- 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 Aug 11, 6:37 am, Abhi abhishek.r.sha...@gmail.com wrote: I don't see this in the list of WiFi classes on the latest documentation found herehttp://developer.android.com/reference/android/net/wifi/package-summa... I am refering to a WifiScanner code (snippet below) to scan wireless networks public class WifiTester extends Activity { TextView mainText; WifiManager mainWifi; WifiReceiver receiverWifi; ListScanResult wifiList; ... and it gives me an error in Eclipse saying 'WifiReceiver cannot be resolved to a type'. Any help would be appreciated. Please also let me knw how to replace the part of code that has WifiReceiver in it with any of the existing classes. Thanks, Abhi- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: saving data to text file using eclipse
Context.openFileOutput() opens a private file associated with this Context's application package for writing and the name of the file to open can not contain path separators. Try this: try { File root = Environment.getExternalStorageDirectory(); if (root.canWrite()){ File f = new File(root, test.txt); FileWriter fw = new FileWriter(f); BufferedWriter out = new BufferedWriter(fw); out.write(Hello world); out.close(); } } catch (IOException e) { } -- 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 Aug 11, 1:57 pm, Saeed saeed.pourbagh...@gmail.com wrote: Hi everyone, I am trying to save data to my google phone G1. I am able to create the text file in sdcard by using the following code in eclipse : //++ try { FileWriter f = new FileWriter(/sdcard/test.txt); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } //+ but I am not able to save any data to the created file. I found this code from http://www.anddev.org/working_with_files-t115.html; which says I can write to text file by running this code. //+++ try { // catches IOException below final String TESTSTRING = new String(hello); FileOutputStream fOut = openFileOutput(/sdcard/test.txt, MODE_WORLD_READABLE); OutputStreamWriter osw = new OutputStreamWriter(fOut); // Write the string to the file osw.write(TESTSTRING); // ensure that everything is // really written out and close osw.flush(); osw.close(); } catch (IOException ioe) { ioe.printStackTrace(); } //+ I run it but I do not see any change in my file. first, I thought my problem is permission to file. The permission setting on my phone is: data : drwxrwx--x sdcard : d---rwxrwx system : drwxr-xr-x would you please help me in either in correcting the code or finding a way to save data into text file (saved in sdcard or the phone) in eclipse environment thanks in advance --~--~-~--~~~---~--~~ 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 can I use methods from an activity in other activities
As the error indicated, your final htest variable is not initialized. You probably should move those set* functions into a separate utility class. -- 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 Aug 12, 1:38 am, Hamed3d hamed.sa...@gmail.com wrote: Basically, I have two different Activities, one of them has 2 member functions which I want to use them in other activities. so here in Splash class activity, I referenced to Htest class: private final Htest htest; htest.setNoTitle(); but I get this error: The blank final field hsudoku may not have been initialized Please look at the following code and u will see what I mean. here is the activity which has two member functions public class Htest extends Activity implements OnClickListener{ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setNoTitle(); //no Title setFullscreen(); //Full screen setContentView(R.layout.main); } } public void setFullscreen() { getWindow().setFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } public void setNoTitle() { requestWindowFeature(Window.FEATURE_NO_TITLE); } } now here is another activity which I want to reference to those member functions public class Splash extends Activity { private final Htest htest; //reference to Htest class private Splash_view splashview; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); htest.setNoTitle(); // this gives me this error: The blank final field hsudoku may not have been initialized //splashview splashview = new Splash_view(this); setContentView(splashview); splashview.requestFocus(); } --~--~-~--~~~---~--~~ 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: Play Audio File (stored in files directory)
Use Environment.getExternalStorageDirectory(). -- 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 Aug 12, 11:45 pm, Ankit Shah ankit9...@gmail.com wrote: Thanks chinchin. I would like to to store audio file (wav file) in SD Card programmatic (at runtime). In my application when user clicks on Download button it will downloads audio file and should stores in SD Card. Right now able to download audio file from server and also able to store in files folder (i.e /data/data/com.myapp/files/a.wav) but i would like to store this file in SD Card. Any pointer or help on this would be greatly appreciated. Thank You. --~--~-~--~~~---~--~~ 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: Could not find XXXX.apk!
Try Project-Clean... and make sure Project-Build Automatically is on. What version of Java are you using? -- 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 Aug 13, 12:49 am, Junaid Kirkire billyjac...@gmail.com wrote: Guys, I am new to Android and I have installed Android SDK windows-1.5_r3 and I am using Eclipse Ganymede. I have also installed the ADT plugin through Help--Software Updates. I followed the 'Hello World' tutorial and when I run it in Eclipse IDE, the following error is generated. [2009-08-13 13:12:39 - HelloWorld] -- [2009-08-13 13:12:39 - HelloWorld] Android Launch! [2009-08-13 13:12:39 - HelloWorld] adb is running normally. [2009-08-13 13:12:39 - HelloWorld] Could not find HelloWorld.apk! Please help me fix this problem. 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: Simple Google Maps App
You will find quite a few tutorials at this link as well: http://www.anddev.org/viewforum.php?f=18 -- 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 Aug 12, 11:33 pm, Maxood maqs...@salsoft.net wrote: I like to develop a simple Google maps application. Please let me know any tutorial available Thank you, Maqsood --~--~-~--~~~---~--~~ 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: Android VM for Windows5 Mobile
I suggest to ask this question on the android-porting group instead. -- 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 Aug 12, 11:41 pm, Rauf Ahmad rauf.pu...@gmail.com wrote: plz Tell me that how i can install the Application in Windows5 mobile --~--~-~--~~~---~--~~ 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: Solution Related to emulator
What's the issue? Did you set up the AVD properly? -- 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 Aug 12, 11:34 pm, Rauf Ahmad rauf.pu...@gmail.com wrote: I have the solution of problem related to android emulator problem. I'm trying to get the HelloAndroid app up and running. I can run the emulator from the command line just fine, but there seems to be an issue from running it within eclipse when i'm ready to launch my app. I tried searching for some of these terms and found no luck, anybody else with this issue or some advice? The solution is go to Run Dialogue Box then Target and check the Emulator as Manual and every when you run the Application the new Emulator will Launched. the Problem will Solve --~--~-~--~~~---~--~~ 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: Overlay events not go to MapView
Are you calling MapView.setOnTouchListener()? Have you tried extending MapView and overriding onTouchEvent()? -- 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 Aug 12, 11:11 pm, ron ronaldy...@gmail.com wrote: Hi, I have created an Overlay on a MapView and I want that when the edit mode is on, I can drag stuff on the Overlay but the underlying google map will not receive those touch events. How can I do that? I tried to create a custom view and override functions like dispatchTouchEvent when is in edit mode but that will also block touch events from going to the Overlay also.. how events are dispatched in Android? thanks. Ron --~--~-~--~~~---~--~~ 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: Populate spinner
Can you be more specific on what you mean menu.add()? -- 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 Aug 13, 11:55 am, tinyang tiny...@earthlink.net wrote: Is the only way to populate a spinner to use an array, or can something like the menu.add() be used? -- :-) P Please don't print this e-mail unless you really need to. --~--~-~--~~~---~--~~ 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: Delete Note does not work in the Notepadv2 example
onCreateContextMenu() is being used for performing a long- clicked (at least 2 seconds) on the item. -- 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 Aug 18, 12:06 am, Belik77 beli...@walla.co.il wrote: Hi all, I am new to android developing. I am very pleased with the tutorials that google add to the developer site. it is very clear and easy to learn. I am now going trough the Notepad Tutorial and I have problem with the second exercise. Notepadv2. after i have done all the steps, and run the application, i do not see the Delete Note menu item. I have only the Add Note menue item. (it does not work even in the Notepadv2Solution project!) Also, I do not understand why we use the method: public boolean onCreateContextMenu to add the Delete Note menu item whereas we used other method to add the Add Note menu item. I have tried to debug the application and noticed that basically the application does not enter into the public boolean onCreateContextMenu method and thus probably, it does not add the Delete Note menu item. Thanks allot for your help. Eli. --~--~-~--~~~---~--~~ 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: Comparing different dates
The year specified in setYear() should be the year since 1900. That said, it should be 109 (2009-1900) instead of 2009. -- 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 Aug 18, 5:01 pm, Stephen Lebed srle...@gmail.com wrote: How would I compare the current date against a date I've set to determine if today is before or after the set date? I've tried the following, but its not working Date endTime; { endTime = new Date(); endTime.setMonth(11); endTime.setYear(2009); } Date trialTime; { trialTime = new Date(); trialTime.getMonth(); trialTime.getYear(); } boolean test = endTime.before(trialTime); Any help is greatly appreciated. --~--~-~--~~~---~--~~ 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 runnin Hello World Programme
It seems like you are running your program as Android JUnit Test as opposed to Android Application. -- 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 Aug 19, 11:43 am, kapil kapil83...@gmail.com wrote: hi there, i m trying to run Hello World programme , problem i am facing is the following error when i run the programme : ERROR: Application does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner before this it was givin java nullpointerexception error . i've just formatted my mashine n b4 formatting i was not havin any problem in runnin the programme. Thanks in advance, Kapil --~--~-~--~~~---~--~~ 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: Flash based games on Android
The following links should help you get started on game development: Getting Started in Android Game Development http://www.rbgrn.net/content/54-getting-started-android-game-development Writing Real-Time Games for Android http://code.google.com/events/io/sessions/WritingRealTimeGamesAndroid.html -- 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 Aug 21, 6:45 am, Maxood maqs...@salsoft.net wrote: I want to develop and application that will be a clone of flash based online game. I need to know what resources would i require as a beginner. I like to start off with small games. Please let let me know about tutorials, articles, books, etc. Thanks, Maxood --~--~-~--~~~---~--~~ 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: installing the android sdk
The WST plugin should already be included in most Eclipse IDE packages. -- 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 Aug 22, 9:31 am, nmharleyrider nmharleyri...@gmail.com wrote: In the instructions for installing Eclipse 3.4 ganymede and the android sdk , it is stated in step 6 that you need the WST plugin mentioned earlier in this page. Yet I have searched for an hour including all the links in this section and cannot find any reference regarding how to install the WST plugin. Help please, and thanks in advance. nmharleyrider --~--~-~--~~~---~--~~ 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: Add one butten in a tab
Take a look at this link: http://jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/ -- 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 Aug 25, 3:39 am, Chri chr_0...@yahoo.de wrote: hi! I just started with android and now i have a problem! I want to add a button in a tab. In time I just can show text and i don ´t know how i add this button! my code is: in the .xml file: ?xml version=1.0 encoding=utf-8? TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content / FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/textview1 android:layout_width=fill_parent android:layout_height=fill_parent android:text=Tickets / TextView android:id=@+id/textview2 android:layout_width=fill_parent android:layout_height=fill_parent android:text=Tasks / TextView android:id=@+id/textview3 android:layout_width=fill_parent android:layout_height=fill_parent android:text=Settings / /FrameLayout /LinearLayout /TabHost and my .java file: package com.example.workingcodes; import android.app.TabActivity; import android.os.Bundle; import android.widget.TabHost; public class WorkingCodes extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TabHost mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator (Tickets).setContent(R.id.textview1)); mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator (Tasks).setContent(R.id.textview2)); mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator (Settings).setContent(R.id.textview3)); mTabHost.setCurrentTab(2); } } I want a button in the third tab! How i do this?! plz help! wkr chri --~--~-~--~~~---~--~~ 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: failed to locate packages - Eclipse IDE
In Eclipse, go to your project properties and select Java Build Path. Then select the Libraries tab and you can add your external jar file there. -- 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 Aug 26, 1:47 am, Belik77 beli...@walla.co.il wrote: Hi, I am developing an application and i have importaed a JAVA file that uses several packages that my Eclipse does not recognize: import javax.xml.transform.*; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.dom.DOMSource; this is the code, that is not compiled: //Transform and write the Document to the stream TransformerFactory tf = TransformerFactory.newInstance(); Transformer tr = tf.newTransformer(); Source input = new DOMSource(xmlDoc); Result output = new StreamResult(out); tr.transform(input, output); out.flush(); out.close(); what should i need to install and how, so my SDK will be compatible? Thanks allot for your help. Eli. --~--~-~--~~~---~--~~ 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: App just for Android beginners
Useful app...Thanks! -- 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 Aug 21, 12:47 pm, Andrei gml...@gmail.com wrote: Guys, I wrote app for Android phone that can help you to learn Android / plan your next App. It is FREE and searchable app for all Android API documentation. It works off-line, no need for connection. Give it a try. Search for DroiDoc on Market on your phone 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: sdk help
Android API reference is located here: android_root/docs/reference/packages.html Also check out the Developer Guide: android_root/docs/guide/index.html where android_root is the directory where you installed the Android SDK. They are also available online: http://developer.android.com/index.html -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Aug 30, 10:18 pm, kapil.k kapnk...@gmail.com wrote: hello , i will sound very basic but i really dont know.where do we see the android sdk help about its all classes n api n its sample application.i installed it on xp but i doesnt found any in my android folder.looking forward to your reply --~--~-~--~~~---~--~~ 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: Sdcard error
Did you run the emulator? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 1, 12:51 am, Alok kulsu...@gmail.com wrote: Hi guys, I created an SDCARD using command mksdcard 2048M sdcard This created an SDCARD in the tools directory Now when i tried to add an MP# file to it adb push D:\..\abc.mp3 /sdcard It gives error error: device not found What am i missing ?? Thanks , Alok. --~--~-~--~~~---~--~~ 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: Map view
Take a look at some of the Map tutorials here: http://www.anddev.org/viewforum.php?f=18 -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 1, 3:49 am, Sasi Kumar sasikumar.it1...@gmail.com wrote: Can any one help to create map view with a marker. When we are clicking marker it should display info window. By clicking that info window it shoul goto another layout. Ple. reply me. thanks in advance. --~--~-~--~~~---~--~~ 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 export data to excel?
You can query the data from the database and then write the data into a CSV file. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Aug 31, 11:13 pm, JUN youk...@gmail.com wrote: Hello all, I want to export sqlite data to excel format in android? how to do it? 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: easy stuff please reply
Have you tried using PrintWriter? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 3, 9:33 pm, kapnk...@gmail.com wrote: i checked this but it takes string as a parameter but write as a charactor only in the file.so again space is there. On Thu, Sep 3, 2009 at 7:35 PM, Justin Anderson janderson@gmail.comwrote: Why not use one of the methods from OutputStreamWriter that takes a string as a parameter? http://developer.android.com/reference/java/io/OutputStreamWriter.html -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Sep 3, 2009 at 6:15 AM, kapil.k kapnk...@gmail.com wrote: hello guys i am writing the data in text file with help of fos = new FileOutputStream(file); out1 =new OutputStreamWriter(fos); out=new DataOutputStream(fos); String Dpass = new String (1008); out.writeChars(Dpass); but in file due to char it is leaving space after each charactor.so how should i store so the will be no sapce. also which api should i used to delete containt of the file? thank you --~--~-~--~~~---~--~~ 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: Streched Spinner
Try: SpinnerAdapter adapter = new ArrayAdapterString(this, android.R.layout.simple_spinner_item, cities); adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 4, 3:55 pm, AlexDemers demers.a...@gmail.com wrote: Hi, I have 3 spinners: 2 using a strings.xml and the third one is binded with a SpinnerAdapter: SpinnerAdapter adapter = new ArrayAdapterString(this, android.R.layout.simple_spinner_dropdown_item, cities); spinner.setAdapter(adapter); For some odd reason, I get a streched spinner and a radio button inside the box:http://imgur.com/eRdek.png I tried changing to simple_spinner_dropdown_item to simple_spinner_item but when I see the list of selectable values, each of them is really thin and hard to chose with the finger:http://imgur.com/7I05G.png How can I correct this behaviour? --~--~-~--~~~---~--~~ 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: Spinners
Remove the following line: testSpinner.setBackgroundColor(Color.BLUE); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 9, 2:19 am, EverettG egoode...@speakeasy.net wrote: I am creating a Spinner but when it displays in the Emulator it does not display any sort of arrow to let the user know to click on it. If you click on it, it works properly and you can choose from the items. I have looked through Internet resources and three books but cannot seem to find an answer to this. Here are my files: spinner.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent Spinner android:id=@+id/testSpinner android:layout_width=fill_parent android:layout_height=wrap_content android:drawSelectorOnTop=true / Button android:id=@+id/enableToggleButton android:layout_width=fill_parent android:layout_height=wrap_content android:text=Set enable toggle / Button android:id=@+id/changeColorButton android:layout_width=fill_parent android:layout_height=wrap_content android:text=Change Spinner Background Color / /LinearLayout arrays.xml ?xml version=1.0 encoding=utf-8? resources string-array name=months itemJan/item itemFeb/item itemMar/item itemApr/item itemMay/item itemJun/item itemJul/item itemAug/item itemSep/item itemOct/item itemNov/item itemDec/item /string-array /resources TestSpinner.java package com.aapg.AndroidViews; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; public class TestSpinner extends Activity { private int spinnerBackgroundColor = Color.BLUE; //private static final String[] MONTHS = new String[] // {Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.spinner); //Get a reference to the Spinner. final Spinner testSpinner = (Spinner)findViewById(R.id.testSpinner); testSpinner.setBackgroundColor(Color.BLUE); //Set up the ArrayAdapter. //ArrayAdapterString arrayAdapter = new ArrayAdapterString(this, //android.R.layout.simple_spinner_item, MONTHS); ArrayAdapterCharSequence arrayAdapter = ArrayAdapter.createFromResource(this, R.array.months, android.R.layout.simple_spinner_item); //Set up the DropDownViewResource. arrayAdapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item); //Attach the Spinner to the ArrayAdapter. testSpinner.setAdapter(arrayAdapter); final Button enableToggleButton = (Button)findViewById (R.id.enableToggleButton); enableToggleButton.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { changeEnabled(testSpinner); }//onClick(). });//Button.setOnClickListener(). final Button changeColorButton = (Button)findViewById (R.id.changeColorButton); changeColorButton.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { changeSpinnerBackgroundColor(testSpinner); }//onClick(). });//Button.setOnClickListener(). }//onCreate(). public void changeEnabled(Spinner testSpinner) { if(testSpinner.isEnabled()) { testSpinner.setEnabled(false); }//if(testSpinner.isEnabled()). else { testSpinner.setEnabled(true); }//else. }//changeEnabled(Spinner testSpinner2). public void changeSpinnerBackgroundColor(Spinner testSpinner) { if(spinnerBackgroundColor == Color.BLUE) { testSpinner.setBackgroundColor(Color.YELLOW); spinnerBackgroundColor = Color.YELLOW; }//if(SPINNER_BACKGROUND_COLOR == Color.BLUE) else { testSpinner.setBackgroundColor(Color.BLUE); spinnerBackgroundColor = Color.BLUE; }//else. }//changeSpinnerBackgroundColor(Spinner testSpinner). }//AutoComplete class. Thanks for your help. EverettG. --~--~-~--~~~---~--~~ You received this message because you are subscribed
[android-beginners] Re: error in installing .apk file
You don't need to specify file:// new File(/sdcard/DCIM/Opi.apk) -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 10, 1:00 am, Mahsa M mahsa.movah...@gmail.com wrote: Hi all I have a code to install one apk file in my sdcard, Intent intent = new Intent(Intent.ACTION_VIEW); Log.e(test,test); intent.setDataAndType(Uri.fromFile(new File(file:///sdcard/DCIM/Opi.apk)), application/vnd.android.package-archive); Log.e(test2,test2); startActivity(intent); but I got the error on emulator that say parser can not pars your data,I was wondering if any body can help me, thanks, Mahsa --~--~-~--~~~---~--~~ 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: Security framework available on android??
Assuming this is what you are looking for: http://developer.android.com/guide/topics/security/security.html -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 9, 9:46 pm, Sudeep Jha sudeep.neti...@gmail.com wrote: Which security framework is available or can be ported to android ? Warm Regards, Sudeep --~--~-~--~~~---~--~~ 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: ColorStateList creation
You can do something like: XmlResourceParser xpp=Resources.getSystem().getXml (R.color.mycolor); ColorStateList csl = ColorStateList.createFromXml(getResources(), xpp); where R.color.mycolor is your XML resource file. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 12, 4:21 am, manigault manig...@gmail.com wrote: I want to create color state list from xml file containing a selector. From the documentation its seems that i have to use static ColorStateList createFromXml(Resources r, XmlPullParser parser) but i can't figure out what parameters to pass. I guess i can use : XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParser parser = factory.newPullParser(); to obtain the parser but what about the xml file that i want to parse. 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: Basic App -- not working
You must specify the layout_width and layout_height attributes for the EditText. android:layout_width=fill_parent android:layout_height=wrap_content -- Jack Ha Open Source Development Center ·T· · ·Mobile· stick together The coverage you need at the price you want 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 Sep 11, 9:03 am, Felix Oghina felix.ogh...@gmail.com wrote: I went through the NotePad tutorials and got the minimum hang of it. Unfortunately, when I tried creating my own application, I failed. Here's my main class file: package com.tastekid.TasteKid; import android.app.Activity; import android.os.Bundle; public class TasteKid extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } Here's main.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent EditText android:id=@+id/search_input / /LinearLayout When I try to start the app on the emulator I get an The application TasteKid (process com.tastekid.TasteKid) has stopped unexpectedly. Please try again. with a Force close button. I have absolutely no idea what I am doing wrong :-( --~--~-~--~~~---~--~~ 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 receive general IO events ?
Maybe FileObserver is what you are looking for: http://developer.android.com/reference/android/os/FileObserver.html -- Jack Ha Open Source Development Center ·T· · ·Mobile· stick together The coverage you need at the price you want 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 Sep 10, 11:26 am, daemonserj daemons...@gmail.com wrote: Hello All! Is it possible to be notified about general IO in system ? For example I want to receive some file reading events and blinking with some indicator... --~--~-~--~~~---~--~~ 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: Populate spinner
You need to use an adapter to provide the data for the spinner. You will get an UnsupportedOperationException exception if you call Spinner.addView(). -- Jack Ha Open Source Development Center ·T· · ·Mobile· stick together The coverage you need at the price you want 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 Aug 13, 12:47 pm, tinyang tiny...@earthlink.net wrote: Here is a webpage with a menu.add() example:http://www.brighthub.com/mobile/google-android/articles/28673.aspx This example is what I am referring to with menu.add(). -Original Message- From: android-beginners@googlegroups.com [mailto:android-beginn...@googlegroups.com] On Behalf Of Jack Ha Sent: Thursday, August 13, 2009 2:32 PM To: Android Beginners Subject: [android-beginners] Re: Populate spinner Can you be more specific on what you mean menu.add()? -- 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 Aug 13, 11:55 am, tinyang tiny...@earthlink.net wrote: Is the only way to populate a spinner to use an array, or can something like the menu.add() be used? -- :-) P Please don't print this e-mail unless you really need to. No virus found in this incoming message. Checked by AVG -http://www.avg.com Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/12/2009 6:12 PM --~--~-~--~~~---~--~~ 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: ADT Plugin for Eclipse
What did you see on the right pane when you clicked on Eclipse- Preferences-Android? -- Jack Ha Open Source Development Center ·T· · ·Mobile· stick together The coverage you need at the price you want 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 Sep 10, 10:00 pm, David Kebo davidk...@gmail.com wrote: I run snow leopard ans installed Eclipse + the ADT Plugin for Eclipse. When I try to create a new project in Eclipse in shows the location of the android sdk has not been setup. I go to the Eclipe Preferences tab Android, but I cannot find the SDK location. Any help please ? --~--~-~--~~~---~--~~ 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: MapView : Don't show the labels
It is currently not supported. -- Jack Ha Open Source Development Center ·T· · ·Mobile· stick together The coverage you need at the price you want 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 Sep 10, 4:59 am, waterbed gaston.aze...@gmail.com wrote: Hello, In Google maps the user can remove the labels (I mean street and town names), when he chooses the satellite view. I would like to do the same thing with a MapView object in Android, but I don't find a setter like setShowLabel(boolean). Could anyone help me to do this? Best regards. Thomas --~--~-~--~~~---~--~~ 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 add my own menu item into the already existing menu in the sms application
Here is an example and you probably can make it to work with SMS. http://www.anddev.org/viewtopic.php?p=25639 -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 15, 5:13 am, Oskar cov.johans...@gmail.com wrote: Hi, I would like to add my own menu item into the already existing menu in the sms application. E.g when the user is reading a sms and highlights an attached link to a web page and pressing menu. Is it then possible for me to add my own menu item in this already existing menu. I would like to use the attached link and send it to my application when selecting my menu item from the already existing SMS menu. I would appreciate very much if someone could give me some hints regarding what I need and how to get started. Maybe such things are described somewhere? Thanks, Oskar --~--~-~--~~~---~--~~ 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 change text in a Button
Please refer to the Android Developer Guide. button.setText() -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 15, 9:34 am, cellurl gpscru...@gmail.com wrote: Hi, On the fly, I want to change the text shown in a Button. Q: How do I do that. My teacher held me back a year from Android school ;-) (newbie again) jim --~--~-~--~~~---~--~~ 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: MediaPlayer pause and seek
seekTo() is an asynchronuous call and the actual seek operation may take a while to finish. If an OnSeekCompleteListener has been registered beforehand via setOnSeekCompleteListener (OnSeekCompleteListener), it will get called. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 15, 4:01 am, manigault manig...@gmail.com wrote: Hi i want to be able to pause the MediaPlayer and then seek to given position. I do the following : mPlayer.pause() - mPlayer.seekTo(myPosition); - mPlayer.start();but the player start playing from the position the pause was called; Can i use seekTo after when i paused the player ? --~--~-~--~~~---~--~~ 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: Android in Eclipse - package name problem - please help
It seems likes your AndroidManifest.xml file is corrupted. Make sure there are no spaces before this line: ?xml version=1.0 encoding=utf-8? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 16, 6:31 am, Mimi mimik...@gmail.com wrote: Thank you so much for your response and info, Raphael. How can I change the Navigotor view to Java namespaces? Under the package explorer, View Menu/Package Presentation, I changed the selection from flat to hierarchical and the reverse. It did not have an impact on the presenation of com.mimi.App. It is still hierarchical. Other projects in the same workspace all displayed 'flat' when it comes to com.mimi.App and were not affected by the changtes of the selection either. The parse error that I am having on my Manifest file is: [2009-09-15 17:11:49 - com.android.ide.eclipse.common.project.AndroidManifestParser] Parser exception for /Simple Flashlight/AndroidManifest.xml: The processing instruction target matching [xX][mM][lL] is not allowed. I think I did move this whole Project folder from one dir to another when I was organizing my folders. If that is the culprit, I donnot know why that is and how to fix it. Any ideas on my error above? Tips, hints and suggestions would be greatly appreciated. Many Thanks...Mimi On Sep 15, 7:46 pm, Raphael r...@android.com wrote: First check that you're not using the Navigator view instead (which shows files, not Java namespaces). In the package explorer, click on the View Menu (a little triangle just above the scrollbar in the explorer view. Select Package Presentation and change it from flat to hierarchical, or the reverse. R/ On Tue, Sep 15, 2009 at 4:06 PM, Mimi mimik...@gmail.com wrote: As I was coding, building and testing my Android App merrily along, it seemed all of a sudden, the parsing/compile failed. Error is on the Manifest complaining that a file could not be found in the package mimi.package.newApp. What I found out under the Ecplise Explorer was that the com.mimi.package package name was no longer a string but got fragmented as folders i.e. src/com/mimi/package. Same with gen/com/ mimi/package. I must have done something unintentionally to cause this but what is it? Any ideas and suggestions would be greatly appreciated. Many Thanks...Mimi --~--~-~--~~~---~--~~ 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: Android Emulator suddenly won't boot...
Have you looked at the adb logcat output? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 16, 5:10 am, furby wookie...@gmail.com wrote: I had the 1.5 android emulator starting from Eclipse perfectly nicely until yesterday when it suddenly won't finish booting. I haven't installed anything new (Running it on Windows Vista - i know, uck, but I'm waiting for Win 7 to hurry up), haven't even changed the java code I am trying to run... The emulator starts up, get's to the point where it shows Android with the nice lighting effect that goes from left to right over it and then just stays in that state. Last night I tested it by starting it up, going out to the living room, watching two hour long episodes of the first series of Doctor Who, and then coming back in (Essentially giving it 1.5 hours to do it's stuff) - it was still stuck in that state Any ideas what I did wrong? --~--~-~--~~~---~--~~ 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: Android application enable handset
http://en.wikipedia.org/wiki/Android_(operating_system)#Hardware_products_running_Android -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 16, 3:10 am, Ajaz Ahmed ajazahme...@gmail.com wrote: Hi, Can any one send me the list of android application enable handset, where i can install my android application? want to know about company,model ?? Regards! --~--~-~--~~~---~--~~ 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: Which version of Android?
Eclipse 3.5 (Galileo) should work but you can download Eclipse 3.4 (Ganymede) from here: http://www.eclipse.org/downloads/packages/release/ganymede/sr2 -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 15, 11:28 am, oregonduckman oregonduck...@gmail.com wrote: The 1.5 installation notes refer to Eclipse 3.3 (Europa) or Eclipse 3.4 (Ganymede). When I looked on Eclipse website I could not find a reference to either version, can someone point me to the correct version of Eclipse that will work with the 1.5 SDK? 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: sendBroadcast compile error
sendBroadcast() is part of the Context class. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 16, 12:11 am, Tim timothy.edwa...@gmail.com wrote: Im really new to android development (and java in general), and I seem to have run into a design issue. Background: Im working on an application that automatically turns the speaker phone on when you are on a call and lay the phone down on a flat surface. Since this is my first real android app, I am building it as I learn. Right now it isn't even running as a service. I have broken the app down so far, into an activity, a phone state listener, and a sensor listener. From the phone state listener, I am trying to send the sensor listener a notification that the phone is active (thus if the sensor listener detects it is lying flat then it should turn on the speaker phone). But I get an error when I try to compile my code Code Snippet: package org.pythonistas.AutoConference; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; import android.content.Intent; import android.content.Context; public class PhoneListener extends PhoneStateListener { protected static final String CALL_STATE_CHANGE = org.pythonistas.AutoConference.intent.action.CALL_STATE_CHANGE; protected static final String CALL_STATE_EXTRA = callState; private Intent intent = new Intent(CALL_STATE_CHANGE); private Leveler myLevel = null; private CallReceiver myReceiver = null; public PhoneListener(){ myLevel = new Leveler(); myReceiver = new CallReceiver(myLevel); } public void onCallStateChanged(int state, String incomingNumber) { super.onCallStateChanged(state, incomingNumber); switch(state) { case TelephonyManager.CALL_STATE_IDLE: intent.putExtra(CALL_STATE_EXTRA,false); sendBroadcast(intent); break; case TelephonyManager.CALL_STATE_OFFHOOK: intent.putExtra(CALL_STATE_EXTRA,true); sendBroadcast(intent); break; } } } Compile Error: [javac] Compiling 3 source files to /Users/SourceCode/android/ projects/AutoConference/bin/classes [javac] /Users/SourceCode/android/projects/AutoConference/src/org/ pythonistas/AutoConference/PhoneListener.java:27: cannot find symbol [javac] symbol : method sendBroadcast(android.content.Intent) [javac] location: class org.pythonistas.AutoConference.PhoneListener [javac] sendBroadcast(intent); [javac] ^ [javac] /Users/SourceCode/android/projects/AutoConference/src/org/ pythonistas/AutoConference/PhoneListener.java:31: cannot find symbol [javac] symbol : method sendBroadcast(android.content.Intent) [javac] location: class org.pythonistas.AutoConference.PhoneListener [javac] sendBroadcast(intent); [javac] ^ [javac] 2 errors Any help and/or guidance would be greatly appreciated. I have also posted my code on git (http://github.com/tedwards/AutoConference ) --~--~-~--~~~---~--~~ 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 build EditText view like that in Android Market where X button appears for clearing text?
Try: Drawable x = getResources().getDrawable(R.drawable.x); x.setBounds(0, 0, x.getIntrinsicWidth(), x.getIntrinsicHeight()); mEditText.setCompoundDrawables(null, null, x, null); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 27, 7:20 am, mjc147 westmead...@yahoo.co.uk wrote: I want to build a very simple view which looks exactly like the top section of the Android Market search activity (i.e. search EditText view and search button). Ideally I'd like it to look EXACTLY the same. Maybe there is some layout XML and/or code I can reuse? Writing it fresh is also fine but I am not clear how to get the X button (which appears inside the EditText view when the user enters some text) functionality. That's there to allow the user to quickly clear the text. Any tips? --~--~-~--~~~---~--~~ 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 installing a .apk file
Run adb logcat and you should see the error message: W/PackageParser( 582): /data/app/vmdl43410.tmp (at Binary XML file line #10): provider does not specify android:name -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want 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 Sep 28, 2:26 pm, wahib wahib.t...@gmail.com wrote: hi ! I am a newbie and wanna install a barcode app on emulator. The app is moseycode and i have its .apk file. when i run 'adb install path' in command prompt this error is displayed .. FAILURE [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED] i dnt know why this error is here !! :S plz help Regards, wahib --~--~-~--~~~---~--~~ 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: distributing an app packaged with just emulator
If adb is not able to connect to the emulator, try sudo killall adb first and then rerun you sudo adb ... command. One suggestion is that you can place you app on a web server and your friends should be able to download/install it via the emulator browser. Of course doing this might expose your app to the outside world. -- 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 Apr 23, 5:25 pm, Samuel Joseph tans...@gmail.com wrote: Hi All, [Tried posting this through web interface but didn't show up ... here goes via email ...] I was wondering if anyone has ever been able to distribute their app in a bundle with an emulator? The reason I want to do this is that I have some friends who don't have android phones, but I'd like them to be able to play with my app so that they can give me feedback. I've previously sent them screen casts, but I'd really like them to be able to get interactive with the app. Now I could ask them to get all installed with the whole android framework, eclipse etc,. but some of them are not so technical. Ideally what I'd like to be able to do is create a package that is the android emulator with my app and perhaps 1 or 2 other related apps pre-installed, so that they can download it, open it and run it interactively on their computers? Has anyone ever tried this? So far I found that I can run the emulator standalone, and I assume I could probably send them just that and it would run. However the adb tool is needed to install apps. I could send them that too, and ask the to run an 'adb install myapp.apk' from the command line, but at the moment I can't even seem to do that myself. Running the emulator standalone, the adb tool can't seem to see it: samuel-josephs-computer-2:tools samueljoseph$ sudo ./adb devices List of devices attached I just get no list of devices ... I have previously used the adb tool to install apk files, but that is after I had started the emulator from eclipse - of course even then I always have to restart eclipse and the emulator two or three times before I can get the connection (I am on OSX 10.5.6., eclipse 3.4.1) ... Any suggestions greatly appreciated. CHEERS SAM --~--~-~--~~~---~--~~ 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: ImageView Listener
Can you post your layout file here? Are the other imageviews on the activity pointing to the same image as square00? -- 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 Apr 22, 4:11 pm, Oliver M. Batista olivermbati...@gmail.com wrote: Hello guys, i'm having a problem with this imageview listener (see code below) well the click event is only triggered when I click on the square00 item (this is ok) but on the onclick method that does the action, i use the reference passed by the method and the action is applied to all the imageviews on the Activity but I want the action to be apllied only for the square00 imageview. Somebody knows what's wrong? public class HelloDroid extends Activity implements OnClickListener { /** Called when the activity is first created. */ // Create an anonymous implementation of OnClickListener private OnClickListener mCorkyListener = new OnClickListener() { public void onClick(View v) { // do something when the button is clicked ImageView asd = (ImageView)v; asd.setAlpha(50); } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Capture our img from layout ImageView img2 = (ImageView)findViewById(R.id.square00); // Register the onClick listener with the implementation above img2.setOnClickListener(mCorkyListener); } } --~--~-~--~~~---~--~~ 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: HelloGallery Example!!
1. The gallery id being used in your layout file is not defined. Make sure it is something like @+id/gallery. 2. sample_1.png image file is missing in res/drawable. 3. Theme is not declared in res/values/attrs.xml -- 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 Apr 22, 9:59 am, weird0 amiredi...@gmail.com wrote: I am implementing some of the examples given in the Dev Guide. I have some generic issues in getting started and getting the code to work. In the code given, Eclipse does not recognize **R.id.gallery*** Upon clicking the bulb on the left side for resolution, i get two options:- 1. Create field 'id' in type ''R'. 2. Create constant 'id' in type ''R'. * R.drawable.sample_1 1. Create field 'sample_1' in type 'drawable'. 2. Create constant 'sample_1' in type 'drawable'. **android.R.styleable.Theme*** No generic suggestions. ** android.R.styleable.Theme_galleryItemBackground** No generic suggestions. I am unable to run the android application, since i have fix the bugs before running them. For additional information, I have successfully done the installations and the Hello Android along with some basic android programmes run absolutely fine. Please, would some of the android experts help me in this regard before i loose my motivation to work on android. Regards, Wannabe Android Programmer --~--~-~--~~~---~--~~ 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: installing 1.5 and eclipse
Are you trying to set the value of the SDK Location field in Android Preferences? If that's the case, you need to set it to C:\android-sdk- windows-1.5_pre as it is the location where you installed the 1.5 SDK. -- 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 Apr 24, 4:29 pm, dashman erjdri...@gmail.com wrote: i downloaded 1.5 (windows) and extracted the files. then in eclipse, i tried to point to the new .jar file and after giving it the folder name - it says file not found. i did note that when the sdk expanded it created a folder named platforms and then android 1.1 and 1.5 children. when in eclipse i point to the 1.5 child, it squawks about not finding tools\adb.exe (which happens to be in the top level tools folder help! (i have the plugin installed properly and everything was running ok in 1.1) this is my top-level folder: Directory of C:\android-sdk-windows-1.5_pre 04/24/2009 07:04 PMDIR . 04/24/2009 07:04 PMDIR .. 04/24/2009 07:01 PMDIR add-ons 04/24/2009 07:03 PMDIR docs 04/24/2009 07:01 PM 176 documentation.html 04/24/2009 07:03 PMDIR platforms 04/24/2009 07:01 PM 193 RELEASE_NOTES.html 04/24/2009 07:04 PMDIR tools 04/24/2009 07:04 PMDIR usb_driver and under platforms: Directory of C:\android-sdk-windows-1.5_pre\platforms 04/24/2009 07:03 PMDIR . 04/24/2009 07:03 PMDIR .. 04/24/2009 07:03 PMDIR android-1.1 04/24/2009 07:04 PMDIR android-1.5 --~--~-~--~~~---~--~~ 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: Infinite Error: I fixed Failed to find an AVD compatible, only to get ERROR: unknown virtual device name
You shouldn't move the AVD files around. What's the SDK Target setting for your project? You can find out by bringing up the Properties dialog box and select Android. Since you created a target 2 AVD, you should set the SDK Target for your project to Android 1.5. Also double check the Target setting in the Run Configurations dialog box. -- 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 Apr 24, 10:13 pm, Andrex emailofand...@gmail.com wrote: I've been developing for android since the first SDK came out, and have downloaded every early preview one after that- m3, m5, 0.9, 1.0, 1.1, and now the 1.5pre. This latest one is the only one to give me trouble. When I first tried to launch a simple program, the error Failed to find an AVD compatible with target 'Android 1.5'. Launch aborted. popped up. So, I used codeandroid create avd -n my_avd -t 2/code. When the prompt Do you wish to create a custom hardware profile [no] came up, I just hit enter (and once I typed no and hit enter). Great. But then when I reran the program, it gave me the exceptions (as it wasn't in red): code[2009-04-25 01:00:24 - Emulator] emulator: ERROR: unknown virtual device name: 'my_avd' [2009-04-25 01:00:24 - Emulator] emulator: could not find virtual device named 'my_avd'/code I moved the avd files around to various places- the tools folder, the project folder in the Eclipse workplace folder, the SDK director itself... no dice. When I delete the AVD, it gives me the first error again. Thus, I completely wiped Android and Eclipse from my system, and re- installed fresh (this means the Eclipse install, the Eclipse and Android workspaces, the SDK, etc.) Only thing I didn't delete was the shortcuts. But I was back at square one again. So, I turn to you, ever eager-to-help Google Groups. Some technical info that might be of help: Windows Vista 32-bit Eclipse 3.4 Ganymede Android SDK 1.5pre Android Workspace: C:\Users\Public\.android AVDs Created At: C:\Users\Public\.android\avd Eclipse Workspace: C:\Users\Public\Eclipse Workspace Eclipse Directory: C:\Program Files\Eclipse SDK Directory: C:\Program Files\Eclipse\android-sdk-windows-1.5_pre --~--~-~--~~~---~--~~ 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: Get alarms from Alarm Clock application
As far as I know, you are able to do that since the Alarm Clock app doesn't expose those specific intents. -- 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 May 7, 5:55 am, kaloer mkal...@gmail.com wrote: Hi, Is it possible to access the alarms from the Alarm Clock application, so i can use them in my application? And can I create an alarm in my application, which is visible in the Alarm Clock app? --~--~-~--~~~---~--~~ 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: Get alarms from Alarm Clock application
Sorry for my typo. What I meant to say was that you are NOT able to that. -- 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 May 7, 11:01 am, kaloer mkal...@gmail.com wrote: Okay thank you, I'll look at it .. On 7 Maj, 18:45, Jack Ha (T-Mobile USA) jack...@t-mobile.com wrote: As far as I know, you are able to do that since the Alarm Clock app doesn't expose those specific intents. -- 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 May 7, 5:55 am, kaloer mkal...@gmail.com wrote: Hi, Is it possible to access the alarms from the Alarm Clock application, so i can use them in my application? And can I create an alarm in my application, which is visible in the Alarm Clock app? --~--~-~--~~~---~--~~ 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: Get alarms from Alarm Clock application
Sorry for my earlier typo. What I meant was that you are NOT able to do that. -- 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 May 7, 11:01 am, kaloer mkal...@gmail.com wrote: Okay thank you, I'll look at it .. On 7 Maj, 18:45, Jack Ha (T-Mobile USA) jack...@t-mobile.com wrote: As far as I know, you are able to do that since the Alarm Clock app doesn't expose those specific intents. -- 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 May 7, 5:55 am, kaloer mkal...@gmail.com wrote: Hi, Is it possible to access the alarms from the Alarm Clock application, so i can use them in my application? And can I create an alarm in my application, which is visible in the Alarm Clock app? --~--~-~--~~~---~--~~ 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: Emulator launch error in HelloAndroid tutorial
Have you installed JDK on your machine? If not, you can download it from here: http://java.sun.com/javase/downloads/index.jsp -- 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 May 7, 6:07 am, Dennis Christy dennischri...@gmail.com wrote: When I type the following into the cmd prompt: c:\...android-sdk-windows-1.5_r1\toolsandroid It gives me the following message: 'java' is not recognized as an internal or external command, operable program or batch file On Thu, May 7, 2009 at 5:49 AM, Sean Hodges seanhodge...@googlemail.comwrote: You may need to set your JAVA_HOME environment variable. What is the exact error you're getting? On Thu, May 7, 2009 at 1:40 PM, Dennis Christy dennischri...@gmail.com wrote: I'm sorry, I did not explain my problem completely. I just want to create the AVD so I can run the tutorial. Opening the terminal window in Vista does not allow me to type in the create avd command, even though I have changed the directory to the tools directory in the sdk. It tells me it cannot run a Java app. I just want to create the AVD in whatever way I can. How do I do it? On Thu, May 7, 2009 at 5:20 AM, Marcos Lobo mlo...@gmail.com wrote: Hi, To open a terminal in Windows Vista: Click on Start button and type on the text area next command: cmd The cmd open the terminal Cheers. 2009/5/7 Dennis Christy dennischri...@gmail.com I get the following error in attempting to run the HelloAndroid tutorial: Failed to find an AVD compatible with target 'Android 1.5', Launch aborted I have read the documention and the emails in re this problem, and I see the fix is to create an AVD by opening a terminal window and typing android create avd --target 1--name myavd however I cannot figure out how to open a terminal window in Windows Vista -- Dennis Christy -- Un saludo. -- Dennis Christy -- Dennis Christy --~--~-~--~~~---~--~~ 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: Exception in Code
There are a couple of problems in your onResume() function. 1. It should call super.onResume() 2. Change LocationManager manager = (null); getSystemService(Context.LOCATION_SERVICE); to LocationManager manager = (LocationManager)getSystemService (Context.LOCATION_SERVICE); And make sure you request the following permission in your AndroidManifest.xml file. uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/uses- permission -- 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 May 21, 6:11 am, Gopal bisht.ra...@gmail.com wrote: I have try the code But i am facing from this exception: Firstly thanks for the code: And thanks in Advance: Please give me the correct direction where i am wrong please help me. My code is : .java package org.apache.sms; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.LinearLayout.LayoutParams; public class SMSApp extends Activity { private TextView messageView; public class WhereamiLocationListener implements LocationListener { public void onLocationChanged(Location location) { if (location != null) { messageView.setText(location.toString()); } } public void onProviderDisabled(String provider) { // TODO Auto-generated method stub } public void onProviderEnabled(String provider) { // TODO Auto-generated method stub } public void onStatusChanged(String provider, int status, Bundle extras) { // TODO Auto-generated method stub } } @Override public void onResume() { WhereamiLocationListener listener = new WhereamiLocationListener (); LocationManager manager = (null); getSystemService(Context.LOCATION_SERVICE); long updateTimeMsec = 1000L; manager.requestLocationUpdates (LocationManager.GPS_PROVIDER, updateTimeMsec, 500.0f, listener); manager.requestLocationUpdates (LocationManager.NETWORK_PROVIDER, updateTimeMsec, 500.0f, listener); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(makeContentView()); } private View makeContentView() { LinearLayout panel = new LinearLayout(this); panel.setLayoutParams(new LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); panel.setOrientation(LinearLayout.VERTICAL); panel.addView(makeMessageView()); return panel; } private View makeMessageView() { messageView = new TextView(this); messageView.setText(Loading...); return messageView; } private void updateWithNewLocation(Location location) { String latLongString; if (location != null) { double lat = location.getLatitude(); double lng = location.getLongitude(); latLongString = Lat: + lat + \nLng: + lng; } else { latLongString = No Location Found; } messageView.setText(Your Current Location is:\n + latLongString); } } *--- .manifest file ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.apache.sms android:versionCode=1 android:versionName=1.0.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.SMSApp android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity uses-permission android:name=android.permission.INTERNET/uses- permission uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_LOCATION / uses
[android-beginners] Re: Phone number from URI
You can do something like the following: Uri uri = Uri.parse(content://contacts/phones/1); Cursor c = managedQuery(uri, null, null, null, null); if (c.moveToFirst()) { do { // c.getString(1) is the phone # } while (c.moveToNext()); } -- 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 May 21, 8:19 pm, Ambarish Malpani ambar...@gmail.com wrote: Hi Guys, I have a URI for a phone number. Something like: content://contacts/phones/687 How do I get the actual phone number from this URI? Thanks, Ambarish --~--~-~--~~~---~--~~ 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: Modal Window
If I understand your question correctly, just specify the following attribute for your activity in the AndroidManifest.xml file: android:theme=@android:style/Theme.Dialog -- 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 May 21, 10:36 pm, RTX rote...@gmail.com wrote: Hi Guys please help im trying to implement a modal window with activity instead of a fullscreen activity i saw something with window manager and inflate but i didnt get it any chance anyone allready got that 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: Where is MapView JavaDoc
http://code.google.com/android/add-ons/google-apis/ -- 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 May 22, 8:28 am, arnouf arnaud.far...@gmail.com wrote: Hi all, Can you tell me where I can find the Javadoc for com.google.android.maps.* package? --~--~-~--~~~---~--~~ 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 alternative to SimpleCursorAdapter?
You can create your own Adapter class (by extending BaseAdapter) and do your formatting in the getView() function. -- 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 May 21, 11:01 am, Kent Yip yes...@gmail.com wrote: i have the code below which almost done everything i wanted, but i want to be able to alter one of the field(KEY_TIME) to a more readable format. because the value in column KEY_TIME is gonna be in milliseconds, simply displaying the large value is not ready to user. private void fillData() { Cursor notes= mDbHelper.fetchAllNotes(); startManagingCursor( tasksCursor ); String[] from = new String[] {ToDoDbAdapter.KEY_TITLE, ToDoDbAdapter.KEY_LABEL, ToDoDbAdapter.KEY_NOTE, ToDoDbAdapter.KEY_TIME}; int[] to = new int[] {R.id.task, R.id.label, R.id.note, R.id.time}; SimpleCursorAdapter noteAdapter = new SimpleCursorAdapter( this, R.layout.list_row, notes, from, to); setListAdapter( noteAdapter ); }// end fillData() method i want to try something like this for(notes.moveToFirst(); notes.isAfterLast(); notes.moveToNext()){ // do all the formatting i want to each fields // add it to the list } then set the adapter, the list has to be selectable for editing. is simply don't get how to tie the list with the cursor adapter and the list_row.xml i prepared please help me out with some example --~--~-~--~~~---~--~~ 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: TextView scrolling
You can put your TextView inside a ScrollView and modify your code as follows: for( int x = 1; x 100; x++ ) { outputField.append( x + \n ); scrollView.post(new Runnable() { public void run() { scrollView.smoothScrollBy(0, 60); } }); } -- 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 May 22, 10:35 am, Greg Donald gdon...@gmail.com wrote: On Wed, May 20, 2009 at 9:21 PM, Greg Donald gdon...@gmail.com wrote: How do I make my TextView scroll as I append new lines? Here's my code that doesn't work yet: final TextView outputField = (TextView) findViewById( R.id.outputTextView ); outputField.setMovementMethod( ScrollingMovementMethod.getInstance() ); for( int x = 1; x 100; x++ ) { outputField.append( x + \n ); outputField.scrollTo( 0, x * 60 ); } Do I need to repaint or redraw or something? Anyone? -- Greg Donaldhttp://destiney.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] Re: Intent.ACTION_SEND with SMS or Email
You won't be able to do that since EXTRA_TEXT will override sms_body. You can always implement your own chooser by getting a list of activities from the system that supports ACTION_SEND. Intent sendIntent = new Intent(Intent.ACTION_SEND, null); sendIntent.addCategory(Intent.CATEGORY_DEFAULT); sendIntent.setType(text/plain); PackageManager pm = getPackageManager(); ListResolveInfo activityList = pm.queryIntentActivities (sendIntent, 0); -- 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 May 25, 7:51 am, mars.martian mars.mart...@gmail.com wrote: Hi, I'm using a Chooser to let the use send text through Messaging or possible Email/Gmail but I am having problems specifying a Messaging version of the text, right now my code looks like: Intent msg = new Intent(Intent.ACTION_SEND); msg.setType(text/plain); msg.putExtra(Intent.EXTRA_TEXT, email body); msg.putExtra(Intent.EXTRA_SUBJECT, email subject); msg.putExtra(sms_body, sms body); startActivity(Intent.createChooser(msg, chooser title)); with this code, the Messaging app can be launched but will default to the message email body rather than the preferred sms body. My instinct is to have separate actions to the user for sending an email or an sms. Is there anything else to do? --~--~-~--~~~---~--~~ 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: Where do i put Audio Files.
How big are your audio files? You should be able to place them in the res/raw folder and get to them with: getResources().openRawResource(R.raw.audio_file); -- 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 May 25, 10:21 pm, Freshman csato...@gmail.com wrote: Hi guys, I am new to android and i need to play list of audio files in my application. but i am bit confused where to put all the audio files as its large in size. any help/info regarding this greatly appreciated. many thax, Freshman --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---