Re: [android-beginners] Why it is so difficult to generate gen file
Hey Hi, I got it up and running. Thanks, Shaista On Thu, Jul 22, 2010 at 11:34 AM, Shaista Naaz wrote: > > Hi, > I am a beginner trying to learn Android. I am trying to run Hello Android > sample code but am facing one problem with generation of gen file. > Sometimes it works after I do repeated clean, rebuild and build > automatically on and off. > > I have installed android-sdk_r06-windows, eclipse-java-galileo-win32 and > jdk-6u21-windows-i586. > While creating Hello Android I am selecting Android 1.1 as SDK. I have > given PATH variable of SDK only not for java. > And I am working on Windows. > > If my simple Hello Android succeeds in generating R.java and then I make > any changes in the main.xml and string.xml then again gen cannot be created. > I am following file > > file:///D:/Android/android-sdk_r06-windows/android-sdk-windows/docs/resources/tutorials/hello-world.html > > Any help is highly appreciated. > > Thanks, > Shaista > > -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why it is so difficult to generate gen file
Hi, I am a beginner trying to learn Android. I am trying to run Hello Android sample code but am facing one problem with generation of gen file. Sometimes it works after I do repeated clean, rebuild and build automatically on and off. I have installed android-sdk_r06-windows, eclipse-java-galileo-win32 and jdk-6u21-windows-i586. While creating Hello Android I am selecting Android 1.1 as SDK. I have given PATH variable of SDK only not for java. And I am working on Windows. If my simple Hello Android succeeds in generating R.java and then I make any changes in the main.xml and string.xml then again gen cannot be created. I am following file file:///D:/Android/android-sdk_r06-windows/android-sdk-windows/docs/resources/tutorials/hello-world.html Any help is highly appreciated. Thanks, Shaista -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why it is so difficult to generate gen file
Hi, I am a beginner trying to learn Android. I am trying to run Hello Android sample code but am facing one problem with generation of gen file. Sometimes it works after I do repeated clean, rebuild and build automatically on and off. I have installed android-sdk_r06-windows, eclipse-java-galileo-win32 and jdk-6u21-windows-i586. While creating Hello Android I am selecting Android 1.1 as SDK. I have given PATH variable of SDK only not for java. And I am working on Windows. If my simple Hello Android succeeds in generating R.java and then I make any changes in the main.xml and string.xml then again gen cannot be created. I am following file file:///D:/Android/android-sdk_r06-windows/android-sdk-windows/docs/resources/tutorials/hello-world.html Any help is highly appreciated. Thanks, Shaista -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why does TextView.setText cause the enclosing ScrollView to scroll?
Hello! I'm new to this group and (full disclosure) cross posting this question here from StackOverflow, just because I'm not 100% sure how my question will be found by other SO users (I made sure to read the suggested "How To Ask Questions The Smart Way", and made sure to search SO for a clear explanation, but I must have missed it). Here, I'm clear that it'll be sent out to everyone, so here goes (my apologies in advance if I shouldn't be cross-posting like this!) I've got this odd problem which is happening on 1.6, 2.2, and a MyTouch 3G Slide (which is API #7, and listed as "2.1-Update1" in the Android Device Chooser). The basic idea for my app is to make a stopwatch-sort of thing, in that the user can tap a button to start a timer, then tap it again to stop (pause) the timer; further taps alternate between resuming the timer and pausing the timer. I've got a top-level ScrollView which contains a RelativelLayout, which contains a bunch of widgets. The first widget is a HUGE button (so that it's easy to press), which pushes all my other widgets below the bottom of the screen. This is intentional, as I want to rely on the ScrollView (and an on-screen reminder to the user) to make the rest of the input options available. I've got a simple state-machine type setup, where mState is the current mode (STATE_TIMER_NOT_STARTED before the user presses any buttons, ...RUNNING after the first press, and then ...PAUSED after the second, back to ...RUNNING after the third, etc, etc). All this works great EXCEPT that when the timer is running, and the user presses the start/stop/resume button again, the ScrollView will scroll down a ways. I am NOT issuing this command (I don't even have a reference to ScrollView object), and I'm not sure why it's doing this. REPRO: Compile + run the below samples. When the app starts, press the 'Start Timing' button. Use your thumb (or the mouse) to touch-drag the screen upwards (so you can see the RatingBar), then drag it back downwards (so the button is again completely on-screen). Tap the button (which now reads 'PauseTiming') again, and it'll jump down a bit. It should NOT be jumping/scrolling down, since there's no statement (that I can see) that tells it to scroll down. As near as I can tell, it's the setText that causes the scrolling ( when I comment those lines out, no scrolling occurs). WHAT I'M ASKING FOR: If I'm doing something dumb & you could point out what it is, I'd really appreciate it! :) ***I wonder if 'touch mode' might have something to do with this, since it does NOT appear to happen (in the emulator) when I use the mouse's scroll wheel to move the panel upwards (i.e.,instead of the simulated finger-dragging). I can't find a whole lot on touch-mode, and nothing specific on focus/selection in touch mode within a ScrollView If you can confirm that this error occurs for you too, that would be ok, too (since misery loves company.*AHEM* I mean, since it might help confirm that it's not just me :) ). MyTestApp.java package bug.android.scrollview; import android.app.Activity; import android.os.Bundle; import android.text.format.Time; import android.view.Display; import android.view.View; import android.view.WindowManager; import android.widget.Button; import android.widget.TextView; public class MyTestApp extends Activity { public final static int STATE_TIMER_NOT_STARTED = 1; public final static int STATE_TIMER_RUNNING = 2; public final static int STATE_TIMER_PAUSED = 3; private int mState; Time t = new Time(); private Time data = new Time(); private Button btnStartStopResume; private TextView lblSpacer; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.new_time_entry); btnStartStopResume = (Button) findViewById(R.id.btnStartStopResume); // Set the button's size so that the other info will also be visible Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)) .getDefaultDisplay(); // This is such a hack, but the windowScroller doesn't appear to // have a height at this point in the lifecycle (nor in 'onResume' : ( ) btnStartStopResume.setHeight(display.getHeight() - 200); lblSpacer = (TextView) findViewById(R.id.lblSpacer); reset(); } public void doStartStopResume(View v) { if (mState == MyTestApp.STATE_TIMER_NOT_STARTED) { mState = MyTestApp.STATE_TIMER_RUNNING; data.setToNow(); } else if (mState == MyTestApp.STATE_TIMER_RUNNING) { mState = MyTestApp.STATE_TIMER_PAUSED; String s = getString(R.string.add_scroll_down_to_add);
Re: [android-beginners] why can't i build an AVD with a 2G SD card?
On Sun, 23 May 2010, Xavier Ducrohet wrote: > Are you using SDK tools revision 6? > > There was a bug in revision 5 when it tested the value. latest and greatest: android-sdk_r06-linux_86.tgz on (64-bit) ubuntu 10.04. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] why can't i build an AVD with a 2G SD card?
Are you using SDK tools revision 6? There was a bug in revision 5 when it tested the value. On Sun, May 23, 2010 at 2:24 AM, Robert P. J. Day wrote: > > just jumping into using the android 2.2 SDK and emulator on my > ubuntu 10.04 system, and an initial attempt to build a virtual device > with a 2G card gave me > > "Error: SD Card size must be at least 9MB." > > um ... huh? i verified that sizes of 256M, 512M, 1G and 1.5G all > work, but 2G is weirdly rejected as above. thoughts? > > rday > > -- > > > Robert P. J. Day Waterloo, Ontario, CANADA > > Linux Consulting, Training and Kernel Pedantry. > > Web page: http://crashcourse.ca > Twitter: http://twitter.com/rpjday > > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > 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 > -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] why can't i build an AVD with a 2G SD card?
just jumping into using the android 2.2 SDK and emulator on my ubuntu 10.04 system, and an initial attempt to build a virtual device with a 2G card gave me "Error: SD Card size must be at least 9MB." um ... huh? i verified that sizes of 256M, 512M, 1G and 1.5G all work, but 2G is weirdly rejected as above. thoughts? rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Why does my app "Stop Unexpectedly" every time I remove an item from myListView.
In the logcat, you will see a barrage of red colored lines. find the class that removes the listview. it will tell you on which line the error occured. Kaustubh Padegaonkar, thetuxra...@gmail.com On Tue, Apr 27, 2010 at 8:18 AM, Justin Anderson wrote: > Debug it and look at the logcat info... It will give you more information > about the problem. > > -- > There are only 10 types of people in the world... > Those who know binary and those who don't. > -- > > > > On Mon, Apr 26, 2010 at 8:31 PM, ajb468 wrote: > >> I am creating a sample example from a book. Its called "To Do List." >> I'm at the point where I am working with the Options menu. I have the >> options of adding and removing an item to a list. I can add items to a >> list but every time I remove an item, the program "Stopped >> Unexpectedly." Everything in my code seems to be fine. Ill show a few >> sections of the code that have to do with the view. >> >> static final private int ADD_NEW_TODO = Menu.FIRST; >> static final private int REMOVE_TODO = Menu.FIRST + 1; >> private boolean addingNew = false; // True if myEditText is visible. >> False if not. >> private ArrayList todoItems; >> private ListView myListView; >> private EditText myEditText; >> private ArrayAdapter aa; >> >> >> @Override >>public void onCreate(Bundle savedInstanceState) { >>super.onCreate(savedInstanceState); >>setContentView(R.layout.main); >>myListView = (ListView) findViewById(R.id.myListView); >>myEditText = (EditText) findViewById(R.id.myEditText); >>todoItems = new ArrayList(); >>int resID = R.layout.todolist_item; >>final ArrayAdapter aa; >>aa = new ArrayAdapter(this, resID, todoItems); >>myListView.setAdapter(aa); >>registerForContextMenu(myListView); >>myEditText.setOnKeyListener(new OnKeyListener() { >>public boolean onKey(View v, int keyCode, KeyEvent >> event) { >>if (event.getAction() == >> KeyEvent.ACTION_DOWN) >>if (keyCode == KeyEvent.KEYCODE_1) >> { >>todoItems.add(0, >> myEditText.getText().toString()); >>myEditText.setText(""); >>aa.notifyDataSetChanged(); >>cancelAdd(); >>return true; >>} >>return false; >>} >>}); >>} >> >> >> @Override >>public boolean onCreateOptionsMenu(Menu menu) { >>super.onCreateOptionsMenu(menu); >>// Create and add new menu items. >>MenuItem itemAdd = menu.add(0, ADD_NEW_TODO, Menu.NONE, >>R.string.add_new); >>MenuItem itemRem = menu.add(0, REMOVE_TODO, Menu.NONE, >> R.string.remove); >>// Assign icons >>itemAdd.setIcon(R.drawable.add_new_item); >>itemRem.setIcon(R.drawable.remove_item); >>// Allocate shortcuts to each of them. >>itemAdd.setShortcut('0', 'a'); >>itemRem.setShortcut('1', 'r'); >>return true; >>} >> >> >> @Override >>public boolean onOptionsItemSelected(MenuItem item) { >>super.onOptionsItemSelected(item); >>int index = myListView.getSelectedItemPosition(); >>switch (item.getItemId()) { >>case (REMOVE_TODO): { >>if (addingNew) { >>cancelAdd(); >>} else { >>removeItem(index); >>} >>return true; >>} >>case (ADD_NEW_TODO): { >>addNewItem(); >>return true; >>} >>} >>return false; >>} >> >> >> private void removeItem(int _index) { >>todoItems.remove(0); >>aa.notifyDataSetChanged(); >>} >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Beginners" group. >> >> NEW! Try asking and tagging your question on Stack Overflow at >> http://stackoverflow.com/questions/tagged/android >> >> 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 >> > > -- > You re
Re: [android-beginners] Why does my app "Stop Unexpectedly" every time I remove an item from myListView.
Debug it and look at the logcat info... It will give you more information about the problem. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Mon, Apr 26, 2010 at 8:31 PM, ajb468 wrote: > I am creating a sample example from a book. Its called "To Do List." > I'm at the point where I am working with the Options menu. I have the > options of adding and removing an item to a list. I can add items to a > list but every time I remove an item, the program "Stopped > Unexpectedly." Everything in my code seems to be fine. Ill show a few > sections of the code that have to do with the view. > > static final private int ADD_NEW_TODO = Menu.FIRST; > static final private int REMOVE_TODO = Menu.FIRST + 1; > private boolean addingNew = false; // True if myEditText is visible. > False if not. > private ArrayList todoItems; > private ListView myListView; > private EditText myEditText; > private ArrayAdapter aa; > > > @Override >public void onCreate(Bundle savedInstanceState) { >super.onCreate(savedInstanceState); >setContentView(R.layout.main); >myListView = (ListView) findViewById(R.id.myListView); >myEditText = (EditText) findViewById(R.id.myEditText); >todoItems = new ArrayList(); >int resID = R.layout.todolist_item; >final ArrayAdapter aa; >aa = new ArrayAdapter(this, resID, todoItems); >myListView.setAdapter(aa); >registerForContextMenu(myListView); >myEditText.setOnKeyListener(new OnKeyListener() { >public boolean onKey(View v, int keyCode, KeyEvent > event) { >if (event.getAction() == > KeyEvent.ACTION_DOWN) >if (keyCode == KeyEvent.KEYCODE_1) { >todoItems.add(0, > myEditText.getText().toString()); >myEditText.setText(""); >aa.notifyDataSetChanged(); >cancelAdd(); >return true; >} >return false; >} >}); >} > > > @Override >public boolean onCreateOptionsMenu(Menu menu) { >super.onCreateOptionsMenu(menu); >// Create and add new menu items. >MenuItem itemAdd = menu.add(0, ADD_NEW_TODO, Menu.NONE, >R.string.add_new); >MenuItem itemRem = menu.add(0, REMOVE_TODO, Menu.NONE, > R.string.remove); >// Assign icons >itemAdd.setIcon(R.drawable.add_new_item); >itemRem.setIcon(R.drawable.remove_item); >// Allocate shortcuts to each of them. >itemAdd.setShortcut('0', 'a'); >itemRem.setShortcut('1', 'r'); >return true; >} > > > @Override >public boolean onOptionsItemSelected(MenuItem item) { >super.onOptionsItemSelected(item); >int index = myListView.getSelectedItemPosition(); >switch (item.getItemId()) { >case (REMOVE_TODO): { >if (addingNew) { >cancelAdd(); >} else { >removeItem(index); >} >return true; >} >case (ADD_NEW_TODO): { >addNewItem(); >return true; >} >} >return false; >} > > > private void removeItem(int _index) { >todoItems.remove(0); >aa.notifyDataSetChanged(); >} > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > 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 > -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
[android-beginners] Why does my app "Stop Unexpectedly" every time I remove an item from myListView.
I am creating a sample example from a book. Its called "To Do List." I'm at the point where I am working with the Options menu. I have the options of adding and removing an item to a list. I can add items to a list but every time I remove an item, the program "Stopped Unexpectedly." Everything in my code seems to be fine. Ill show a few sections of the code that have to do with the view. static final private int ADD_NEW_TODO = Menu.FIRST; static final private int REMOVE_TODO = Menu.FIRST + 1; private boolean addingNew = false; // True if myEditText is visible. False if not. private ArrayList todoItems; private ListView myListView; private EditText myEditText; private ArrayAdapter aa; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myListView = (ListView) findViewById(R.id.myListView); myEditText = (EditText) findViewById(R.id.myEditText); todoItems = new ArrayList(); int resID = R.layout.todolist_item; final ArrayAdapter aa; aa = new ArrayAdapter(this, resID, todoItems); myListView.setAdapter(aa); registerForContextMenu(myListView); myEditText.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) if (keyCode == KeyEvent.KEYCODE_1) { todoItems.add(0, myEditText.getText().toString()); myEditText.setText(""); aa.notifyDataSetChanged(); cancelAdd(); return true; } return false; } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); // Create and add new menu items. MenuItem itemAdd = menu.add(0, ADD_NEW_TODO, Menu.NONE, R.string.add_new); MenuItem itemRem = menu.add(0, REMOVE_TODO, Menu.NONE, R.string.remove); // Assign icons itemAdd.setIcon(R.drawable.add_new_item); itemRem.setIcon(R.drawable.remove_item); // Allocate shortcuts to each of them. itemAdd.setShortcut('0', 'a'); itemRem.setShortcut('1', 'r'); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item); int index = myListView.getSelectedItemPosition(); switch (item.getItemId()) { case (REMOVE_TODO): { if (addingNew) { cancelAdd(); } else { removeItem(index); } return true; } case (ADD_NEW_TODO): { addNewItem(); return true; } } return false; } private void removeItem(int _index) { todoItems.remove(0); aa.notifyDataSetChanged(); } -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why are lockCanvas and synchronized(surfaceHolder) both needed?
All of the examples I have seen for drawing into a graphical view look something like the following, but I can find no explanation for why: canvas = surfaceHolder.lockCanvas(null); synchronized (surfaceHolder) { canvas.drawBitmap(bitmap, 0, 0, null); } surfaceHolder.unlockCanvasAndPost(canvas); Why is the nested synchronized needed in addition to the unlock? What might happen if the nested synchronized is omitted? -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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 To unsubscribe, reply using "remove me" as the subject.
Re: [android-beginners] Why does my racing game not work???
On Thu, Apr 1, 2010 at 5:24 PM, Kevin Duffey wrote: > you can't be posting a company's source out in a public forum. I sure hope you're wrong, by that time... -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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 To unsubscribe, reply using "remove me" as the subject.
Re: [android-beginners] Why does my racing game not work???
Not only that.. you're going to have to learn how to use logs/stack traces/etc for future projects, so it's good to know how and learn to use it rather than depend on posting your code and having someone else fix it. Besides, after school comes a real job and you can't be posting a company's source out in a public forum. On Thu, Apr 1, 2010 at 1:33 AM, Justin Anderson wrote: > When an app force closes the best thing to do is look at the logcat > output. That should tell you everything you need to know about the problem. > > -- > There are only 10 types of people in the world... > Those who know binary and those who don't. > -- > > > > On Thu, Apr 1, 2010 at 2:32 AM, Johnmotley wrote: > >> I have been creating a simple little racing game for my computer >> science coursework and well its broken whenever I run it in the >> emulator it force closes, could you please check my code to see whats >> wrong with it?? >> heres the code if you want the entire project I put it on >> http://www.anddev.org/my_racing_game_wont_work-t12492.html thanks; >> >> public class Draw extends Activity { >>public int dx; >>public int dy; >>public double Angle; >>private float mcarWidth; >>private float mcarHeight; >>public int mcarx; >>public int mcary; >>public int mx; >>public int my; >>public int[][] TrackCords; >>public boolean cord; >>public int i; >>Bitmap mCar; >>Bitmap mTrack1; >>Bitmap mTrack2; >>@Override >>public void onCreate(Bundle savedInstanceState) { >>super.onCreate(savedInstanceState); >>requestWindowFeature(Window.FEATURE_NO_TITLE); >>mCar = BitmapFactory.decodeResource(getResources(), >> R.drawable.car); >>mTrack1 = BitmapFactory.decodeResource(getResources(), >> R.drawable.track1); >>mTrack2 = BitmapFactory.decodeResource(getResources(), >> R.drawable.track2); >>mcarWidth = mCar.getWidth(); >>mcarHeight = mCar.getHeight(); >>mx = 0; >>my = 0; >>setContentView(new Panel(this)); >>} >>class Panel extends SurfaceView implements SurfaceHolder.Callback{ >>private TilterThread mthread; >> >>public Panel(Context context) { >>super(context); >>getHolder().addCallback(this); >>mthread = new TilterThread(getHolder(), this); >>} >>@Override >>public void onMeasure(int widthMeasureSpec, int >> heightMeasureSpec){ >>dy = measureHeight(heightMeasureSpec); >>dx = measureWidth(widthMeasureSpec); >>mcarx = (int) (dx/2-mcarWidth/2); >>mcary = (int) (dy - mcarHeight); >>Angle =0; >>setMeasuredDimension(dx,dy); >>} >>private int measureHeight(int Measure) { >>int specSize = MeasureSpec.getSize(Measure); >>return specSize; >>} >>private int measureWidth(int Measure) { >>int specSize = MeasureSpec.getSize(Measure); >>return specSize; >>} >>public void TrackPosFinder(int mx, int my){ >>cord = false; >>if (my >= 0) >>{ >>do >>{ >>my -=100; >>if (my >0){ >>cord=true; >>} >>} >>while (cord = false); >>} >>TrackCords[1][0]=mx; >>TrackCords[1][1]=my; >>cord = false; >>i = 1; >>do{ >>my +=100; >>TrackCords[i][0]=mx; >>TrackCords[i][1]=my; >>} >>while(cord = false); >>} >>@Override >>public void onDraw(Canvas canvas) { >>my += 1; >>TrackPosFinder(mx , my); >>for( i=0; i>{ >>canvas.drawBitmap(mTrack1, >> TrackCords[i][0],TrackCords[i] >> [1],null); >>canvas.drawBitmap(mTrack2, >> TrackCords[i+1][0],TracCords[i+1] >> [1],null); >>} >>canvas.rotate((float) Angle, (float) dy,(float) dx); >>canvas.drawColor(Color.BLACK); >>canvas.drawBitmap(mCar, mcarx, mcary, null); >>} >>@Override >>public void surfaceChanged(SurfaceHolder holder, int format, >> int width, int height) { >>// TODO Auto-generated method stub >> >>} >>@Override >>public void surfaceCreated(SurfaceHolder holder) { >>mthread.setRunning(true); >>mthread.start(); >>
Re: [android-beginners] Why does my racing game not work???
When an app force closes the best thing to do is look at the logcat output. That should tell you everything you need to know about the problem. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Apr 1, 2010 at 2:32 AM, Johnmotley wrote: > I have been creating a simple little racing game for my computer > science coursework and well its broken whenever I run it in the > emulator it force closes, could you please check my code to see whats > wrong with it?? > heres the code if you want the entire project I put it on > http://www.anddev.org/my_racing_game_wont_work-t12492.html thanks; > > public class Draw extends Activity { >public int dx; >public int dy; >public double Angle; >private float mcarWidth; >private float mcarHeight; >public int mcarx; >public int mcary; >public int mx; >public int my; >public int[][] TrackCords; >public boolean cord; >public int i; >Bitmap mCar; >Bitmap mTrack1; >Bitmap mTrack2; >@Override >public void onCreate(Bundle savedInstanceState) { >super.onCreate(savedInstanceState); >requestWindowFeature(Window.FEATURE_NO_TITLE); >mCar = BitmapFactory.decodeResource(getResources(), > R.drawable.car); >mTrack1 = BitmapFactory.decodeResource(getResources(), > R.drawable.track1); >mTrack2 = BitmapFactory.decodeResource(getResources(), > R.drawable.track2); >mcarWidth = mCar.getWidth(); >mcarHeight = mCar.getHeight(); >mx = 0; >my = 0; >setContentView(new Panel(this)); >} >class Panel extends SurfaceView implements SurfaceHolder.Callback{ >private TilterThread mthread; > >public Panel(Context context) { >super(context); >getHolder().addCallback(this); >mthread = new TilterThread(getHolder(), this); >} >@Override >public void onMeasure(int widthMeasureSpec, int > heightMeasureSpec){ >dy = measureHeight(heightMeasureSpec); >dx = measureWidth(widthMeasureSpec); >mcarx = (int) (dx/2-mcarWidth/2); >mcary = (int) (dy - mcarHeight); >Angle =0; >setMeasuredDimension(dx,dy); >} >private int measureHeight(int Measure) { >int specSize = MeasureSpec.getSize(Measure); >return specSize; >} >private int measureWidth(int Measure) { >int specSize = MeasureSpec.getSize(Measure); >return specSize; >} >public void TrackPosFinder(int mx, int my){ >cord = false; >if (my >= 0) >{ >do >{ >my -=100; >if (my >0){ >cord=true; >} >} >while (cord = false); >} >TrackCords[1][0]=mx; >TrackCords[1][1]=my; >cord = false; >i = 1; >do{ >my +=100; >TrackCords[i][0]=mx; >TrackCords[i][1]=my; >} >while(cord = false); >} >@Override >public void onDraw(Canvas canvas) { >my += 1; >TrackPosFinder(mx , my); >for( i=0; i{ >canvas.drawBitmap(mTrack1, > TrackCords[i][0],TrackCords[i] > [1],null); >canvas.drawBitmap(mTrack2, > TrackCords[i+1][0],TracCords[i+1] > [1],null); >} >canvas.rotate((float) Angle, (float) dy,(float) dx); >canvas.drawColor(Color.BLACK); >canvas.drawBitmap(mCar, mcarx, mcary, null); >} >@Override >public void surfaceChanged(SurfaceHolder holder, int format, > int width, int height) { >// TODO Auto-generated method stub > >} >@Override >public void surfaceCreated(SurfaceHolder holder) { >mthread.setRunning(true); >mthread.start(); >} >@Override >public void surfaceDestroyed(SurfaceHolder holder) { >boolean retry = true; >mthread.setRunning(false); >while (retry) { >try { >mthread.join(); >retry = false; >} catch (InterruptedException e) { >} >} >} >@Override >public boolean onKeyDown(int keyCode, KeyEvent msg) { >if (keyCode == KeyEvent.KEYCODE_DPA
[android-beginners] Why does my racing game not work???
I have been creating a simple little racing game for my computer science coursework and well its broken whenever I run it in the emulator it force closes, could you please check my code to see whats wrong with it?? heres the code if you want the entire project I put it on http://www.anddev.org/my_racing_game_wont_work-t12492.html thanks; public class Draw extends Activity { public int dx; public int dy; public double Angle; private float mcarWidth; private float mcarHeight; public int mcarx; public int mcary; public int mx; public int my; public int[][] TrackCords; public boolean cord; public int i; Bitmap mCar; Bitmap mTrack1; Bitmap mTrack2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); mCar = BitmapFactory.decodeResource(getResources(), R.drawable.car); mTrack1 = BitmapFactory.decodeResource(getResources(), R.drawable.track1); mTrack2 = BitmapFactory.decodeResource(getResources(), R.drawable.track2); mcarWidth = mCar.getWidth(); mcarHeight = mCar.getHeight(); mx = 0; my = 0; setContentView(new Panel(this)); } class Panel extends SurfaceView implements SurfaceHolder.Callback{ private TilterThread mthread; public Panel(Context context) { super(context); getHolder().addCallback(this); mthread = new TilterThread(getHolder(), this); } @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec){ dy = measureHeight(heightMeasureSpec); dx = measureWidth(widthMeasureSpec); mcarx = (int) (dx/2-mcarWidth/2); mcary = (int) (dy - mcarHeight); Angle =0; setMeasuredDimension(dx,dy); } private int measureHeight(int Measure) { int specSize = MeasureSpec.getSize(Measure); return specSize; } private int measureWidth(int Measure) { int specSize = MeasureSpec.getSize(Measure); return specSize; } public void TrackPosFinder(int mx, int my){ cord = false; if (my >= 0) { do { my -=100; if (my >0){ cord=true; } } while (cord = false); } TrackCords[1][0]=mx; TrackCords[1][1]=my; cord = false; i = 1; do{ my +=100; TrackCords[i][0]=mx; TrackCords[i][1]=my; } while(cord = false); } @Override public void onDraw(Canvas canvas) { my += 1; TrackPosFinder(mx , my); for( i=0; ihttp://stackoverflow.com/questions/tagged/android 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 To unsubscribe, reply using "remove me" as the subject.
Re: [android-beginners] Why can't I post
I got them as well. Maybe the posts were moderated and somehow are still pending. Sent via my Google Android device... On Feb 26, 2010 11:11 AM, "Justin Anderson" wrote: Not sure what is going on but both of you that said you can't post... well, you did. Because somehow I got the email notifications... > > On Feb 26, 2010 7:34 AM, "Emine Çimen" wrote: > > I am also not able to... > > > > On Fri, Feb 26, 2010 at 4:03 PM, Ed Holley <8792...@gmail.com> wrote: > > > I really don't understan... -- emine > > > > -- > You received this message because you are subscribed to the Google Groups "Android Beginners" ... -- You received this message because you are subscribed to the Google Groups "Android Beginners" ... -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Why can't I post
Not sure what is going on but both of you that said you can't post... well, you did. Because somehow I got the email notifications... On Feb 26, 2010 7:34 AM, "Emine Çimen" wrote: I am also not able to post anything to this group. i tries many times and i am almost sure that, this email will not reach anybody as usual... On Fri, Feb 26, 2010 at 4:03 PM, Ed Holley <8792...@gmail.com> wrote: > > I really don't understan... -- emine -- You received this message because you are subscribed to the Google Groups "Android Beginners" ... -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Why can't I post
I am also not able to post anything to this group. i tries many times and i am almost sure that, this email will not reach anybody as usual... On Fri, Feb 26, 2010 at 4:03 PM, Ed Holley <8792...@gmail.com> wrote: > I really don't understand why I have not been able to post. I have decided > to start my own group. Thanks for the great reads, and I hope nobody treats > u as I have been treated. > > sent on location from my Motorola Droid > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > 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 > -- emine -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Why can't I post
What is the name of your new group? Sent via my Google Android device... On Feb 26, 2010 9:03 AM, "Ed Holley" <8792...@gmail.com> wrote: I really don't understand why I have not been able to post. I have decided to start my own group. Thanks for the great reads, and I hope nobody treats u as I have been treated. sent on location from my Motorola Droid -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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 -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why can't I post
I really don't understand why I have not been able to post. I have decided to start my own group. Thanks for the great reads, and I hope nobody treats u as I have been treated. sent on location from my Motorola Droid -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Why on Earth is it so hard to set up the development environment?
*> But this Android Dev kit has me stumped.* I have found it to be pretty straightforward... And so have hundreds, if not thousands, of other developers *> The installation instructions are not clear at all.* I would have to disagree... *> Do I need to DL Eclipse first? * No. You can develop in Eclipse or you can use any other IDE of your choice. The developer docs are very clear on that. There are separate pages describing how to develop in Eclipse ( http://developer.android.com/guide/developing/eclipse-adt.html) and how to develop in another IDE ( http://developer.android.com/guide/developing/other-ide.html). *> Which order do things need installing? * There is no order other than what makes sense... You can't install a plugin for Eclipse until you have actually installed Eclipse. The SDK can be downloaded before or after you install Eclipse. Java needs to be installed as well, and you may not be able to run Eclipse without installing it, but there certainly is no order of installation required. Also, this page describes exactly the order they recommend: http://developer.android.com/sdk/index.html *> Its totally baffling and I understand why even my Android dev friends say that the iPhone OS dev kit is much easier to use.* I have yet to see how it is totally baffliing... I have never developed for the iPhone but if the iPhone OS dev kit is ANYTHING like developing for OSX I fail to see how that is possible. I have done my fair share of developing for OSX and IMHO it royally sucks. *> I've DLed and installed the Java JDK 6, Eclipse and the Android SDK. Eclipse wont start as it says it needs Java JRE* When you downloaded and installed the JDK, did you install the JRE? If not, you need to install it. Eclipse is written in Java so you need to have the JRE installed in order to run it... You may need to add the location of Java's bin folder to your path for Eclipse to work. These are general java and Eclipse issues so far and have absolutely nothing to do with Android. *> the Android SDK setup wont find the updates and says to enforce HTTP in the settings but in settings there IS no HTTP force, only HTTPS force - which is what is failing!!! *If you would actually look at the option in the SDK Setup executable you would see that it says *"Force https://... sources to be fetched using http://..."* Seems to me this is exactly what you would want... *> Why on Earth can we not have one nice neat package that just installs it all for us? * Because then that would limit all Android development to a specific version of Eclipse and Java... And that would piss off a whole lot more people than you. Not to mention the hassle of having to coordinate an installer for the Android SDK, Eclipse, the ADT plugins for Eclipse, and Java... Multiple companies with multiple license agreements... Google would probably have to get specific license permissions from each of the companies that created this software to include these things in a *"nice neat package that just installs it all for us."* *> I already have to learn Java ffs, why should I have to wrestle with installing this?* You really don't have to learn Java if you don't want to... The choice is all yours. *> Is there any guide that is not on http://developer.android.com that isn't so incomprehensible?* Have you even taken the time to read the stuff on http://developer.android.com? 90% of the questions I answer on this group I get straight from that site. I fail to see how it is "so incomprehensible." It sounds like most of your problems aren't with Android but are with Java and Eclipse in general... And for some reason you feel the need to take it all out on Android. If you really are looking for help then I would suggest that you take a look at this site and then try asking for help again... the right way. http://www.catb.org/~esr/faqs/smart-questions.html Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sun, Feb 21, 2010 at 7:09 AM, Subjective Effect < subjective.eff...@gmail.com> wrote: > I've used PHP/Apache/mySQL/HTML/CSS/JavaScript for years. I've also do > a bit of ASP and vBasic coding. In order to use these tools I've had > to install various development environments in my time. > > But this Android Dev kit has me stumped. > . > The installation instructions are not clear at all. Do I need to DL > Eclipse first? Which order do things need installing? Its totally > baffling and I understand why even my Android dev friends say that the > iPhone OS dev kit is much easier to use. > > I've DLed and installed the Java JDK 6, Eclipse and the Android SDK. > Eclipse wont start as it says it needs Java JRE, the Android SDK setup > wont find the updates and says to enforce HTTP in the settings but in > settings there IS no HTTP force, only HTTP
[android-beginners] Why on Earth is it so hard to set up the development environment?
I've used PHP/Apache/mySQL/HTML/CSS/JavaScript for years. I've also do a bit of ASP and vBasic coding. In order to use these tools I've had to install various development environments in my time. But this Android Dev kit has me stumped. The installation instructions are not clear at all. Do I need to DL Eclipse first? Which order do things need installing? Its totally baffling and I understand why even my Android dev friends say that the iPhone OS dev kit is much easier to use. I've DLed and installed the Java JDK 6, Eclipse and the Android SDK. Eclipse wont start as it says it needs Java JRE, the Android SDK setup wont find the updates and says to enforce HTTP in the settings but in settings there IS no HTTP force, only HTTPS force - which is what is failing!!! Why on Earth can we not have one nice neat package that just installs it all for us? I already have to learn Java ffs, why should I have to wrestle with installing this? Is there any guide that is not on http://developer.android.com that isn't so incomprehensible? -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why is "Force Close" happening?
I see many posts about this problem and recently I have been getting it from several apps. Could it be because I upgraded the OS version? -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
RE: [android-beginners] Why cant my activity show on the emulator screen?
Uncomment these three lines: //TextView tv = new TextView(this); //tv.setText("Hello, Android"); //setContentView(tv); -Original Message- From: android-beginners@googlegroups.com [mailto:android-beginn...@googlegroups.com] On Behalf Of IceCity Sent: Tuesday, December 15, 2009 5:40 PM To: Android Beginners Subject: [android-beginners] Why cant my activity show on the emulator screen? I use Eclipse as development tool. Here is my hello world code: 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); } } the Hello, Android just didn't show in the emulator screen, why? I had JDK1.6, SDK2.0, and set the enviroment path and classpath. I don't understand why can't it show in the emulator. -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.406 / Virus Database: 270.14.89/2539 - Release Date: 12/21/09 19:13:00 -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why is it so hard to make a point move?
I want to have a screen with snowflakes falling (in the spirit of the Holiday Season) and the snow building in the bottom of the screen. So far all I have been able to do is show a lone white dot on the black screen. What should I do to make another 100 or 1000 of those dots and make them float down to the bottom of the screen just like real snowflakes? import android.app.Activity; import android.os.Bundle; import java.util.Random; public class DroidSnowGlobe extends Activity{ Random generator = new Random(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); snowview sv = new snowview(this); setContentView(sv); while (true) { int x = generator.nextInt(100) +1; int y = generator.nextInt(100) +1; sv.changepos(x, y); //Does not work at all setContentView(sv); } } } snowview class: import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.view.View; import java.util.Random; public class snowview extends View{ Random generator = new Random(); private ShapeDrawable mDrawable; public snowview(Context context) { super(context); int x = generator.nextInt(100) +1; int y = generator.nextInt(100) +1; int width = 3; int height = 3; mDrawable = new ShapeDrawable(new OvalShape()); mDrawable.getPaint().setColor(Color.WHITE); mDrawable.setBounds(x, y, x + width, y + height); } protected void onDraw(Canvas canvas) { mDrawable.draw(canvas); } public void changepos(int x, int y){ int width = 3; int height = 3; mDrawable.setBounds(x, y, x + width, y + height); } } -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why cant my activity show on the emulator screen?
I use Eclipse as development tool. Here is my hello world code: 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); } } the Hello, Android just didn't show in the emulator screen, why? I had JDK1.6, SDK2.0, and set the enviroment path and classpath. I don't understand why can't it show in the emulator. -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Why R,java file is missing from Android open source apps
R.java is a file that gets generated when you compile an Android application. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Nov 26, 2009 at 8:08 PM, ChilLfiRe wrote: > I am trying to Import open source Android app using Google and SVN > plugin for Eclipse but it seems all of them are missing the R.Java > file. I couldn't figure out how to generate R.java file or why is it > missing? > > I have tried Importing the project as Android Project and eclipse > seems to create the gen folder but it remains empty. > > Any help will be appreciated. > > 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 -- 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] why Auto Redial option is not there in Android?
Hi, Could somebody explain me why Auto Redial option is not there in Android? If the option is there, then how to work with redial in android. Thanks in advance. Regards Pushkar Setty -- 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] Why R,java file is missing from Android open source apps
I am trying to Import open source Android app using Google and SVN plugin for Eclipse but it seems all of them are missing the R.Java file. I couldn't figure out how to generate R.java file or why is it missing? I have tried Importing the project as Android Project and eclipse seems to create the gen folder but it remains empty. Any help will be appreciated. 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
Re: [android-beginners] why Java, not Python?
To my knowledge, Java is simply faster. That, and Python is also rather "big". With any luck, Unladen Swallow might find its way onto our devices.. then perhaps we can get Python onto Android. Personally, i would give my right leg for Python on android. (And by that, i mean Python working as well as, or better, than Java. Not that python scripting project, heh.) On Sun, Nov 22, 2009 at 4:07 PM, Shawn Brown wrote: > > Again, not trying to start any arguments, just curious if > > anyone has any background on this. > > Well consider that Google AppEngine started in python and then added > java support. In some ways, the python version is more advanced. > > I don't know why java was chosen but you have to believe that python > was looked at seriously as well and for some reason ... I don't know > the exact reasoning though. > > Shawn > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > To post to this group, send email to android-beginners@googlegroups.com > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > -- Lee Olayvar -- 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
Re: [android-beginners] why Java, not Python?
This is my theory. One of the creators of Android company, which android is based on, came from an company called Danger in mountain view. Danger made the sidekick - The applications made on the sidekick are all done in java. http://developer.danger.com/site/faq/show#q5 An natural evolution of the client side language for android based on the founders experience would be java. Tom On Sun, Nov 22, 2009 at 4:07 PM, Shawn Brown wrote: >> Again, not trying to start any arguments, just curious if >> anyone has any background on this. > > Well consider that Google AppEngine started in python and then added > java support. In some ways, the python version is more advanced. > > I don't know why java was chosen but you have to believe that python > was looked at seriously as well and for some reason ... I don't know > the exact reasoning though. > > Shawn > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > To post to this group, send email to android-beginners@googlegroups.com > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > -- Tom Chen Software Architect GOGII, Inc t...@gogii.net 650-468-6318 -- 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
Re: [android-beginners] why Java, not Python?
Anybody know what the number of Python developers vs. the number of Java developers? I would think that Java would have more developers. Maybe they were trying to go with the biggest developer base in hopes to get more apps up and running quickly. Ryan On Sun, Nov 22, 2009 at 7:07 PM, Shawn Brown wrote: > > Again, not trying to start any arguments, just curious if > > anyone has any background on this. > > Well consider that Google AppEngine started in python and then added > java support. In some ways, the python version is more advanced. > > I don't know why java was chosen but you have to believe that python > was looked at seriously as well and for some reason ... I don't know > the exact reasoning though. > > Shawn > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > To post to this group, send email to android-beginners@googlegroups.com > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en -- 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
Re: [android-beginners] why Java, not Python?
> Again, not trying to start any arguments, just curious if > anyone has any background on this. Well consider that Google AppEngine started in python and then added java support. In some ways, the python version is more advanced. I don't know why java was chosen but you have to believe that python was looked at seriously as well and for some reason ... I don't know the exact reasoning though. Shawn -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] why Java, not Python?
Not trying to start a flame war here, just curious about the decision to use Java as the main language for Android development instead of Python. For one Python is one of the main languages used by Google, and both languages are byte-code interpreted. Python has a very rich set of libraries which make it easy to do things quite succinctly. For instance if I wanted to know how old a friend's baby exactly is I could do something like: from datetime import datetime start = datetime(2009, 10, 3, 9, 45, 0, 0) age = datetime.now() - start print 'Birthday/time :', start print 'Baby's exact age:', age Perhaps I don't know Java well enough, but this would be much more verbose/complex to do in Java. Again, not trying to start any arguments, just curious if anyone has any background on this. 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] Why won't this Download Method work?
Hi Guys, I'm new here, and I'm just trying to learn the ropes of android. Okay, so here's my question: I've got a method that I've tested successfully and found that it works in Java. However, when I convert it over to android, and try to run it on my emulator, it doesnt work. Basically, the method takes the input parameters beginning, end, and URL, and downloads a file or file segment from the URL parameter with beginning at byte position beginning and ending at byte position end. In the emulator, it wont download but in Java, it works just fine. I've enabled internet permissions, and I've tested the other parts of my activity so I don't think thats the problem. Heres my code, maybe you guys can help. public void download(int beginning, int end, String address) throws IOException{ URL url; int read = 0; android.util.Log.d(TAG,"DL Started"); byte buffer[] = new byte[1024]; url = new URL(address); URLConnection fileAddress = url.openConnection(); fileAddress.setAllowUserInteraction(true); fileAddress.setRequestProperty("Range","bytes=" + beginning + "-" + end); InputStream is = fileAddress.getInputStream(); DataOutputStream out = new DataOutputStream(new BufferedOutputStream (new FileOutputStream("/sdcard/Test"))); android.util.Log.d(TAG,"DL in the midst"); while (read !=300 ){ is.read(buffer); out.write(buffer); read++; } out.close(); android.util.Log.d(TAG,"File is: "+fileAddress.getContentLength() + " bytes"); //while((bytereader = is.read()) != beginning); // while byte is not beginning of the segment //return 0; } -- 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] Why Android not supporting WAP pages?
Hi, Could some body explain me, why android is not supporting wap pages? Please i need a detailed explanation about this. Thanks. Regards Pushkar Setty -- 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] Why more than one buttons are highlighted on one screen
Hi, There are 15 buttons on the screen of my application. Normally only one button is highlight, for example buttonA. But if I press buttonB for a long time and/or multi-times it will be highlight too. And the buttonA is still highlight. So two buttons are highlighted. Use the same way three or four buttons will be highlighted at same time on the screen. If I use direction key to move the cursor over all the highlight button then only one button is highlight. I use button to change frequency in my program. If pressing button in less than FIRST_DELAY it only changes frequency one step. It will change one more step for every CONST_DELAY after FIRST_DELAY. It works fine. The issue is the highlight when pressing a long time. I put the program bellow: private Handler switchHandler = new Handler() { @Override public void handleMessage(Message message) { if( MESSAGE_INCREASE_CHANNEL == message.what ) { // sendEmptyMessageDelayed( MESSAGE_INCREASE_CHANNEL, CONT_DELAY); } } } public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button button = (Button)findViewById( R.id.radio_channel_up); button.setOnTouchListener( new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent event) { if( view instanceof Button ) { if( MotionEvent.ACTION_DOWN == event.getAction() ) { // switchHandler.sendEmptyMessageDelayed( MESSAGE_INCREASE_CHANNEL, FIRST_DELAY); return true; } } return false; } }); } Thanks, Shude -- 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] Why do I need requery() when I already have notifyDataSetChanged()
I had an adapter that was no updating properly when I called myAdapter.notifyDataSetChanged() This causes much headache an finally I tried cursor.requery(); //This is the cursor on which myAdapter is connected to myAdapter.notifyDataSetChanged(); My Question is - Why do I need to run requery()? I thought that notifyDataSetChanged() would automatically update the cursor for us! --~--~-~--~~~---~--~~ 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] why use onCreateDialog?
i've been wondering this. why would i implement Activity.onCreateDialog()? why wouldn't i just create a new instance of the dialog i want, and call .show() on it? usually a dialog will close itself, but if i doesn't, i just keep a handle to it in a member field and call .dismiss(). --
[android-beginners] why can't I get paid apps
Hi, I have a google IO handset. When I updated to donut, I didn't get paid market apps ./fastboot-mac erase userdata erasing 'userdata'... OKAY $ ./fastboot-mac erase cache erasing 'cache'... OKAY reisMac:donut brownasamoto-brown$ ./fastboot-mac update signed-google_ion-img-14721_system_image.zip I am in Japan which has market access. How can I get market access? I am running a standard HTC rom. Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why is my file not accesible at data/data ?
Hello, I am trying to store an xml file. When searching for solutions everyone suggests, that the just created file has to be located at "/data/data/your_project_package_structure/ files/samplefile.txt" Unfortunately neither on my emulator nor on the real device I can find my file at this location Here is my code: - try { URL u; u = new URL("www.asdf.com"); HttpClient httpClient = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(u.toString()); HttpResponse response = null; response = httpClient.execute(httpGet); HttpEntity entity = null; if (response != null) entity = response.getEntity(); InputStream is = entity.getContent(); FileOutputStream fos = openFileOutput("test.xml", Context.MODE_WORLD_WRITEABLE); byte buf[] = new byte[32768]; int len; while ((len = is.read(buf)) > 0) { fos.write(buf, 0, len); } fos.close(); is.close(); // I can read the file here and put it in a textview, so the file actually exists.. } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } --- --~--~-~--~~~---~--~~ 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] Why is Google launching Micello on the iPhone?
Why is Google launching Micello on the iPhone? http://news.slashdot.org/story/09/09/30/2052258/Google-Wants-to-Map-Indoors-Too --~--~-~--~~~---~--~~ 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] Why I couldn't retrieve the phone number from intent in onReceive of BroadcastReceiver
hi, This is a simple application which sends group sms (a group consist only 5 phone numbers )and i have registered a Broadcast to announce as sms is send .here i need to display the number to which the sms is send ,how to do that here is my code # In onCreate() button is pressed it triggers an onClick event and sends the group sms public void onClick() { for (int j = 0; jhttp://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why the buffer is 0 when I play the "rtsp" movie from the internet?
Why the buffer is 0 when I play the "rtsp" movie from the internet? I wrote a appliaction to play the movie from the internet.I try many times and could not found out the reason ,so I decided to have a look at opencore source code. I look at the opencore source code ,and I find that it is the most important code is below.But I could not find out how the percentage is increasing .So I could not find out where the reason caused all these.could someone give me a hand? —— void PlayerDriver::HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent) { .. case PVMFInfoBufferingStatus: { const void *buffer = aEvent.GetLocalBuffer(); const size_t size = aEvent.GetLocalBufferSize(); int percentage; if (GetBufferingPercentage(buffer, size, &percentage)) { //This place print the log "D/PlayerDriver( 31): buffering (0)" LOGD("buffering (%d)", percentage); mPvPlayer->sendEvent(MEDIA_BUFFERING_UPDATE, percentage); } } break; .. - bool GetBufferingPercentage(const void *buffer, const size_t size, int *percentage) { if (buffer == NULL) { LOGI(" GetBufferingPercentage Invalid buffer: NULL"); LOGE("Invalid buffer: NULL"); return false; } if (sizeof(int) != size) { LOGE("Invalid percentage buffer size %d (expected %d)", size, sizeof(int)); return false; } // TODO: The PVEvent class should expose a memcopy method // that does bound checking instead of having clients reaching // for its internal buffer. // Clamp the value and complain loudly. oscl_memcpy(percentage, buffer, sizeof(int)); if (*percentage < 0 || *percentage > 100) { LOGE("Invalid percentage value %d", *percentage); return false; } return true; } - log D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) D/PlayerDriver( 31): buffering (0) while play the "http" movie ,it's ok; and now I don't konw where the percentage is not increasing ,and how the percentage is increasing. --~--~-~--~~~---~--~~ 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] Why My application could play http but not rtsp?
I wrote a application .It could playback the internet video and audio , if I give it a address begin with "http://".But when I input the address that is beginning with the "rtsp://",It could not play. Log: I/ActivityManager( 1074): Process com.android.voicedialer (pid 2152) has died. I/ActivityManager( 1074): Low Memory: No more background processes. D/skia( 1122): purging 10K from font cache [1 entries] I/ActivityManager( 1074): Starting activity: Intent { act=android.intent.action.MAIN cat= [android.intent.category.LAUNCHER] flg=0x1020 cmp=com.android.Test/.Test_Main } I/ActivityManager( 1074): Start proc com.android.Test for activity com.android.Test/.Test_Main: pid=2163 uid=10020 gids={} I/WindowManager( 1074): Setting rotation to 1, animFlags=0 I/WindowManager( 1074): Config changed: { scale=1.0 imsi=0/0 loc=en_US touch=3 keys=1/1/2 nav=1 orien=2} D/StatusBar( 1074): updateResources W/IInputConnectionWrapper( 1122): showStatusIcon on inactive InputConnection I/ActivityManager( 1074): Displayed activity com.android.Test/.Test_Main: 989 ms (total 989 ms) I/ActivityManager( 1074): Starting activity: Intent { cmp=com.android.Test/.StreamTest.Test } I/ActivityManager( 1074): Displayed activity com.android.Test/.StreamTest.Test: 137 ms (total 137 ms) I/ActivityManager( 1074): Starting activity: Intent { act=android.intent.action.VIEW dat=rtsp://125.76.233.38/h264.3gp typ=video/* cmp=com.android.camera/.MovieView } I/ActivityManager( 1074): Start proc com.android.camera for activity com.android.camera/.MovieView: pid=2170 uid=10003 gids={1006, 1015, 2001, 3003} W/InputManagerService( 1074): Starting input on non-focused client com.android.internal.view.iinputmethodclient$stub$pr...@4384c6a8 (uid=10020 pid=2163) W/IInputConnectionWrapper( 2163): showStatusIcon on inactive InputConnection V/VideoView( 2170): reset duration to -1 in openVideo I/ActivityManager( 1074): Displayed activity com.android.camera/.MovieView: 2300 ms (total 2300 ms) I/ActivityManager( 1074): Process com.android.Test (pid 2163) has died. I/WindowManager( 1074): WIN DEATH: Window{437bb600 com.android.Test/ com.android.Test.Test_Main paused=false} I/WindowManager( 1074): WIN DEATH: Window{4381f0c8 com.android.Test/ com.android.Test.StreamTest.Test paused=false} I/ActivityManager( 1074): Low Memory: No more background processes. W/QCvdec ( 1029): get_parameter: unknown param 0ff7a347 D/skia( 1122): purging 33K from font cache [4 entries] D/skia( 1074): purging 43K from font cache [6 entries] D/skia( 2170): purging 21K from font cache [3 entries] E/PlayerDriver( 1029): Command PLAYER_PREPARE completed with an error or info PVMFFailure W/PlayerDriver( 1029): PVMFInfoErrorHandlingComplete E/MediaPlayer( 2170): error (1, -1) E/MediaPlayer( 2170): Error (1,-1) D/VideoView( 2170): Error: 1,-1 E/MediaPlayer( 2170): stop called in state 0 E/MediaPlayer( 2170): error (-38, 0) --~--~-~--~~~---~--~~ 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] Why does using People._COUNT cause IllegalArgumentException to be thrown?
Hello, I am learning about Content Providers, and tried the example from the official Android tutorial on the topic. Please see the code below: package com.example.devguide; import android.app.Activity; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.util.Log; public class ContentProviderExamples extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); /* Use the ContentUris method to produce the base URI * for the contact with _ID == 23. */ Uri myPerson = ContentUris.withAppendedId( People.CONTENT_URI, 23 ); /* Alternatively, use the Uri method to produce the base URI. */ myPerson = Uri.withAppendedPath( People.CONTENT_URI, "23" ); /* Query this particular record. */ Cursor c = managedQuery( myPerson, null, null, null, null ); /* Form an array specifying which columns to return. */ String[] projection = new String[] { People._ID, //People._COUNT, //throws IllegalArgumentException People.NAME, People.NUMBER }; Log.i( "CPE", "projection[] = " + projection ); /* Get the base URI for the People table in the Contacts content provider. */ Uri contacts = People.CONTENT_URI; /* Construct the query. */ Cursor managedCursor = managedQuery( contacts, projection, null, null, People.NAME + " ASC" ); showColumnData( managedCursor ); Log.i( "CPE", "End of current code" ); } private void showColumnData( Cursor c ) { if ( c.moveToFirst() ) { String name; String phoneNumber; String imagePath; int nameColumn = c.getColumnIndex( People.NAME ); int phoneColumn = c.getColumnIndex( People.NUMBER ); do { /* Obtain the field values. */ name = c.getString( nameColumn ); phoneNumber = c.getString( phoneColumn ); Log.d( "CPE", "name = " + name + ", phone = " + phoneNumber ); } while ( c.moveToNext() ); } } } However, the example given did not work, because calling managedQuery with the array projection as one of the arguments resulted in a IllegalArgumentException (java.lang.IllegalArgumentException). Android says that the column "_count" which is the value of the element People._COUNT in array projection is invalid. Can anyone explain to me the reason for this exception, even though the names of all the columns are as per the API specification? Please see the output of LogCat below: 08-26 12:06:20.330: ERROR/AndroidRuntime(1112): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.devguide/com.example.devguide.ContentProviderExamples}: java.lang.IllegalArgumentException: Invalid column _count Thanks, Pankaj Godbole, --~--~-~--~~~---~--~~ 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] why
why --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] why I can't use movieview to play the movie came from the internet?
I use the movieview.java to playback the movie comes from the internet.In a activity ,I wrote a Intent that jump to the movieview and pass the movieview a url.But after several seconds,It is closed because something is wrong. W/InputManagerService( 1075): Starting input on non-focused client com.android.internal.view.iinputmethodclient$stub$pr...@437bc7f0 (uid=10003 pid=1305) W/IInputConnectionWrapper( 1305): showStatusIcon on inactive InputConnection I/ActivityManager( 1075): Displayed activity com.android.stk/.StkDialogActivity: 439 ms (total 439 ms) V/VideoView( 1305): reset duration to -1 in openVideo W/IInputConnectionWrapper( 1119): showStatusIcon on inactive InputConnection E/PlayerDriver( 1030): Command PLAYER_PREPARE completed with an error or info PVMFFailure W/PlayerDriver( 1030): PVMFInfoErrorHandlingComplete E/MediaPlayer( 1305): error (1, -1) E/MediaPlayer( 1305): Error (1,-1) D/VideoView( 1305): Error: 1,-1 E/MediaPlayer( 1305): stop called in state 0 E/MediaPlayer( 1305): error (-38, 0) W/MediaPlayer( 1305): mediaplayer went away with unhandled events --~--~-~--~~~---~--~~ 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] why the alertdialog could not display ?
I am trying to display the dialog,but something is wrong when I do it.I use a timer to do something. I want to use a dialog to let the user konw, when the dialog is end. seekTask = new TimerTask() .. seekTask.cancel(); new AlertDialog.Builder(mContext) .setTitle(R.string.seek_task_end) .setPositiveButton(R.string.btn_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface d, int which) { d.dismiss(); } }) .show(); //Log.i("tag","message") the log could not display. --~--~-~--~~~---~--~~ 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] Why XML to define layouts and components?
I'm wondering whether other Android newbies than me find the empathy on XML layout troublesome? I realize we should strive to separate view from logic and that XML is hip and trendy, but is it really necessary for these relatively simple Android applications? XML layouts involves more files and what feels like a lot of "magic" (type unsafe) properties, and makes samples harder to follow/ type. It also can't be especially efficient to use findViewById (whether BFS or DFS based) constantly? It sort of reminds me of the differences between JSF and Wicket, where the former was designed by people sitting in an ivory tower while the latter was designed for and by people at the ground, comfortable with Java. Which also leads me to wonder how come Android uses the old type- unsafe int enum pattern and also, why method chaining isn't used to greater effect. /Casper --~--~-~--~~~---~--~~ 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] Why XML to define layouts/components?
My original first post doesn't seem to get approved, so let me try again. :) I'm wondering whether other Android newbies than me find the empathy on XML layout troublesome? I realize we should strive to separate view from logic and that XML is hip and trendy, but is it really necessary for these relatively simple Android applications? XML layouts involves more files and what feels like a lot of "magic" (type unsafe) properties, and makes samples harder to follow/ type. It also can't be especially efficient to use findViewById (whether BFS or DFS based) constantly? It sort of reminds me of the differences between JSF and Wicket, where the former was designed by people sitting in an ivory tower while the latter was designed for and by people at the ground, comfortable with Java. Which also leads me to wonder how come Android uses the old type- unsafe int enum pattern and also, why fluent-interfaces/method- chaining isn't used in greater extend? /Casper PS: You might want to fix the URL's to the group charter and FAQ as they currently go into 404. --~--~-~--~~~---~--~~ 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] Why "hello world" can't be displayed?
Hi, I am trying "Hello World" as explained in SDK. But why "Hello World" can't be displayed in my AVD? I always see "Android" string. Thanks, Pei --~--~-~--~~~---~--~~ 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] Why I can't install ADT
Hi, I am a beginner for Android. I am trying to install ADT in my PC. But I always get following message: Android Development Tools (0.9.1.v200905011822-1621) requires plug-in "org.eclipse.wst.sse.core". I try to search "org.eclipse.wst.sse.core", but I can't find anything. Who can tell me where I can download "org.eclipse.wst.sse.core". I am using Eclipse 3.3. Thanks, Pei --~--~-~--~~~---~--~~ 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] Why so slow
Hi, Iam developing on Eclipse and I already set the Emulator Parameter to EDGE-Speed. The Problem is, the application runs fast on my Emulator but very slow on my device. Thanks Yves --~--~-~--~~~---~--~~ 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] Why won't it start here?
Is there any problem with launching a service via an Alarm's BroadcastReceiver's onReceive? My service never has it's onCreate or onStart method called. My Alarm's receiver gets a wakelock, calls context.startService(new Intent(context, FmiDaemon.class)); (context given via onRecieve parameter), waits 3 seconds, then releases the lock. My service has 2 methods, onCreate and onStart. onCreate gets another wakelock, the end of onStart releases the wakelock, and calls "stopSelf". Both methods are supposed to send data to a log, but never do since they're never called. Where is the problem? Is that a bad "context" to use? Is onCreate and onStart the wrong methods to implement? --~--~-~--~~~---~--~~ 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] why does Locale.JAPAN.get DisplayName(Locale.JAPAN) display Japan, not 日 本語 (日本) ?
Why does Locale.JAPAN.getDisplayName(Locale.JAPAN) display Japan in English, not 日本語 (日本) in Japan? The sdk i used is built from cupcake version using 'make sdk'. Does it have any parameters i must use when building ? Or is there any parameters set when using emulator ? 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] Why can't you see some paid apps on Market with Devphones?
well...? --~--~-~--~~~---~--~~ 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] Why Michael Jackson death?
Why Michael Jackson death? http://hd-family.blogspot.com/2009/06/all-of-michael-jackson-king-of-pop-part.html Hot video of Michael Jackson: http://hd-family.blogspot.com/2009/06/michael-jackson-25th-anniversary.html All of Michael Jackson here: http://hd-family.blogspot.com/2009/06/all-of-michael-jackson-king-of-pop-part.html --~--~-~--~~~---~--~~ 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] Why does android.opengl.matrix use floating point instad of fixed point?
I noticed that the android.opengl.matrix class uses floating point numbers for everything and as far as I can tell there isn't a fixed point equivalent. However, elsewhere (ie: sample project) it's mentioned that fixed point is faster since android devices are likely to not have an FPU. Also, OpenGL ES has fixed point versions of every function I've looked at thus far, so I'm assuming you could write most of your program with fixed point only. So, why does android.opengl.matrix use floating point if it's known to be slow and has a faster alternative? I could understand if there was another Matrix class that used fixed point, but from what I can tell there isn't. --~--~-~--~~~---~--~~ 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] why emylator is so slow atsystem start-up
hello, I used 1.5 sdk and create avd by default use target 2 . when i run hello android excample,it's very slow to start up. i get log from ddms list follows: 06-18 08:38:23.981: ERROR/vold(538): Error opening switch name path '/ sys/class/switch/test2' (No such file or directory) 06-18 08:38:24.070: ERROR/vold(538): Error bootstrapping switch '/sys/ class/switch/test2' (m) 06-18 08:38:24.070: ERROR/vold(538): Error opening switch name path '/ sys/class/switch/test' (No such file or directory) 06-18 08:38:24.070: ERROR/vold(538): Error bootstrapping switch '/sys/ class/switch/test' (m) 06-18 08:38:24.141: ERROR/flash_image(544): can't find recovery partition 06-18 08:42:11.721: ERROR/MemoryHeapBase(582): error opening /dev/ pmem: No such file or directory 06-18 08:42:11.751: ERROR/SurfaceFlinger(582): Couldn't open /sys/ power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 06-18 08:42:11.941: ERROR/GLLogger(582): couldn't load library (Cannot find library) 06-18 08:42:12.721: ERROR/GLLogger(582): couldn't load library (Cannot find library) 06-18 08:47:24.330: ERROR/BatteryService(582): Could not open '/sys/ class/power_supply/usb/online' 06-18 08:47:24.442: ERROR/BatteryService(582): Could not open '/sys/ class/power_supply/battery/batt_vol' 06-18 08:47:24.461: ERROR/BatteryService(582): Could not open '/sys/ class/power_supply/battery/batt_temp' 06-18 08:47:31.182: ERROR/EventHub(582): could not get driver version for /dev/input/mouse0, Not a typewriter 06-18 08:47:31.221: ERROR/EventHub(582): could not get driver version for /dev/input/mice, Not a typewriter 06-18 08:47:34.343: ERROR/System(582): Failure starting core service 06-18 08:47:34.343: ERROR/System(582): java.lang.SecurityException 06-18 08:47:34.343: ERROR/System(582): at android.os.BinderProxy.transact(Native Method) 06-18 08:47:34.343: ERROR/System(582): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java: 146) 06-18 08:47:34.343: ERROR/System(582): at android.os.ServiceManager.addService(ServiceManager.java:72) 06-18 08:47:34.343: ERROR/System(582): at com.android.server.ServerThread.run(SystemServer.java:163) 06-18 08:47:34.482: ERROR/AndroidRuntime(582): Crash logging skipped, no checkin service who can tell me why ? 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] Why is this not working?
I thought this would work, but obviously I am doing something wrong. setListAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1,R.array.beers)); --~--~-~--~~~---~--~~ 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] Why not build an installer for android on WM phones?
I was wondering.. I've been following the android development for quite a time now.. I am certainly not an developer but why doesn't the android group bring out an application with wich u can simpel install android over your current windows mobile.. I know that there are lot's of things that may give error like unkown hardware and stuff.. But if there is an application made that you can run on your pc (win,mac,linux) witch can detect what sort of hardware your phone has and if its capitble of running android (1.5) then it would over you to install it from your desktop.. And the software alsof should backup the original windows mobile rom file.. I was suprised they didn't do this already because it wouild be a great change for Android to really steal some of the windows mobile market.. Is there any changes such an idea is possible? (sorry for my rubbish English) --~--~-~--~~~---~--~~ 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] Why does Android Market give me this error?
I receive the following error when I try to upload my application to the Android Market, "Market requires the minSdkVersion to be set in AndroidManifest.xml". The name of my apk is AskTheSheik, but in the app I have com.sheik.magic8. I don't know if that is the problem or not. Here is my Manifest file: http://schemas.android.com/apk/res/android"; package="com.sheik.magic8" android:versionCode="1" android:versionName="1.0.0"> --~--~-~--~~~---~--~~ 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] Why does this give an error.
This gives the following error "illegal modifier for strSheikResp" static final String[] strSheikResp = new String[]{}; --~--~-~--~~~---~--~~ 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] why ADT can not show the preference dialog in ubuntu
In the properties view of ADT Layout Editor, ImageView have a background property, there is a more button with text "..." in value column,when click it will show me a reference dialog to select a resource int windows ,but int ubuntu there nothing happen. My env is ubuntu 8.10 ,eclipse 3.4 and ADT 0.8 sorry for my poor english Thanks a lot --~--~-~--~~~---~--~~ 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] why is bitmap .getWidth() and .getHeight() returning -1
im having trouble with why these values are being returned to me. the bitmap is being loaded using BitmapFactory.decodeResource() and the image loaded displays correctly when i draw it onto a canvas. however, the only quirk i've encountered so far is that i cannot retrieve the bitmap width/height. i've even moved the loading of the images from the constructor into the onSizeChanged() event of the view just to make sure that the unloaded view isnt affecting the results. any insights to this would be appreciated. cheers! --~--~-~--~~~---~--~~ 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] Why does the control sequence change
I have a fairly standard layout (see code below), the synopsis is this: RelativeLayout TableLayout TableRow EditText id=txtEntry1 TableRow EditText id=txtEntry2 EditText id=txtEntry3 End TableLayout Button id=btnGoNext, is aligned to parentBottom End RelativeLayout When the emulator is in portrait mode, and I press the down arrow, the focus moves from txtEntry1 to txtEntry2 to txtEntry3 and then to btnGoNext, which is exactly what it should do. However, when I flip the the orientation to landscape, the focus goes from txtEntry2 to btnGoNext and then to txtEntry3. How can I fix this? http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > http://schemas.android.com/apk/res/ android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1"> --~--~-~--~~~---~--~~ 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] Why Prefer Virtual Over Interface?
Hi all, I don't known why "Calling through an interface reference can take 2x longer than a virtual method call through a concrete reference"? Could someone help to explain it, thank you very much. --~--~-~--~~~---~--~~ 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] Why does Android use Binder for IPC?
what is the advantage and special feature of Binder 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] Why my application get "Not granting permission warning" when i install it by adb and AppsInstaller
Hi, All guru I am a beginner for android development. I found my application always get "Not granting permission" warning when I install it by adb and AppsInstaller as following. 03-18 16:01:05.882: WARN/PackageManager(56): Not granting permission android.permission.CALL_PRIVILEGED to package com.altigen.mobile.view (protectionLevel=3 flags=0x46) 03-18 16:01:05.882: WARN/PackageManager(56): Not granting permission android.permission.INJECT_EVENTS to package com.altigen.mobile.view (protectionLevel=2 flags=0x46) And my application cannot inject DTMF tone and mute the micphone on call, I doubt it is related with the permission not granted issue, is correct? Could any one can tell me how to get the permission granted? I used the debug.keystore, is that related? Thanks in advance! Paul --~--~-~--~~~---~--~~ 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] Why won't Intent pass along the extras
I have a class object that I want to pass from one screen to another. So I made it inherit from Parcelable and added the following code to my class: public class ItemDescription implements Parcelable { /// property setters and getters public int describeContents() { // TODO Auto-generated method stub return 0; } public void writeToParcel(Parcel out, int flags) { out.writeInt(mData); } public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public ItemDescription createFromParcel(Parcel in) { return new ItemDescription(in); } public ItemDescription[] newArray(int size) { return new ItemDescription[size]; } }; } In response to an event, I do kick off another screen (Intent) and put extras into it: Intent mIntent = new Intent(v.getContext(), Item.class); Parcelable itemDesc = getItemDescription(preset); // returns ItemDescription mIntent.putExtra("com.vbrad.android.mystapp.item1", itemDesc); startActivity(mIntent); In the onCreate event of this new activity, I attempt o retrieve the contents of the itemDesc object in the following manner: Intent intent = getIntent(); Parcelable p = intent.getParcelableExtra("com.vbrad.android. mystapp.item1"); ItemDescription itemDesc = (ItemDescription) p; However, the itemDesc object is unpopulated - all the internal variables are at default values (e.g. 0 for numeric types, null for everything else). It's like it was just created. What am I missing here? 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] why print android_power:wakeup and didn't boot?
I don't know whether here is the proper place to post the message, because I am not a kernel developer, but I met a problem seems to have relashipship with the knowledge of the kernel. After I have change opencore ( mydroid/external/opencore, this is the lower layer relevant to media player) using mEmulation=true ( android/ android_surface_output.cpp) in order to use software codec; and copied the relevant lib to system/lib, my hardware board cannot successfully boot. and I found the libs render the problem are libandroid_services and libmedia* here is the print, anyone could give me any clue? print: android_power: wakeup (0->0) at 31319546575 (1970-01-01 00:00:31.319554395 UTC) android_power: wakeup (0->0) at 49765869810 (1970-01-01 00:00:49.765874772 UTC) android_power: wakeup (0->0) at 67881147696 (1970-01-01 00:01:07.881152358 UTC) android_power: wakeup (0->0) at 86564803262 (1970-01-01 00:01:26.564808337 UTC) android_power: wakeup (0->0) at 105151896836 (1970-01-01 00:01:45.151902551 UTC) android_power: wakeup (0->0) at 123721148756 (1970-01-01 00:02:03.721156237 UTC) android_power: wakeup (0->0) at 141840563717 (1970-01-01 00:02:21.840571085 UTC) android_power: wakeup (0->0) at 160263557478 (1970-01-01 00:02:40.263562703 UTC) android_power: wakeup (0->0) at 178231158192 (1970-01-01 00:02:58.231164658 UTC) --~--~-~--~~~---~--~~ 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] Why a static variay variable can not be released when executing finish() method to exit my application?
Hi guys, please see the subject. I define a variable like "public static int count=0", see the code as below, class Main extends Activity{ Oncreate() { count++; finish(); } } and then, when I running the app again, I found the value of count is "1" rather than "0". Any one can help me to resovle the issue? 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] why does onKeyDown is not work in view class?
hi all, I only place it in Activity class, why? 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] Why I can't delete SIM record?
Hi guys, I can use code to delete contacts in phone, but I can't do it in SIM card. Does anybody know it?? Here is my code to delete SIM record. mSimUri = Uri.parse("content://sim/adn"); getContentResolver().delete(mSimUri, "name=?",new String[] {"people name"}); No exception to execute this command, but not any result. Can anybody give an eye on 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] Why doesn't this align?
Guys, In the following layout xml i am trying to align a text to the center. Could anyone tell me whats wrong with this as it does not align to the center, but to left. http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#009900" > Thank --~--~-~--~~~---~--~~ 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] Why I cannot see my email send to the group?
Why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why doesn't this add an ID in r.java
I have the following code in a separate xml file from main. When I save the file it it does not add webkit into R.java. http://schemas.android.com/apk/res/android"; android:layout_width="fill_parent" android:layout_height="fill_parent"/> On Tue, 2009-01-13 at 18:04 +0530, PRATAP SOLAPUR wrote: > > import > > android.app.Activity; > > import > > android.os.Bundle; > > import > > android.webkit.WebView; > > public > > class BrowserDemo1 extends Activity { > > WebView > > browser; > > @Override > > public void onCreate(Bundle icicle) { > > super.onCreate(icicle); > > setContentView(R.layout. > > main); > > //browser.getSettings().setJavaScriptEnabled(true); > > browser=(WebView)findViewById(R.id.webkit); > > browser.loadUrl("http://www.google.com";); > > } > > } > > > On 1/13/09, Bear34238 wrote: > > I know this is something simple but it has eluded me. Could > someone > provide a code example of launching the web browser inside an > adroid > Application.> --~--~-~--~~~---~--~~ 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] Why atomic access to functions like CameraService::Client::takePicture()?
Hi, I seldom program multithreads. I am curious about why it needs a Mutex::Autolock to protect access to CameraService::Client::takePicture ()? We don't have multiple camera clients, right? Is it for preventing consecutively taking pictures? 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] Why do I need a ListView?
I've been fighting this for freaking hours: I can open my ContentProvider and assign data to variable. I know want to list all the records. I can't get anything to display. I've been trying to simply things and I've run into a road block: for some reason, I keep getting the error "Your content must have a ListView whose id attribute is 'android.R.id.list'". The problem occurs when I modify this layout file: http://schemas.android.com/apk/res/android"; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > If I take out the ListView, I get the error, but I can't find out where in my code I'm referecing that. --~--~-~--~~~---~--~~ 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] why I can not use ksoap with web service
I use ksoap with web service in Andrid. java code: package com.WsReader; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; import android.widget.TextView; import android.widget.Button; // ksoap2 import import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.AndroidHttpTransport; import org.ksoap2.serialization.PropertyInfo; public class WsReader extends Activity { private static final String SOAP_ACTION = "http://tempuri.org/ HelloWorld";//"AddIntegers"; private static final String METHOD_NAME = "HelloWorld";//"AddIntegers"; private static final String NAMESPACE = "http://tempuri.org/";; private static final String URL = "http://192.168.100.123/ AsapWebRun/AsapService/wf.asmx";//"http://wiki.tuxpan.com:8069/axis2/ services/Simple"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTheme(android.R.style.Theme_Dialog); setContentView(R.layout.main); // cmdCalculate button final Button cmdcal = (Button) findViewById (R.id.cmdCalculate); cmdcal.setOnClickListener(new Button.OnClickListener(){ public void onClick(View v){ ((TextView)findViewById(R.id.lblStatus)).setText("... Invoking Web Service ..."); String stA=((EditText)findViewById(R.id.numberA)).getText ().toString(); String stB=((EditText)findViewById(R.id.numberB)).getText ().toString(); /* Integer a=null; Integer b=null; try { a=Integer.valueOf(stA); b=Integer.valueOf(stB); } catch(Exception ex){} if(a==null || b==null){ ((TextView)findViewById(R.id.lblStatus)).setText("Only Integer numbers please..."); } */ // ksoap SoapObject request=new SoapObject(NAMESPACE,METHOD_NAME); /* SoapObject inAddIntegers=new SoapObject (NAMESPACE,"GetAuthorizationTicket"); inAddIntegers.addProperty("userID", stA); inAddIntegers.addProperty("userPass", stB); request.addProperty("GetAuthorizationTicket",inAddIntegers); */ SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport=new AndroidHttpTransport(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); Object result=envelope.getResponse(); ((TextView)findViewById(R.id.lblStatus)).setText (result.toString()); } catch(Exception ex){ ((TextView)findViewById(R.id.lblStatus)).setText("Error: "+ex.getClass().getName() +":"+ex.getMessage()); } } }); }// end of onCreate }// end of class WsReader === .net web service code: - using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://tempuri.org/";)] [WebServiceBinding(ConformsTo = WsiProfiles.None)] // [System.Web.Script.Services.ScriptService] public class wf : System.Web.Services.WebService { public wf() { } [SoapRpcMethod(), WebMethod] public string HelloWorld() { return "Hello World"; } } // when I run the application in emulator,It cannot successful. then I write a normal java application // ksoap2 import import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.AndroidHttpTransport; import org.ksoap2.serialization.PropertyInfo; public class WfReader { private static final String SOAP_ACTION = "http://tempuri.org/ HelloWorld";//"AddIntegers"; private st
[android-beginners] why doesn't this work? Simple question - I hope...
What's the difference between: Calendar c = new Calendar(); // doesn't work and Calendar c = Calendar.getInstance(); // does work Calendar is an abstract class, yet I can get an instance of it. I've used Java for a while now, but as an on/off hobby. Android has restarted my desire to code! --~--~-~--~~~---~--~~ 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] Why the Android.Editor.commit return false, But the value is OK
I have a problem in following code: Activity---HelloAndroid .. btnSpp.setOnClickListener(new View.OnClickListener(){ public void onClick(View v){ Intent i=new Intent(); i.setClass(HelloAndroid.this, SharePreferencePage.class); startActivityForResult(i,REQUEST_TYPE_B); } }); // Jump to another input screen ... protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); .. TextView txt = (TextView)findViewById(R.id.txt); SharedPreferences sp=getSharedPreferences("Text",0); android.util.Log.d("HA"," >"+sp.getString("Text", "none")); txt.setText(sp.getString("Text", "null")); .. } //Accept the return value from sharedPreferences Activity--SharePreferencePage .. btn.setOnClickListener(new View.OnClickListener(){ public void onClick(View v){ result=et.getText().toString(); SharedPreferences sp=getSharedPreferences("Text",0); SharedPreferences.Editor edit=sp.edit(); edit.putString("Text", result); try{ boolean b=edit.commit(); setResult(Activity.RESULT_OK); }catch(Exception e){ android.util.Log.d("SPP",">expetion:"+e.toString()); } finish(); } }); . = The problem is in "boolean b=edit.commit();" , it's always false. But the value is set successfully. And can be get from SharedPreferences sp=getSharedPreferences("Text",0); In Spec, commit() return false mean write flase. Why in this case it will return false? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why Android Market blocked in some countries?
Why Android market is blocked in some countries? Whats the relation between people of that country and their government?! Is there anyone that has direct link of android market to share with me? (to download those packages to PC and send them to my G1) Please give my hand :( --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] why my GPS always unavailable?
i try to use GPS Tracker, but it says my GPS always unavailable, i turned on gps in settings. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why China developer cannot register android market?
Dear all, I'm a Chinese develper and want to join Android Market. But when i pa my registration fee i found that there has no China option in Location dropdown list. I want to know why china developer cannot join Android Market? Thanks Colky --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why does "My Location" crash LocationManagerService?
I am using the default emulator with only default apps loaded and if I go to Maps, then Hit Menu and then My Location, DDMS shows it is crashing LocationManagerService because provider is set to "network". So what does it take to get "My Location" to work please? thanks 10-31 15:49:57.106: INFO/MapsActivity(650): Processing Intent: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x1040 comp={com.google.android.apps.maps/ com.google.android.maps.MapsActivity} } 10-31 15:49:57.106: INFO/MapsActivity(650): Ignoring intent with action == null or ACTION_MAIN 10-31 15:49:57.126: DEBUG/LocationManager(650): removeUpdates: listener = [EMAIL PROTECTED] 10-31 15:49:57.126: DEBUG/LocationManagerService(47): _requestLocationUpdates: listener = [EMAIL PROTECTED] 10-31 15:49:57.126: DEBUG/GpsLocationProvider(47): setMinTime 0 10-31 15:49:57.136: INFO/Maps.MyLocationOverlay(650): Request updates from gps 10-31 15:49:57.136: ERROR/LocationManagerService(47): isProviderEnabled got exception: 10-31 15:49:57.136: ERROR/LocationManagerService(47): java.lang.IllegalArgumentException: provider=network 10-31 15:49:57.136: ERROR/LocationManagerService(47): at com.android.server.LocationManagerService._isProviderEnabled(LocationManagerService.java: 1210) 10-31 15:49:57.136: ERROR/LocationManagerService(47): at com.android.server.LocationManagerService.isProviderEnabled(LocationManagerService.java: 1196) 10-31 15:49:57.136: ERROR/LocationManagerService(47): at android.location.ILocationManager $Stub.onTransact(ILocationManager.java:211) 10-31 15:49:57.136: ERROR/LocationManagerService(47): at android.os.Binder.execTransact(Binder.java:276) 10-31 15:49:57.136: ERROR/LocationManagerService(47): at dalvik.system.NativeStart.run(Native Method) 10-31 15:49:57.205: INFO/MapActivity(650): Handling network change notification:CONNECTED 10-31 15:49:57.255: VERBOSE/DumpStateReceiver(47): Running: /system/ bin/dumpcrash 10-31 15:49:57.526: INFO/DumpStateReceiver(47): Finished: 1769 bytes read; status 0 10-31 15:49:57.535: INFO/DumpStateReceiver(47): Added state dump to 1 crashes --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] why not can't receive android-beginners@googlegroups.com recently
why not can't receive android-beginners@googlegroups.com recently。 Is my email too many? -- 冯刚 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why isn't this layout file working?
Here's what I want: two simple input fields, one labeled "Artist" and one "Title". Basically: Artist [ input ] Title[ input ] The two input fields (EditTexts) need to be aligned on a vertical axis, so that the application looks good. Thus, I used the TableLayout View. Unfortunately, it seems I just can't get the table cells to expand all the way. So here's how my layout looks like (the | represends the margin of the screen): Artist [ input ] | Title[ input ] | But I want the input fields to expand all the way. I could probably do it with a fixed width, but I don't think that's a good idea. Here's my main.xml file: http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > BTW, I know the is not currently needed, but I'll have to add some things below the table. Thanks, Felix. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] why I can't login gmail on android(develop board)?
After I signed in my account and password, I click on button to sign in. But it will come back login page with null account and password, or stay in the sign in page for a long time. I can login the gmail on PC easyly. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why can‘t i use prepare()function?
This is the code,i copied it from elsewhere and tried it. Eclipse shows that there is a error in the mp.prepare(); line. If i delete the that , there is only audio no images in the application. Please HELP . package com.android.playvideo; import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; import android.view.Surface; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.ViewGroup.LayoutParams; import android.widget.LinearLayout; public class PlayVideo extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); LayoutParams lop = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); LinearLayout layout = new LinearLayout(this); layout.setOrientation(LinearLayout.VERTICAL); MediaPlayer mp = MediaPlayer.create(this, R.raw.lhstest); SurfaceView sv = new SurfaceView(this); sv.setLayoutParams(lop); SurfaceHolder sh = sv.getHolder(); Surface sfc = sh.getSurface(); sfc.setPosition(150, 150); mp.setDisplay(sfc); layout.addView(sv); layout.setLayoutParams(lop); setContentView(sv); //mp.prepare(); mp.start(); } } --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why does getTop() return 0?
Hi guys, I'm declaring some view inside my layout xml file and then I'm trying to figure out their location with getTop(), bottom, right, left etc. However, the end result is that it always returns 0, why is this? Here is the implementation: public TextView mDropHere; public TextView mOne; public TextView mTwo; public LinearLayout mViewParent; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); mDropHere = (TextView) findViewById(R.id.drophere); mOne = (TextView) findViewById(R.id.one); mTwo = (TextView) findViewById(R.id.two); mViewParent = (LinearLayout) findViewById(R.id.viewparent); Log.e("DropHere", Integer.toString(mDropHere.getBottom()) + " " + Integer.toString(mDropHere.getLeft()) + " " + Integer.toString(mDropHere.getRight()) + " " + Integer.toString(mDropHere.getTop())); Log.e("mOne", Integer.toString(mOne.getBottom()) + " " + Integer.toString(mOne.getLeft()) + " " + Integer.toString(mOne.getRight()) + " " + Integer.toString(mOne.getTop())); Log.e("mTwo", Integer.toString(mTwo.getBottom()) + " " + Integer.toString(mTwo.getLeft()) + " " + Integer.toString(mTwo.getRight()) + " " + Integer.toString(mTwo.getTop())); Log.e("mViewParent", Integer.toString(mViewParent.getBottom()) + " " + Integer.toString(mViewParent.getLeft()) + " " + Integer.toString(mViewParent.getRight()) + " " + Integer.toString(mViewParent.getTop())); } Cheers, Charles --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] why import "import com.google.googlenav.placemark" is unknow
Now i try to add Placemark in my maps But unfortutatly this library is unknow (com.google.googlenav.placemark), what is the 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---