[android-developers] how PUSH Tech in android ????

2009-10-12 Thread Mohsin Yasin
Hi!
i am facing an problem?

problem:
server (web server) wants to send data( or some information) to mobile
client (android based phone).
means simply notify to start work, then mobile start working on specific
application.

i would like to do a SMS from server to mobile, to start working. buts its
not the best idea.
as we can assign too an IP to android mobile phone in case of WiFi or USB
connectivity.
but phone will use GPRS or GSM, so there is no unique IP of Mobile so that
we can access mobile phone using Socket Programing
so there is any idea or tutorial for this mention problem.

dont give the example that GMAIL, or black beryy etc using these technology,
actually tell me how technically its work
thanks
waiting for your good replies


-- 
 -
Mohsin Yaseen
Android Developer, EASIP IMSciences
Consultant Software, Qurtuba Education System
http://www.linkedin.com/in/rmyasin
http://groups.yahoo.com/group/bPakistani/
+923349069919
+923129069919
rmya...@yahoo.com
myas...@gmail.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to connect a context menu to a spinner popup?

2009-10-12 Thread Walles

Hi!

I have a spinner that I've read from an XML file.  When I click the
spinner, it pops up a list of stuff.  I'd like to connect a context
menu to the popped up list.  How can I do that?

I have attempted registerForContextMenu(Spinner), but that adds the
context menu to the spinner itself rather than the list it pops up.

  Help! //Johan

Spinner setup code:
http://bazaar.launchpad.net/~walles/sl/trunk/annotate/49/StockholmPublicTransport/src/com/johan/sl/SL.java#L140

Spinner XML (it's the fromSpinner and the toSpinner that I want to
provide with context menus):
http://bazaar.launchpad.net/~walles/sl/trunk/annotate/49/StockholmPublicTransport/src/com/johan/sl/SL.java#L140
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: get outgoing call details in background

2009-10-12 Thread Nemat

@Roman

But How would we get the state when the call is received?I mean call
duration means the difference of the time when call is received and
the time when the call is disconnected.OFFHOOK is the state when caLL
is placed.So we should be notified when the call is received.How can
we get that?

@nEx.Software

if its not possible with service then it is of no use for me.

Anyways is there any way to read the call-log in service?

On Oct 12, 11:08 pm, "nEx.Software" 
wrote:
> You are getting the error on startManagingCursor because that method
> does not exist in a Service.
> Leave that out and make sure you close the cursor when you are done
> with it.
>
> On Oct 12, 11:00 am, "Roman ( T-Mobile USA)" 
>
>
> mobile.com> wrote:
> > You should be able to measure the time between multiple
> > onCallStateChanged events.
>
> > In case of an outgoing call the state would switch from IDLE to
> > CAll_STATE_OFFHOOK to to IDLE again.
>
> > --
> > Roman Baumgaertner
> > Sr. SW Engineer-OSDC
> > ·T· · ·Mobile· stick together
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
>
> > On Oct 12, 3:14 am, Nemat  wrote:
>
> > > Hi friends,
>
> > > Actually I was working to get duration of outgoing call.But I dont
> > > find any way of doing this.Then I decided to get the details of
> > > outgoing call from call log.
>
> > > But my code works only for Activity.I want this to work with Services
> > > because I want to get the details related to outgoing call in
> > > background using services.What should I do to get these details in
> > > background.I currently implement it for Activity.Here is my complete
> > > code:
> > > public void outgoingRecord()
> > >   {
> > >           Cursor c = getContentResolver().query(
> > >               android.provider.CallLog.Calls.CONTENT_URI,
> > >               null,
> > >               null,
> > >               null,
> > >               android.provider.CallLog.Calls.DATE+ " DESC");
> > >           startManagingCursor(c);
>
> > >   int numberColumn = c.getColumnIndex(
> > >           android.provider.CallLog.Calls.NUMBER);
> > > int dateColumn = c.getColumnIndex(
> > >           android.provider.CallLog.Calls.DATE);
> > > // type can be: Incoming, Outgoing or Missed
> > > int typeColumn = c.getColumnIndex(
> > >           android.provider.CallLog.Calls.TYPE);
> > > int durationColumn=c.getColumnIndex(
> > >         android.provider.CallLog.Calls.DURATION);
>
> > > // Will hold the calls, available to the cursor
> > > ArrayList callList = new ArrayList();
>
> > > try{
> > > boolean moveToFirst=c.moveToFirst();
> > > Log.d("MOVETOFIRST", "moveToFirst="+moveToFirst);}
>
> > > catch(Exception e)
> > > {
> > >           Log.e("MOVETOFIRSTERROR","MOVETOFIRST Error="+e.toString());
>
> > > }
>
> > >          String callerPhoneNumber = c.getString(numberColumn);
> > >          int callDate = c.getInt(dateColumn);
> > >          int callType = c.getInt(typeColumn);
> > >          int duration=c.getInt(durationColumn);
>
> > >          Log.d("CALLS", "callDate="+callDate);
>
> > >              switch(callType){
> > >               case android.provider.CallLog.Calls.INCOMING_TYPE:
>
> > >                           Log.d("INCOMINGCALLLOG", "CallerPhoneNum="+
> > > callerPhoneNumber+" "+"Duration="+duration);
>
> > >                                 break;
> > >               case android.provider.CallLog.Calls.MISSED_TYPE:
> > >                                   break;
> > >               case android.provider.CallLog.Calls.OUTGOING_TYPE:
> > >                              Log.d("OUTGOINGCALLLOG",
> > > "CallerPhoneNum="+ callerPhoneNumber+" "+"Duration="+duration);
> > >                                  break;
>
> > > }
>
> > >   }
>
> > > I got error in "  startManagingCursor(c)".
>
> > > Should I use another way to do this?If yes,What would be that way?- Hide 
> > > quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to implement JKalman filter on sensor values

2009-10-12 Thread Nithin


Hi all,

Anybody know how to implment JKalman filter in the sensor values. If
antbody have any link or sample code, please share...

Thanks
Nithin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-12 Thread Jayesh Salvi
I tried to look into the android framework code
(link). The topmost frame refers to a 'throw'
statement(line 512) that is inside a catch of a lower level exception. I
can't tell what part of the createView() function throws that lower level
exception.
I also tried to search around for the error string "Error inflating class
java.lang.reflect.Constructor", but couldn't found one with a similar stack
trace. (There are known crashes with this error message caused inside
android.preference.* package, but mine is a simple widget layout and not
preferences, as you might have seen in the XML file I attached earlier.)

I now have 9 reports of this crash and all of them are confirmed to be using
Sprint HTC Hero devices. This problem hasn't been reported on any other
phone. Is it fair to assume that it's a problem in that particular ROM? If
that's so, then what options do I have to resolve this issue - should I wait
helplessly for HTC/Sprint's next update?

Any suggestions are appreciated.

Thanks.
--
Jayesh


On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi  wrote:

>
> --
> Jayesh
>
>
> On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> flyingdutc...@gmail.com> wrote:
>
>>
>> I might be mistaken,
>> But this part of the stack-trace worries me a bit:
>>
>>android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>>com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
>> 145)
>>com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
>> 566)
>>com.altcanvas.readerscope.ReaderTask.doInBackground
>> (ReaderTask.java:1027)
>>
>> Are you inflating a view in a background-thread and not in the main
>> gui-thread?
>> But then again, your code works on other Android phones
>>
>
> Yes that's true. The layout is inflated in background thread, but is made
> part of the root hierarchy (setContentView) only in the GUI thread.
>
> This doesn't give any problem on emulator or any other phones.
>
>
>>
>> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
>> > --
>> > Jayesh
>> >
>> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy 
>> wrote:
>> >
>> > > Hi,
>> >
>> > > The stack trace you showed is not useful. This is the top of the
>> > > exception chain, which means this exception was caused by something
>> > > else. Please show the "application specific stack frames" you removed.
>> >
>> > The complete stack trace is:
>> >
>> > - Cause -
>> >
>> > android.view.InflateException: Binary XML file line #27: Error inflating
>> > class java.lang.reflect.Constructor
>> >
>> > android.view.LayoutInflater.createView(LayoutInflater.java:512)
>> >
>> >
>> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
>> >
>> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
>> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
>> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>> > android.view.LayoutInflater.inflate(LayoutInflater.java:407)
>> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
>> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>> > com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
>> >
>> com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)
>> >
>> >
>> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
>> >
>> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
>> > com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
>> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
>> > java.util.concurrent.FutureTask.run(FutureTask.java:122)
>> >
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j­ava:648)
>> >
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:­673)
>> > java.lang.Thread.run(Thread.java:1058)
>> > ---
>> >
>> > The code around line 145 in ItemDetails.java is:
>> >
>> > 144.widerContainer = new LinearLayout(app);
>> >
>> > 145.widerContainer.addView((LinearLayout) inflater
>> >
>> > 146..inflate(R.layout.delcs,null), layoutFW);
>> >
>> > 147.widerContainer.addView((LinearLayout) inflater
>> >
>> > 148..inflate(R.layout.digg,null), layoutFW);
>> >
>> >
>> >
>> >
>> >
>> > > On Sun, Oct 11, 2009 at 12:34 PM, Jayesh Salvi > >
>> > > wrote:
>> > > > Hi,
>> > > > In past couple of days, users of my app have sent crash reports
>> > > indicating
>> > > > errors in layout inflation.
>> > > > "android.view.InflateException: Binary XML file line #27: Error
>> inflating
>> > > > class java.lang.reflect.Co

[android-developers] Re: what touch events are supported in Appwidget

2009-10-12 Thread Romain Guy

It's not possible, only clicks are supported.

On Mon, Oct 12, 2009 at 8:12 PM, Luke  wrote:
>
> Dear All,
> I want to create the two or more views in Appwidget and change the
> view by scroll event ( pull and release ).
> Is it possible to implement scroll event in Appwidget?
> what touch events are supported in Appwidget (except click)?
>
>
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I package shared libs only into apk

2009-10-12 Thread Dianne Hackborn
You should use the NDK.  If you are compiling as a platform component,
things are very different, and you won't have you code inside of a .apk.

On Mon, Oct 12, 2009 at 6:51 PM, tica  wrote:

>
> Thx.But I'm not using the NDK, I build it in Android's src codes tree.
>
> On Oct 13, 1:43 am, "Roman ( T-Mobile USA)"  mobile.com> wrote:
> > Which version of the NDK are you using? I am using 1.5 and the
> > Android.mk does not look as complicated.
> >
> > By the way, try to ask your question in the Android-NDK instead of the
> > developer group!
> >
> > --
> > Roman Baumgaertner
> > Sr. SW Engineer-OSDC
> > ·T· · ·Mobile· stick together
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
> >
> > On Oct 12, 1:19 am, tica  wrote:
> >
> > > From the SimpleJNI's sample code, the Android.mk is like this:
> > > # This makefile shows how to build a shared library and an activity
> > > that
> > > # bundles the shared library and calls it using JNI.
> >
> > > TOP_LOCAL_PATH:= $(call my-dir)
> >
> > > # Build activity
> >
> > > LOCAL_PATH:= $(TOP_LOCAL_PATH)
> > > include $(CLEAR_VARS)
> >
> > > LOCAL_MODULE_TAGS := samples
> > > LOCAL_SRC_FILES := $(call all-subdir-java-files)
> > > LOCAL_PACKAGE_NAME := SimpleJNI
> > >LOCAL_JNI_SHARED_LIBRARIES:= libsimplejni
> > > include $(BUILD_PACKAGE)
> >
> > > # 
> > > # Also build all of the sub-targets under this one: the shared
> > > library.
> > > include $(call all-makefiles-under,$(LOCAL_PATH))
> >
> > > And I know add the "LOCAL_JNI_SHARED_LIBRARIES" variable can tell the
> > > build system to add libsimplejni.so into the apk file , but the
> > > libsimplejni.so file will still copy into /system/lib/ directory. How
> > > can I make the libraries only build into apk ,and it will not copy to /
> > > system/lib directory in the Android build system ?Cause I do not need
> > > it anymore if the libs were already included in the apk.
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: stopped unexpectedly when run on emulator

2009-10-12 Thread Dianne Hackborn
Oh and my writing code that catches and consumes an exception, you are
preventing the system from doing the normal thing of logging the full error,
 As a general just don't do catch (Exception e).  If you really really for
some strange reason are doing that, log the entire exception (using Log.w
with the exception as the third argument) so when it does happen you can see
the actual error.

2009/10/12 Dianne Hackborn 

> You need to provide the -full- stack crawl including, very importantly, all
> of the "caused by" clauses which tell you the actual original errors that
> happened.
>
> 2009/10/12 黄登辉 
>
> Thanks for your warm reply. yeah,
>> i know which line code cause this exception.
>> the following is part of system log.
>> 10-13 09:42:10.782: ERROR/AndroidRuntime(705): Caused by:
>> java.lang.NullPointerException
>> 10-13 09:42:10.782: ERROR/AndroidRuntime(705): at
>> com.example.android.snake.Snake.onCreate(Snake.java:84)
>>
>> line 84 is :mSnakeView.setMode(SnakeView.READY);
>>
>> and the root reason is
>> >try {
>> >setContentView(R.layout.snake_layout);
>> >} catch (Exception e) {
>> >Log.d("SnakeView", "inside onCreate function --
>> setContentView!");
>> >
>> >}
>> >
>> >
>> >try {
>> >mSnakeView.setTextView((TextView)
>> findViewById(R.id.text));
>> >} catch (Exception e) {
>> >Log.d("SnakeView", "inside onCreate function
>> last!");
>> >
>> >}
>>
>> because in system log, there are two log as following:
>>
>> 10-13 09:42:10.763: DEBUG/SnakeView(705): inside onCreate function --
>> setContentView!
>> 10-13 09:42:10.763: DEBUG/SnakeView(705): inside onCreate function last!
>>
>>
>> summary, i think there is a error in layout xml file, and cause android
>> can't explain this layout xml file.
>>
>> then occur the above exception. But the just reuse the snake's layout xml
>> from sdk sample. so i can't find any error in layout xml file.
>>
>> But i modify the implemented code of SnakeView and tileView . maybe the
>> implemented code have some problems.
>>
>> and attachment is source code, if you have some time, please have a look
>> at it. and i will continue to find this bug, which let me be in trouble  two
>> days.
>>
>>
>>
>>
>>
>> 2009/10/13 Marco Nelissen 
>>
>>
>>> Look at the system log (either using "adb logcat" or with the ddms
>>> perspective in eclipse), and it will tell you exactly where and why it
>>> crashed.
>>>
>>>
>>> On Mon, Oct 12, 2009 at 7:37 AM, 登辉 黄  wrote:
>>> >
>>> > we modifid snake from sdk samples. there is a running exception
>>> > "stopped unexpectedly". after step debug, i found that the statement
>>> > setContentView(R.layout.snake_layout); and mSnakeView.setTextView
>>> > ((TextView) findViewById(R.id.text));from snake.java file will throw
>>> > exceptions. i think the layout xml file have a some error. but i can't
>>> > find any error in this file.
>>> >
>>> >
>>> > 
>>> > 
>>> >
>>> > http://schemas.android.com/apk/res/
>>> > android"
>>> >android:layout_width="fill_parent"
>>> >android:layout_height="fill_parent"
>>> > xmlns:app="http://schemas.android.com/apk/res/
>>> > com.example.android.snake">
>>> >
>>> >>> > android:id="@+id/snake"
>>> >android:layout_width="fill_parent"
>>> >android:layout_height="fill_parent"
>>> >app:tileSize="40"
>>> >/>
>>> >
>>> >>> >android:layout_width="fill_parent"
>>> >android:layout_height="fill_parent" >
>>> >
>>> >>> > android:id="@+id/text"
>>> >android:text="@string/snake_layout_text_text"
>>> >android:visibility="visible"
>>> >android:layout_width="wrap_content"
>>> >android:layout_height="wrap_content"
>>> >android:layout_centerInParent="true"
>>> >android:gravity="center_horizontal"
>>> >android:textColor="#ffff"
>>> >android:textSize="24sp"/>
>>> >
>>> > 
>>> >
>>> >
>>> > and snake.java as following:
>>> >
>>> > /*
>>> >  * Copyright (C) 2007 The Android Open Source Project
>>> >  *
>>> >  * Licensed under the Apache License, Version 2.0 (the "License");
>>> >  * you may not use this file except in compliance with the License.
>>> >  * You may obtain a copy of the License at
>>> >  *
>>> >  *  http://www.apache.org/licenses/LICENSE-2.0
>>> >  *
>>> >  * Unless required by applicable law or agreed to in writing, software
>>> >  * distributed under the License is distributed on an "AS IS" BASIS,
>>> >  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> > implied.
>>> >  * See the License for the specific language governing permissions a

[android-developers] Re: stopped unexpectedly when run on emulator

2009-10-12 Thread Dianne Hackborn
You need to provide the -full- stack crawl including, very importantly, all
of the "caused by" clauses which tell you the actual original errors that
happened.

2009/10/12 黄登辉 

> Thanks for your warm reply. yeah,
> i know which line code cause this exception.
> the following is part of system log.
> 10-13 09:42:10.782: ERROR/AndroidRuntime(705): Caused by:
> java.lang.NullPointerException
> 10-13 09:42:10.782: ERROR/AndroidRuntime(705): at
> com.example.android.snake.Snake.onCreate(Snake.java:84)
>
> line 84 is :mSnakeView.setMode(SnakeView.READY);
>
> and the root reason is
> >try {
> >setContentView(R.layout.snake_layout);
> >} catch (Exception e) {
> >Log.d("SnakeView", "inside onCreate function --
> setContentView!");
> >
> >}
> >
> >
> >try {
> >mSnakeView.setTextView((TextView)
> findViewById(R.id.text));
> >} catch (Exception e) {
> >Log.d("SnakeView", "inside onCreate function
> last!");
> >
> >}
>
> because in system log, there are two log as following:
>
> 10-13 09:42:10.763: DEBUG/SnakeView(705): inside onCreate function --
> setContentView!
> 10-13 09:42:10.763: DEBUG/SnakeView(705): inside onCreate function last!
>
>
> summary, i think there is a error in layout xml file, and cause android
> can't explain this layout xml file.
>
> then occur the above exception. But the just reuse the snake's layout xml
> from sdk sample. so i can't find any error in layout xml file.
>
> But i modify the implemented code of SnakeView and tileView . maybe the
> implemented code have some problems.
>
> and attachment is source code, if you have some time, please have a look at
> it. and i will continue to find this bug, which let me be in trouble  two
> days.
>
>
>
>
>
> 2009/10/13 Marco Nelissen 
>
>
>> Look at the system log (either using "adb logcat" or with the ddms
>> perspective in eclipse), and it will tell you exactly where and why it
>> crashed.
>>
>>
>> On Mon, Oct 12, 2009 at 7:37 AM, 登辉 黄  wrote:
>> >
>> > we modifid snake from sdk samples. there is a running exception
>> > "stopped unexpectedly". after step debug, i found that the statement
>> > setContentView(R.layout.snake_layout); and mSnakeView.setTextView
>> > ((TextView) findViewById(R.id.text));from snake.java file will throw
>> > exceptions. i think the layout xml file have a some error. but i can't
>> > find any error in this file.
>> >
>> >
>> > 
>> > 
>> >
>> > http://schemas.android.com/apk/res/
>> > android"
>> >android:layout_width="fill_parent"
>> >android:layout_height="fill_parent"
>> > xmlns:app="http://schemas.android.com/apk/res/
>> > com.example.android.snake">
>> >
>> >> > android:id="@+id/snake"
>> >android:layout_width="fill_parent"
>> >android:layout_height="fill_parent"
>> >app:tileSize="40"
>> >/>
>> >
>> >> >android:layout_width="fill_parent"
>> >android:layout_height="fill_parent" >
>> >
>> >> > android:id="@+id/text"
>> >android:text="@string/snake_layout_text_text"
>> >android:visibility="visible"
>> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_centerInParent="true"
>> >android:gravity="center_horizontal"
>> >android:textColor="#ffff"
>> >android:textSize="24sp"/>
>> >
>> > 
>> >
>> >
>> > and snake.java as following:
>> >
>> > /*
>> >  * Copyright (C) 2007 The Android Open Source Project
>> >  *
>> >  * Licensed under the Apache License, Version 2.0 (the "License");
>> >  * you may not use this file except in compliance with the License.
>> >  * You may obtain a copy of the License at
>> >  *
>> >  *  http://www.apache.org/licenses/LICENSE-2.0
>> >  *
>> >  * Unless required by applicable law or agreed to in writing, software
>> >  * distributed under the License is distributed on an "AS IS" BASIS,
>> >  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> > implied.
>> >  * See the License for the specific language governing permissions and
>> >  * limitations under the License.
>> >  */
>> >
>> > package com.example.android.snake;
>> >
>> > import android.app.Activity;
>> > import android.os.Bundle;
>> > import android.util.Log;
>> > import android.view.Window;
>> > import android.widget.TextView;
>> >
>> > /**
>> >  * Snake: a simple game that everyone can enjoy.
>> >  *
>> >  * This is an implementation of the classic Game "Snake", in which you
>> > control a
>> >  * serpent roaming around the garden looking for apples. Be careful,
>> > though,
>> >  * because when you catch on

[android-developers] Re: How to categorize the installed applications similar to Android Market

2009-10-12 Thread Dianne Hackborn
Sorry, there is no way to do this -- that information is currently just
internal to the market app, not part of the platform at all.

On Mon, Oct 12, 2009 at 8:30 PM, Riyaz  wrote:

>
> I am developing a launcher application.
> I want to display the installed applications in categories like
> Android Market.
> Say if i have installed an application from category Communication, I
> want to show that application under Communication category in my
> launcher.
> How do i get the category (Android Market category) information of an
> application?
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to categorize the installed applications similar to Android Market

2009-10-12 Thread Riyaz

I am developing a launcher application.
I want to display the installed applications in categories like
Android Market.
Say if i have installed an application from category Communication, I
want to show that application under Communication category in my
launcher.
How do i get the category (Android Market category) information of an
application?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] what touch events are supported in Appwidget

2009-10-12 Thread Luke

Dear All,
I want to create the two or more views in Appwidget and change the
view by scroll event ( pull and release ).
Is it possible to implement scroll event in Appwidget?
what touch events are supported in Appwidget (except click)?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Master Clear From Code does not work

2009-10-12 Thread yuantech

I would like to know how to acquire the platform key. Is it something
that we have to request from the android dev team? What are the
requirements to acquire it? We are also trying to develop an app which
requires resetting the phone at some conditions. Thanks in advance for
any help you could extend.

On Aug 17, 4:36 am, Jeff Sharkey  wrote:
> The "android.permission.MASTER_CLEAR" permission is protected with
> "signatureOrSystem".  That is, it can only be granted to apps signed
> with the platform key, or installed on the system partition.
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> j
>
>
>
> On Sun, Aug 16, 2009 at 3:31 AM, amit wrote:
>
> > hi,
>
> > I am writing an application in which I need to call Master Clear under
> > a specifi condition.
> > But I am getting permission error.
>
> > My Code:
> > ===
>
> > AndroidManifest.xml
> > -
> >  
>
> > Calling Master Clear Code (similar to code present in Settings of
> > Android)
> > -
>
> >    ICheckinService service =
> >            ICheckinService.Stub.asInterface(ServiceManager.getService
> > ("checkin"));
> >    if (service != null) {
> >        try {
> >            service.masterClear();
> >        } catch (android.os.RemoteException e) {
> >            Log.e("MasterClear", "Some Error Here !!");
> >        }
> >    }
>
> > Observation / Error / Output (in DDMS)
> > ---
> > PermissionDenial : can't invoke masterClear from PID=965, uid = 10019
>
> > When I go to menu==>settings==>Application Settings==>Manage
> > Applications ==>  ==> permissions, I dont see any permissions
> > assigned to my app which means the app does not have the permissions.
> > But I have set the permission for master clear (  > android:name="android.permission.MASTER_CLEAR" />) in the
> > AndroidManifest.xml but it does not seem to work. Can anyone help.
>
> > Thanks,
> > Amit
>
> --
> Jeff Sharkey
> jshar...@android.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: detecting application loss of screen control

2009-10-12 Thread David Bernstein

This is true.  However, my application, which comprises many
activities, is the one starting (most) activities not started by the
HOME key, which can't be intercepted (googling "android intercept home
key" will bring up multiple discussions of this).  I would prefer not
to have my app needlessly hammer the system every time it starts up
one of its own activities.

For now, I'm going with the almost-good-enough approach of updating
its (zero, one, or more) app widgets when the root task closes (in its
onPause(): isFinishing() is true, would also use isTaskRoot() if the
task weren't always rooted by the same activity).

I think it would be helpful if the API provided
Activity.isTaskSwitching() and/or Activity.isApplicationSwitching()
and maybe something to tell when being killed by the OS (e.g. for
memory) for use in onPause() so that an application can tell that it's
losing control.


On Oct 9, 12:36 pm, RichardC  wrote:
> As I understand it you are right, you need to react to onPause in each
> activity (see also onSaveInstanceState()).
>
> The reason behind this is an end-user Task can comprise more than one
> Applicaton/Process with each Application consisting of more than one
> Activity.
>
> To give a made up example (which may not be possible with the actual
> Andoid code base):
>
> 1) End-user starts MyApp with MyActivity1
>
> 2) In MyActivity1 the end-user selects somethings which starts
> GoogleMaps / GoogleMapsActivity1 with some push pin data from MyApp.
>
> 3) End-user selects on of the push-pins that causes Google Maps to
> start MyActivity2 (in MyApp).
>
> So now we have
>
> MyApp          MyActivity
> GoogleMaps     GoogleMapsActivity1
> MyApp          MyActivity2
>
> 4) MyApp/MyActivity2 could now display a web page etc.
>
> Any Application/Process which is not the current forground Activity is
> a candidate to be killed by the OS if resources get tight. So each
> Activity that pauses needs to save its state so that when the end-user
> presses the back key it can restore itself and resume where it left
> off.
>
> --
> RichardC
>
> On Oct 9, 6:22 pm, David Bernstein  wrote:
>
> > How can an application detect when it's lost control of the screen?
> > The reason I ask is that my application has an appwidget whose visible
> > state should be consistent with user actions within the application.
> > In addition to the application exiting, I'd like to know when other
> > applications take over the screen.
>
> > Simply noticing in onPause() in the root activity isn't enough because
> > the user can, for example, press the home key or receive a phone
> > call.  Noticing in onPause() in every single activity is overkill
> > because the user will move between multiple activities in the same
> > application.
>
> > If this is documented or discussed already, I'll humbly accept an RTFM
> > pointer, but I didn't find anything when I looked.
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android contact type

2009-10-12 Thread Stephen

1. I would like to know if I'm add a new contact using the content
provider, is that the type must be "Google" show in the device?

2. The contact I query using content provider is that if the type in
"phone" type some of the fields may not supported to query?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using drawable resources

2009-10-12 Thread Jerome White

It turned out the problem was a name mismatch in my manifest.
AndroidManifest had

   http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Need a Prescription for adding a couple attributes to the Contact

2009-10-12 Thread stanlick

Can a seasoned droid help me with the steps necessary to add a couple
simple attributes to the stock Android Contacts application.  Also, in
the event the vendor has shipped their own Contacts application, will
the same solution apply equally well to those handsets shipped with
custom apps?  I'm not looking for anyone to supply code; just a design
pattern and any caveats I need to be aware of.  I am writing an
application that requires a couple new properties on the contact.

Peace,
Scott
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I package shared libs only into apk

2009-10-12 Thread tica

Thx.But I'm not using the NDK, I build it in Android's src codes tree.

On Oct 13, 1:43 am, "Roman ( T-Mobile USA)"  wrote:
> Which version of the NDK are you using? I am using 1.5 and the
> Android.mk does not look as complicated.
>
> By the way, try to ask your question in the Android-NDK instead of the
> developer group!
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Oct 12, 1:19 am, tica  wrote:
>
> > From the SimpleJNI's sample code, the Android.mk is like this:
> > # This makefile shows how to build a shared library and an activity
> > that
> > # bundles the shared library and calls it using JNI.
>
> > TOP_LOCAL_PATH:= $(call my-dir)
>
> > # Build activity
>
> > LOCAL_PATH:= $(TOP_LOCAL_PATH)
> > include $(CLEAR_VARS)
>
> > LOCAL_MODULE_TAGS := samples
> > LOCAL_SRC_FILES := $(call all-subdir-java-files)
> > LOCAL_PACKAGE_NAME := SimpleJNI
> >LOCAL_JNI_SHARED_LIBRARIES:= libsimplejni
> > include $(BUILD_PACKAGE)
>
> > # 
> > # Also build all of the sub-targets under this one: the shared
> > library.
> > include $(call all-makefiles-under,$(LOCAL_PATH))
>
> > And I know add the "LOCAL_JNI_SHARED_LIBRARIES" variable can tell the
> > build system to add libsimplejni.so into the apk file , but the
> > libsimplejni.so file will still copy into /system/lib/ directory. How
> > can I make the libraries only build into apk ,and it will not copy to /
> > system/lib directory in the Android build system ?Cause I do not need
> > it anymore if the libs were already included in the apk.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Stripping Log._ out of production

2009-10-12 Thread stanlick

Would the Application class be a good place for this?

The android.app.Application class

The android.app.Application is a base class for those who need to
maintain global application state. It can be accessed via
getApplication() from any Activity or Service. It has a couple of life-
cycle methods and will be instantiated by Android automatically if
your register it in AndroidManifest.xml.

Scott

On Oct 12, 6:59 pm, jotobjects  wrote:
> Config.DEBUG is always false for the downloaded SDK so now I get it
> that this the value for the whole platform build (duh).
>
> Config.DEBUG is not deprecated contrary to post from Dianne, although
> other fields in Config are deprecated starting in 1.6.  For some
> reason it seems like you have read the source to find out what is
> deprecated since it is not shown in the API docs.
>
> On Oct 2, 1:16 pm, jotobjects  wrote:
>
> > I think you mean that each app should define some internal constant
> > and recompile for release (and not use the Config constants) ? Is that
> > right?
>
> > Is there a conventional property or mechanism that the Log class uses
> > for isLoggable() method?
>
> > The 1.6 release notes (API diff) says that all the Config constants
> > EXCEPT DEBUG are deprecated.  The 1.6 javadoc does not indicate the
> > deprecation at all - so not clear how a developer would notice the
> > deprecation.
>
> > On Oct 2, 12:35 pm, fadden  wrote:
>
> > > On Oct 2, 12:14 pm,jotobjects wrote:
>
> > > > In 1.6 it is deprecated?
>
> > > > What is the correct way to detect debug mode?
>
> > > This is expected to be used as a compile-time constant within the app
> > > framework.  You can and should build your app for "debug" or "release"
> > > as you see fit, independent of the state of the platform.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Debug on a remote emulator

2009-10-12 Thread Mark Murphy

tomei.ninge...@gmail.com wrote:
> Hello,
> 
> I am running Eclipse on Win32 and my Android emulator on Linux.
> 
> Is there a way to use Win32 eclipse to debug code on the emulator that
> runs on Linux?

Reputedly, MOTODEV Studio for Android has some sort of IP-based
debugging that you might be able to use for that.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Training: http://commonsware.com/training.html

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Check for internet connection

2009-10-12 Thread stanlick

Thanks Roman --

However, when I effectively have a smoking hole where my net card was,
I would expect the emulator to *not* have data connectivity.  I even
rebooted the AVD after switching off wireless thinking maybe the state
was cached at start.

Peace,
Scott

On Oct 12, 5:41 pm, "Roman ( T-Mobile USA)"  wrote:
> On the emulator you always have data connectivity. For example with
> enabling the Airplane mode you can still browse the web (which should
> not be the case).
>
> I submitted a bug on this (don't remember the bug number).
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Oct 12, 3:29 pm, stanlick  wrote:
>
> > This code seems to return true unconditionally.  Of course, I suppose
> > it could be the emulator, but here is the deal.  When I switch my wi-
> > fi off and try using the emulator browser, I get the built-in Android
> > 404 page.  However, when my application tests for a net connection
> > using the code below, it returns true.
>
> > public boolean iCanHasDataNowKThxBye() {
> >         ConnectivityManager connMgr=(ConnectivityManager)
> > getSystemService(Context.CONNECTIVITY_SERVICE);
> >         NetworkInfo info=connMgr.getActiveNetworkInfo();
>
> >         return(info!=null && info.isConnected());
>
> > }
>
> > Scott
>
> > On Aug 21, 6:29 am, Mark Murphy  wrote:
>
> > > Guru wrote:
> > > > /**
> > > >      * Checks whether the device is able to connect to the network
> > > >      * @param context
> > > >      * @return
> > > >      */
> > > >     public static boolean isNetworkAvailable(Context context) {
>
> > > >         ConnectivityManager connectivity = (ConnectivityManager) context
> > > >                 .getSystemService(Context.CONNECTIVITY_SERVICE);
> > > >         if (connectivity == null) {
> > > >             Log.w("tag", "couldn't get connectivity manager");
>
> > > >         } else {
> > > >             NetworkInfo[] info = connectivity.getAllNetworkInfo();
>
> > > >             if (info != null) {
>
> > > >                 for (int i = 0; i < info.length; i++) {
>
> > > >                     if (info[i].getState() == 
> > > > NetworkInfo.State.CONNECTED) {
>
> > > >                         return true;
>
> > > >                     }
>
> > > >                 }
>
> > > >             }
> > > >         }
> > > >         return false;
> > > >     }
>
> > > I have been using:
>
> > > ConnectivityManager
> > > connMgr=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
> > > NetworkInfo info=connMgr.getActiveNetworkInfo();
>
> > > return(info!=null && info.isConnected());
>
> > > Are there scenarios where a NetworkInfo other than
> > > getActiveNetworkInfo() might be connected?
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Debug on a remote emulator

2009-10-12 Thread tomei.ninge...@gmail.com

Hello,

I am running Eclipse on Win32 and my Android emulator on Linux.

Is there a way to use Win32 eclipse to debug code on the emulator that
runs on Linux?

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Function inlining

2009-10-12 Thread fadden

On Oct 7, 11:28 am, Viktor Linder  wrote:
> On a related note, has anyone used a preprocessor of some sort and
> managed to integrate it with Eclipse?

Try ProGuard, proguard.sourceforge.net.

There are a couple of optimizations that don't interact well with the
Dalvik bytecode verifier; those will be fixed in a future release.  In
the mean time you can disable them from the ProGuard config.  (I don't
have a link to the article(s) handy; if you encounter problems you can
google for it.)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: end dialer activity

2009-10-12 Thread Mark Murphy

shahzad ahmad wrote:
> No yet as finish() is used only to stop current running activity not
> the dialer activity :-(

You cannot stop the dialer activity. It is not your activity to stop.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Training: http://commonsware.com/training.html

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Stripping Log._ out of production

2009-10-12 Thread jotobjects

Config.DEBUG is always false for the downloaded SDK so now I get it
that this the value for the whole platform build (duh).

Config.DEBUG is not deprecated contrary to post from Dianne, although
other fields in Config are deprecated starting in 1.6.  For some
reason it seems like you have read the source to find out what is
deprecated since it is not shown in the API docs.

On Oct 2, 1:16 pm, jotobjects  wrote:
> I think you mean that each app should define some internal constant
> and recompile for release (and not use the Config constants) ? Is that
> right?
>
> Is there a conventional property or mechanism that the Log class uses
> for isLoggable() method?
>
> The 1.6 release notes (API diff) says that all the Config constants
> EXCEPT DEBUG are deprecated.  The 1.6 javadoc does not indicate the
> deprecation at all - so not clear how a developer would notice the
> deprecation.
>
> On Oct 2, 12:35 pm, fadden  wrote:
>
> > On Oct 2, 12:14 pm,jotobjects wrote:
>
> > > In 1.6 it is deprecated?
>
> > > What is the correct way to detect debug mode?
>
> > This is expected to be used as a compile-time constant within the app
> > framework.  You can and should build your app for "debug" or "release"
> > as you see fit, independent of the state of the platform.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: end dialer activity

2009-10-12 Thread shahzad ahmad

No yet as finish() is used only to stop current running activity not
the dialer activity :-(

On 10/13/09, midoub  wrote:
>
> hi shaz,
> Did you find solution for your problem? if yes, could you please share
> the solution with us. I have the same issue and I don't have any idea
> to solve it.
> Regards,
>
>
> On Oct 12, 3:53 am, shahzad ahmad  wrote:
>> Hi,
>> I have started dialer activity with code
>>
>> Intent myIntent = new Intent(Intent.ACTION_CALL,
>> Uri.parse(createTelUrl("1234567")));
>> startActivityForResult(myIntent);
>>
>> Is there a way to stop the dialer activity from same code.? Logically it
>> should be possible as i started it and i should have rights to stop it as
>> well. But i cann't find any help in this regard.
>>
>> Thanks,
>> shaz
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Users have trouble upgrading my app in Android Market - anyone else?

2009-10-12 Thread pawpaw17

I've had more than one user say they have trouble when they "upgrade"
new versions of my app in Android Market. One woman says it takes her
several "days" to successfully do it (I presume that means multiple
attempts spread out over time).

Can this be on my end? I upgrade my database on each rev - basically I
retreive the user data and stick it in the new database that ships
with my app. But I think the complaint is about something different.

Has anyone else received comments about anything similar? I am
concerned people uninstall my app just because of this issue,.

Thanks!

pawpaw17
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problems playing MP3s on real device

2009-10-12 Thread Marco Nelissen

Tested it on a number of phones, including a Hero, and it worked as
expected. Note that there are many different versions of the Hero
being sold though, so the problem you are seeing could be specific to
the particular build on the phones you tried.


On Mon, Oct 12, 2009 at 3:33 PM, Marco Nelissen  wrote:
> I suspect this might be a bug in the opencore implementation for the Hero.
>
>
>
> On Mon, Oct 12, 2009 at 10:32 AM, Adrian  wrote:
>>
>> Hello,
>>
>> I'm desperately trying to get my soundboard application to work. I
>> have a GridView consisting of Buttons, which have an OnClickListener
>> starting the sound file associated with the button. The sound files
>> are stored as MP3 (64 kbit/s, LAME encoded) audio files in the res/raw
>> folder and are referenced using the R class.
>>
>> The following problem only occurs when running the app on a real
>> device, however, on the emulator it works perfectly. I have tried two
>> different HTC Hero so far.
>>
>> I have a mysterious problem, that everytime I press a button to play a
>> specific sound, ALL sounds in the res/raw folder are played in the
>> order they are listed there. My current code to play a sound looks
>> like this:
>>
>> if (player != null) {
>>        player.stop();
>>        player.release();
>> }
>>
>> player = MediaPlayer.create(this, resId);
>>
>> if (player != null) {
>>        player.start();
>> }
>>
>> As you can see I use a "singleton" MediaPlayer to play the files. I
>> have also tried using a new separate MediaPlayer instance for each
>> sound file, with the same result. Additionally, I have tried playing
>> the sound file in a separate thread with the result, that only the
>> first time all sound files are played. After that, the buttons work as
>> intended.
>>
>> You can take a look at the source code on the Google Code project
>> site: http://code.google.com/p/zappenduster-soundboard/
>>
>> Thanks for your help!
>> Adrian
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HTTP GET and ProgressDialog

2009-10-12 Thread Lee Jarvis

Ok so I updated the code again, and I guess it pretty much works.
Would any of this be discouraged? Or would there be a better way of
doing this?

http://pastie.org/652258

Regards,
Lee
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Retrieving the saved state of the Custom View in the constructor.

2009-10-12 Thread B++

I understand that making a network request inside the view is not
recommended, but I need to treat the Custom View as a widget which
hides the implementation details. I want to handle everything (even
the configuration changes) in the view itself.

Thanks

B.

On Oct 12, 4:08 pm, Mark Murphy  wrote:
> B++ wrote:
> > The "View" instance currently provides a way to retrieve the saved
> > state using the methods below, but there doesn't seem a way to
> > retrieve the view's saved state in the constructor, or
> > onFinishInflate. The custom view is constructed via XML, so I cannot
> > pass the saved bundle from the Activity to the View's constructor.
>
> > Relevant methods:
> > - protected Parcelable onSaveInstanceState()  and
> > - protected void onRestoreInstanceState(Parcelable state)
>
> > I need this because I make an asynchronous network request in a custom
> > view constructor
>
> Ick.
>
> > and if there is a configuration (orientation)
> > change, the custom view is getting reconstructed, and the request is
> > getting performed again. I want to intercept the second request in the
> > constructor. I can do this in the onRestoreInstanceState, but I need
> > to handle this in the constructor.
>
> > It would be nice if there was a method such as getSavedState so that
> > the decision can be made in a constructor or onFinishInflate instead
> > of waiting for the onRestoreInstanceState trigger.
>
> > Any idea?
>
> Don't do an asynchronous network request from a View. I realize that
> Android isn't necessarily the ideal MVC platform, but I really recommend
> you separate your concerns more than that.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How does Log.isLoggable() work?

2009-10-12 Thread jotobjects

Just playing around with Log.isLoggable(tag, level) method.

Log.d(LOGTAG, "--- debug log");
Log.i(LOGTAG, "--- info log");
if (Log.isLoggable(LOGTAG, Log.INFO)) Log.i(LOGTAG, "---
isLoggable info log");
if (Log.isLoggable(LOGTAG, Log.DEBUG)) Log.d(LOGTAG, "---
isLoggable debug log");

These all send output to the log except the last.

Following the instructions in the API for Log.isLoggable I used adb to
set the value of LOGTAG to DEBUG as follows -

# setprop com.foo.bar DEBUG

where "com.foo.bar" is the value of LOGTAG. But the 4th Log still does
not print.  I tried stopping and restarting the emulator and removing
and reinstalling the app and setting the property before the app
started. No luck so far.

I was assuming the mechanism would allow me to turn up the logging
verbosity on a running app, but so far I don't get isLoggable to do
anything at all.  Any suggestions?

Related questions:
- What API call will get the values that you see with "adb shell
getprop"?
- isLoggable suggests creating a /data/local.prop file.  Is the idea
to copy that file onto the device or is there another way?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Alarm is canceled if app is stopped

2009-10-12 Thread Dianne Hackborn
*sigh* I knew I shouldn't have made that API public. :}

On Mon, Oct 12, 2009 at 4:09 PM, Lazarus 101  wrote:

>
> Thanks Dianne for the quick answer.
>
> Actually TasKiller is not automatically killing apps, but it has a
> widget that allows users to kill (almost) all apps with one click.
> Most of the Android users that I know are using something similar to
> TasKiller so this is a tricky problem, users will blame my app for not
> doing what it says it does.
> I saw there is a PACKAGE_RESTARTED broadcast but obviously the
> restarted package does not receive the notification so there's not
> much I can do to "fix" this problem...
>
> Having applications that can affect the functionality of every other
> apps installed on the system is not such a good idea IMHO. A Task
> Manager is needed but the user should be clearly informed that the
> apps he choses to kill are not working anymore because that's exactly
> what he wanted. Also the permission is called "restart other
> application" it should be "kill other applications", that's why I
> thought alarms are not affected by this and that services are getting
> restarted (I saw services being restarted after crashes or after being
> killed due to lack of memory so I though it's the same behaviour when
> calling ActivityManager.restartPackage).
>
>
> On Oct 12, 11:22 pm, Dianne Hackborn  wrote:
> > That is intentional.  Stopping an application is there for the user to
> stop
> > everything associated with it -- processes, alarms, services,
> notifications,
> > etc.  They will not be restarted until someone explicitly does so
> (typically
> > this would be the user re-launching the app and having it do the
> appropriate
> > thing).
> >
> > It sounds like TasKiller is abusing this API.  The API is there for the
> user
> > to explicitly stop an app from running without going to the most extreme
> > measure of uninstalling the app.  Trying to use it to automatically stop
> > things behind the user's back seems...  questionable, and probably not
> what
> > the user actually wants.
> >
> >
> >
> > On Mon, Oct 12, 2009 at 1:00 PM, Lazarus 101 
> wrote:
> >
> > > I have an app that does some polling every 2 hours. I set a repeating
> > > alarm that starts a service but I have noticed that if I use some task
> > > manager (e.g. TasKiller) to kill my app then the polling will not be
> > > performed from that moment on. I know this because I store the time of
> > > the last poll, I have also checked the server logs and there are no
> > > requests received from the client after I force close my app.
> > > Is this the way alarms work or should I look somewhere else for a
> > > crash or smth? because if alarms really get canceled then how should
> > > we implement the polling?
> >
> > > I'm also interested in what happens with a running service  if it gets
> > > killed from another app (I assume all task managers are using
> > > ActivityManager.restartPackage() to kill other apps), does it get
> > > restarted?
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Emulator: LogCat Errors for Donut 1.6 Release

2009-10-12 Thread David Turner
It's not necessarily an error. Surface FLinger is trying to access several
types of GPU before fall-backing to its software OpenGL ES implementation.The
messages correspond to this probing, nothing more.

On Mon, Oct 12, 2009 at 2:56 PM, TjerkW  wrote:

>
> Sorry but the
>
> 10-12 23:42:28.195: ERROR/GLLogger(709): couldn't load 
> library (Cannot find library)
>
> error message seems important.
>
> In my application i try to start open gl but i get the following
> errors:
>
> 10-12 23:42:28.005: DEBUG/AirAttackActivity(709): Launching Game
> Activity
> 10-12 23:42:28.195: ERROR/GLLogger(709): couldn't load 
> library (Cannot find library)
> 10-12 23:42:28.225: DEBUG/SpaceWarsActivity(709): onStart
> 10-12 23:42:28.315: DEBUG/dalvikvm(709): GC freed 1201 objects / 71768
> bytes in 81ms
> 10-12 23:42:28.345: DEBUG/SpaceWarsActivity(709): onResume
> 10-12 23:42:28.405: DEBUG/GLGame(709): Waiting for GL Surface to be
> created...
> 10-12 23:42:28.546: DEBUG/SurfaceFlinger(568): pid 709 requesting gpu
> surface (current owner = -1)
> 10-12 23:42:28.546: ERROR/MemoryHeapBase(568): error opening /dev/
> pmem_gpu0: No such file or directory
> 10-12 23:42:28.546: ERROR/MemoryHeapBase(568): error opening /dev/
> pmem_gpu1: No such file or directory
> 10-12 23:42:28.546: ERROR/MemoryHeapBase(568): error opening /dev/
> hw3d: No such file or directory
> 10-12 23:42:28.557: DEBUG/SurfaceFlinger(568): pid 709 requesting gpu
> surface (current owner = -1)
> 10-12 23:42:28.557: ERROR/MemoryHeapBase(568): error opening /dev/
> pmem_gpu0: No such file or directory
> 10-12 23:42:28.557: ERROR/MemoryHeapBase(568): error opening /dev/
> pmem_gpu1: No such file or directory
> 10-12 23:42:28.557: ERROR/MemoryHeapBase(568): error opening /dev/
> hw3d: No such file or directory
> 10-12 23:42:28.596: DEBUG/GLGame(709): GL Surface Created
> 10-12 23:42:28.606: DEBUG/GL(709): Loading texture
> 10-12 23:42:28.646: DEBUG/GL(709): Texture name: 0
> 10-12 23:42:28.646: ERROR/GL(709): Texture Load GLError: 2025968
> 10-12 23:42:28.646: DEBUG/GL(709): textImage2D
> 10-12 23:42:28.666: ERROR/GL(709): Texture Load GLError: 2025968
> 10-12 23:42:28.666: ERROR/GL(709): Texture Load GLError: 2025968
> 10-12 23:42:28.666: DEBUG/GL(709): Adding texture info: 60x60
> 10-12 23:42:28.706: DEBUG/GL(709): Loading texture
>
>
> On Sep 16, 8:14 am, Romain Guy  wrote:
> > You can ignore these.
> >
> >
> >
> >
> >
> > On Tue, Sep 15, 2009 at 9:30 PM, kk  wrote:
> >
> > > Hi All,
> >
> > > The following errors occurred during startup of Android 1.6 SDK
> > > Release Emulator:
> >
> > > What do the following errors mean?
> >
> > > Can these errors be ignored?
> >
> > > Emulator Details:
> >
> > > Target: Google APIs (API Level 4)
> > > Skin: HVGA
> > > SDCARD: 64MB  image size
> >
> > > Errors:
> >
> > > 09-16 13:16:00.072: ERROR/vold(550): Error opening switch name path '/
> > > sys/class/switch/test2' (No such file or directory)
> > > 09-16 13:16:00.072: ERROR/vold(550): Error bootstrapping switch '/sys/
> > > class/switch/test2' (No such file or directory)
> > > 09-16 13:16:00.072: ERROR/vold(550): Error opening switch name path '/
> > > sys/class/switch/test' (No such file or directory)
> > > 09-16 13:16:00.072: ERROR/vold(550): Error bootstrapping switch '/sys/
> > > class/switch/test' (No such file or directory)
> > > 09-16 13:16:54.123: ERROR/MemoryHeapBase(582): error opening /dev/
> > > pmem: No such file or directory
> > > 09-16 13:16:54.133: ERROR/SurfaceFlinger(582): Couldn't open /sys/
> > > power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
> > > 09-16 13:16:54.312: ERROR/libEGL(582): couldn't load 
> > > library (Cannot load library: load_library[984]: Library 'libhgl.so'
> > > not found)
> > > 09-16 13:16:56.602: ERROR/libEGL(598): couldn't load 
> > > library (Cannot load library: load_library[984]: Library 'libhgl.so'
> > > not found)
> > > 09-16 13:17:17.392: ERROR/BatteryService(582): Could not open '/sys/
> > > class/power_supply/usb/online'
> > > 09-16 13:17:17.392: ERROR/BatteryService(582): Could not open '/sys/
> > > class/power_supply/battery/batt_vol'
> > > 09-16 13:17:17.401: ERROR/BatteryService(582): Could not open '/sys/
> > > class/power_supply/battery/batt_temp'
> > > 09-16 13:17:19.242: ERROR/EventHub(582): could not get driver version
> > > for /dev/input/mouse0, Not a typewriter
> > > 09-16 13:17:19.271: ERROR/EventHub(582): could not get driver version
> > > for /dev/input/mice, Not a typewriter
> > > 09-16 13:17:19.852: ERROR/System(582): Failure starting core service
> > > 09-16 13:17:19.852: ERROR/System(582): java.lang.SecurityException
> > > 09-16 13:17:19.852: ERROR/System(582): at
> > > android.os.BinderProxy.transact(Native Method)
> > > 09-16 13:17:19.852: ERROR/System(582): at
> > > android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:
> > > 146)
> > > 09-16 13:17:19.852: ERROR/System(582): at
> > > android.os.ServiceManager.addService(ServiceManager.java:72)
> > > 09-16 13:17:19

[android-developers] Re: Connectivity Manager - CONNECTIVITY_CHANGE

2009-10-12 Thread Ryan Berti

Seems that this would work, but I am trying to get around the phone
waking up every time it receives a state changed event. Can this be
done, ie create a user defined event that I can listen for? Thanks for
the response.

-Ryan

On Oct 8, 9:39 pm, "Roman ( T-Mobile USA)"  wrote:
> Try to implement the following
>
> + use the NetworkInfo on your connection to find out about your
> current connection (whether it's Wifi or Mobile)
> + implement a broadcast receiver and listen to
> NETWORK_STATE_CHANGED_ACTION events
>
> When you receive the network state change event and you have a valid
> IP address, send an intent to your application.
>
> The function above should be implemented as a service.
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Oct 8, 12:13 am,RyanBerti wrote:
>
> > Hello,
>
> > I'm very new to the boards, and I have a question about the
> > connectivity manager but didn't see it discussed in my searches. I am
> > doing research on the possibility of producing a background
> > application that is woken up when an ad-hoc wifi network is in range.
> > I understand how to create a network of this type, but my problem lies
> > in the acknowledgment of a network of this type without busy waiting.
>
> > I have recently discovered that applications have to ability to be
> > woken up by "broadcast intents," where the app is declared as a
> > received in the manifest file. The one that interests me is the
> > ConnectiviyManager.CONNECTIVITY_ACTION. From what I understand, this
> > event is broadcasts when the device switches networks. I am wondering
> > if this functionality can be modified so that the event is sent out
> > when new wireless (preferably ad-hoc) networks are in range.
>
> > It seems like I could accomplish this by having my phone connect to
> > these type of networks automatically, but I'm not sure how to go about
> > this either. I am very interested in what everyone has to say. Thanks!
>
> > -RyanBerti
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Retrieving the saved state of the Custom View in the constructor.

2009-10-12 Thread Mark Murphy

B++ wrote:
> The "View" instance currently provides a way to retrieve the saved
> state using the methods below, but there doesn't seem a way to
> retrieve the view's saved state in the constructor, or
> onFinishInflate. The custom view is constructed via XML, so I cannot
> pass the saved bundle from the Activity to the View's constructor.
> 
> Relevant methods:
> - protected Parcelable onSaveInstanceState()  and
> - protected void onRestoreInstanceState(Parcelable state)
> 
> I need this because I make an asynchronous network request in a custom
> view constructor

Ick.

> and if there is a configuration (orientation)
> change, the custom view is getting reconstructed, and the request is
> getting performed again. I want to intercept the second request in the
> constructor. I can do this in the onRestoreInstanceState, but I need
> to handle this in the constructor.
> 
> It would be nice if there was a method such as getSavedState so that
> the decision can be made in a constructor or onFinishInflate instead
> of waiting for the onRestoreInstanceState trigger.
>
> Any idea?

Don't do an asynchronous network request from a View. I realize that
Android isn't necessarily the ideal MVC platform, but I really recommend
you separate your concerns more than that.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 1.0 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Alarm is canceled if app is stopped

2009-10-12 Thread Lazarus 101

Thanks Dianne for the quick answer.

Actually TasKiller is not automatically killing apps, but it has a
widget that allows users to kill (almost) all apps with one click.
Most of the Android users that I know are using something similar to
TasKiller so this is a tricky problem, users will blame my app for not
doing what it says it does.
I saw there is a PACKAGE_RESTARTED broadcast but obviously the
restarted package does not receive the notification so there's not
much I can do to "fix" this problem...

Having applications that can affect the functionality of every other
apps installed on the system is not such a good idea IMHO. A Task
Manager is needed but the user should be clearly informed that the
apps he choses to kill are not working anymore because that's exactly
what he wanted. Also the permission is called "restart other
application" it should be "kill other applications", that's why I
thought alarms are not affected by this and that services are getting
restarted (I saw services being restarted after crashes or after being
killed due to lack of memory so I though it's the same behaviour when
calling ActivityManager.restartPackage).


On Oct 12, 11:22 pm, Dianne Hackborn  wrote:
> That is intentional.  Stopping an application is there for the user to stop
> everything associated with it -- processes, alarms, services, notifications,
> etc.  They will not be restarted until someone explicitly does so (typically
> this would be the user re-launching the app and having it do the appropriate
> thing).
>
> It sounds like TasKiller is abusing this API.  The API is there for the user
> to explicitly stop an app from running without going to the most extreme
> measure of uninstalling the app.  Trying to use it to automatically stop
> things behind the user's back seems...  questionable, and probably not what
> the user actually wants.
>
>
>
> On Mon, Oct 12, 2009 at 1:00 PM, Lazarus 101  wrote:
>
> > I have an app that does some polling every 2 hours. I set a repeating
> > alarm that starts a service but I have noticed that if I use some task
> > manager (e.g. TasKiller) to kill my app then the polling will not be
> > performed from that moment on. I know this because I store the time of
> > the last poll, I have also checked the server logs and there are no
> > requests received from the client after I force close my app.
> > Is this the way alarms work or should I look somewhere else for a
> > crash or smth? because if alarms really get canceled then how should
> > we implement the polling?
>
> > I'm also interested in what happens with a running service  if it gets
> > killed from another app (I assume all task managers are using
> > ActivityManager.restartPackage() to kill other apps), does it get
> > restarted?
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AVD for Motorola Cliq?

2009-10-12 Thread stanlick

How do I get the Home button to go Home on the MB200 AVD?

On Sep 16, 10:32 am, Steve  wrote:
> On Sep 11, 2:27 pm, Carl Whalley  wrote:
>
> > Ok, sorry for posting before I read the link - the DPAD does adjust as
> > you'd expect and it is explained further at the page Anna pointed to..
>
> I'm not seeing this.  What I see on the Cliq emulator is that when
> you've got the phone in landscape, the d-pad arrows are not adjusting
> to orientation the way they do on the 1.5 emulator (or on a G1).
> (They also don't work when the emulator is in portrait, but of course
> the user won't see the d-pad then.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Retrieving the saved state of the Custom View in the constructor.

2009-10-12 Thread B++

The "View" instance currently provides a way to retrieve the saved
state using the methods below, but there doesn't seem a way to
retrieve the view's saved state in the constructor, or
onFinishInflate. The custom view is constructed via XML, so I cannot
pass the saved bundle from the Activity to the View's constructor.

Relevant methods:
- protected Parcelable onSaveInstanceState()  and
- protected void onRestoreInstanceState(Parcelable state)

I need this because I make an asynchronous network request in a custom
view constructor, and if there is a configuration (orientation)
change, the custom view is getting reconstructed, and the request is
getting performed again. I want to intercept the second request in the
constructor. I can do this in the onRestoreInstanceState, but I need
to handle this in the constructor.

It would be nice if there was a method such as getSavedState so that
the decision can be made in a constructor or onFinishInflate instead
of waiting for the onRestoreInstanceState trigger.

Any idea?

Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HTTP GET and ProgressDialog

2009-10-12 Thread Lee Jarvis

Sorry, I realized in that above example I passed to arguments to
execute(), not that it makes any difference to my issue.

On Oct 12, 11:58 pm, Lee Jarvis  wrote:
> Ok so I kind of implemented this, but it forces close when I click the
> button.. What am I doing wrong?
>
> 
> package net.gullycorp.example.webtest;
>
> import java.io.IOException;
>
> import org.apache.http.client.ClientProtocolException;
>
> import android.app.Activity;
> import android.app.AlertDialog;
> import android.content.DialogInterface;
> import android.os.AsyncTask;
> import android.os.Bundle;
> import android.view.View;
> import android.view.View.OnClickListener;
> import android.widget.Button;
> import android.widget.EditText;
> import android.widget.TextView;
> import android.widget.Toast;
>
> public class WebTest extends Activity implements OnClickListener {
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         Button clickme = (Button) findViewById(R.id.clickme);
>         clickme.setOnClickListener(this);
>
>     }
>
>     public void onClick(View view) {
>         int id = view.getId();
>
>         switch(id) {
>         case R.id.clickme:
>                 EditText urlText = (EditText) findViewById(R.id.textbox);
>                 String url = urlText.getText().toString();
>                 grabSource(url);
>                 break;
>         }
>     }
>
>     private void grabSource(String url) {
>         new GrabURLTask().execute();
>     }
>
>     private class GrabURLTask extends AsyncTask {
>         protected void onPreExecute() {
>                 Utilities.showToast(WebTest.this, "Loading..", true);
>         }
>
>                 protected Void doInBackground(String... params) {
>                         final Webat client = new Webat();
>                         boolean success = false;
>
>                         try {
>                                 client.getURL(params[0]);
>                                 success = true;
>                         } catch (ClientProtocolException e) {
>                                 Utilities.showToast(WebTest.this, 
> e.getMessage(), true);
>                                 cancel(true);
>                         } catch (IOException e) {
>                                 Utilities.showToast(WebTest.this, 
> e.getMessage(), true);
>                                 cancel(true);
>                         }
>                         return null;
>                 }
>
>                 protected void onPostExecute(Void unused) {
>                         Utilities.showToast(WebTest.this, "Source loaded.", 
> true);
>                 }
>
>     }
>
> }
>
> ===
>
> Apologies for the large paste, I can pastie it if it's preferable?
>
> Thanks,
> Lee
>
> On Oct 11, 11:24 pm, Mark Murphy  wrote:
>
>
>
> > LeeJarviswrote:
> > > Oh, I don't plan on using half of the dialogs and such I'm using in
> > > that test application. I too prefer to write things in an activity
> > > over a dialog. I just want to get this to work.
>
> > > Unfortunately I'm getting confused as hell. I can see how this should
> > > be implemented, but I can't get it to do so. I guess I'll try and find
> > > some examples of using AsyncTask that aren't too complex.
>
> > Yeah, AsyncTask went a bit overboard with the varargs and such, IMHO.
>
> > My EndlessAdapter component has about as trivial of an AsyncTask
> > implementation as you'll find:
>
> >http://github.com/commonsguy/cwac-endless
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > _Android Programming Tutorials_ Version 1.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HTTP GET and ProgressDialog

2009-10-12 Thread Lee Jarvis

Ok so I kind of implemented this, but it forces close when I click the
button.. What am I doing wrong?


package net.gullycorp.example.webtest;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class WebTest extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Button clickme = (Button) findViewById(R.id.clickme);
clickme.setOnClickListener(this);

}

public void onClick(View view) {
int id = view.getId();

switch(id) {
case R.id.clickme:
EditText urlText = (EditText) findViewById(R.id.textbox);
String url = urlText.getText().toString();
grabSource(url);
break;
}
}

private void grabSource(String url) {
new GrabURLTask().execute();
}

private class GrabURLTask extends AsyncTask {
protected void onPreExecute() {
Utilities.showToast(WebTest.this, "Loading..", true);
}

protected Void doInBackground(String... params) {
final Webat client = new Webat();
boolean success = false;

try {
client.getURL(params[0]);
success = true;
} catch (ClientProtocolException e) {
Utilities.showToast(WebTest.this, 
e.getMessage(), true);
cancel(true);
} catch (IOException e) {
Utilities.showToast(WebTest.this, 
e.getMessage(), true);
cancel(true);
}
return null;
}

protected void onPostExecute(Void unused) {
Utilities.showToast(WebTest.this, "Source loaded.", 
true);
}

}

}
===

Apologies for the large paste, I can pastie it if it's preferable?

Thanks,
Lee

On Oct 11, 11:24 pm, Mark Murphy  wrote:
> LeeJarviswrote:
> > Oh, I don't plan on using half of the dialogs and such I'm using in
> > that test application. I too prefer to write things in an activity
> > over a dialog. I just want to get this to work.
>
> > Unfortunately I'm getting confused as hell. I can see how this should
> > be implemented, but I can't get it to do so. I guess I'll try and find
> > some examples of using AsyncTask that aren't too complex.
>
> Yeah, AsyncTask went a bit overboard with the varargs and such, IMHO.
>
> My EndlessAdapter component has about as trivial of an AsyncTask
> implementation as you'll find:
>
> http://github.com/commonsguy/cwac-endless
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sometimes the running emulator is not found from within Eclipse?!

2009-10-12 Thread Diego Torres Milano

+1 (Linux)

On Oct 12, 2:55 am, idoun  wrote:
> I have also same problem after upgrading the plugin to 0.9.3
>
> On Oct 10, 10:31 pm, Mariano Kamp  wrote:
>
> > Hi,
>
> >   when launching my app from within Eclipse, sometimes the running emulator
> > is found and displayed in the launch dialog, sometimes it isn't?! Killing
> > adb, the emulator and Eclipse usually helps ... until it happens again.
>
> >   Any idea why this is? I see this behavior since the launch of Android.
>
> >   I am running on Mac OS X. And it happened on Leopard as well as Snow
> > Leopard.
>
> > Cheers,
> > Mariano
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Permission Denial - APPWIDGET_DELETED and APPWIDGET_DISABLED

2009-10-12 Thread peppertarts

Hi all,
I'm having some difficulties getting the AppWidgetProvider.onDeleted
event to fire when removing my widget from the home screen. I get the
below 'Permission Denial' errors that indicate that the
APPWIDGET_DELETED and APPWIDGET_DISABLED intents aren't being
broadcasted. If anyone has any ideas what could be causing this I'd be
very grateful.

10-12 22:14:12.013: WARN/ActivityManager(568): Permission Denial:
broadcasting Intent { act=android.appwidget.action.APPWIDGET_DELETED
cmp=uk.strapp.android.Test/.MyWidget (has extras) } from android
(pid=616, uid=10001) requires null due to receiver
uk.strapp.android.Test/uk.strapp.android.Three.MyWidget

10-12 22:34:03.067: WARN/ActivityManager(568): Permission Denial:
broadcasting Intent { act=android.appwidget.action.APPWIDGET_DISABLED
cmp=uk.strapp.android.Test/.MyWidget } from android (pid=618,
uid=10001) requires null due to receiver uk.strapp.android.Test/
uk.strapp.android.Three.MyWidget

Thanks,
Peter.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Autogrow ListView is not working

2009-10-12 Thread droidin.net

Nevermind... Basically I should not add items to the internal list
directly but instead, use ArrayAdapter#add(Object) method. Thanks to
Mark Murphy for pointing that out

On Oct 12, 1:59 pm, "droidin.net"  wrote:
> I look at some posts from the past and it seems that if I add items to
> the ListView adapter it should update itself and user should be able
> to scroll to the newly appended items. Unfortunately it's not what I
> observe. If I append new items to my existing ArrayAdapter I only will
> see updated results if I rerun ListView#setAdapter again. Doing
> nothing, invalidating view etc. doesn't do anything. Here's a snippet:
>
> SearchItemsAdapter a = (SearchItemsAdapter) listview.getAdapter();
> List values = fetchNextSetOfItems();
> a.append(values);
> // unless I do this - I will not see the update, but if I do - I'll
> jump to the top
> listview.setAdapter(a);
>
> Here's append method:
>
> public void append(List values) {
>         this.items.addAll(values);
>
> }
>
> Anything I'm missing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Check for internet connection

2009-10-12 Thread Roman ( T-Mobile USA)

On the emulator you always have data connectivity. For example with
enabling the Airplane mode you can still browse the web (which should
not be the case).

I submitted a bug on this (don't remember the bug number).

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Oct 12, 3:29 pm, stanlick  wrote:
> This code seems to return true unconditionally.  Of course, I suppose
> it could be the emulator, but here is the deal.  When I switch my wi-
> fi off and try using the emulator browser, I get the built-in Android
> 404 page.  However, when my application tests for a net connection
> using the code below, it returns true.
>
> public boolean iCanHasDataNowKThxBye() {
>         ConnectivityManager connMgr=(ConnectivityManager)
> getSystemService(Context.CONNECTIVITY_SERVICE);
>         NetworkInfo info=connMgr.getActiveNetworkInfo();
>
>         return(info!=null && info.isConnected());
>
> }
>
> Scott
>
> On Aug 21, 6:29 am, Mark Murphy  wrote:
>
> > Guru wrote:
> > > /**
> > >      * Checks whether the device is able to connect to the network
> > >      * @param context
> > >      * @return
> > >      */
> > >     public static boolean isNetworkAvailable(Context context) {
>
> > >         ConnectivityManager connectivity = (ConnectivityManager) context
> > >                 .getSystemService(Context.CONNECTIVITY_SERVICE);
> > >         if (connectivity == null) {
> > >             Log.w("tag", "couldn't get connectivity manager");
>
> > >         } else {
> > >             NetworkInfo[] info = connectivity.getAllNetworkInfo();
>
> > >             if (info != null) {
>
> > >                 for (int i = 0; i < info.length; i++) {
>
> > >                     if (info[i].getState() == 
> > > NetworkInfo.State.CONNECTED) {
>
> > >                         return true;
>
> > >                     }
>
> > >                 }
>
> > >             }
> > >         }
> > >         return false;
> > >     }
>
> > I have been using:
>
> > ConnectivityManager
> > connMgr=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
> > NetworkInfo info=connMgr.getActiveNetworkInfo();
>
> > return(info!=null && info.isConnected());
>
> > Are there scenarios where a NetworkInfo other than
> > getActiveNetworkInfo() might be connected?
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problems playing MP3s on real device

2009-10-12 Thread Marco Nelissen

I suspect this might be a bug in the opencore implementation for the Hero.



On Mon, Oct 12, 2009 at 10:32 AM, Adrian  wrote:
>
> Hello,
>
> I'm desperately trying to get my soundboard application to work. I
> have a GridView consisting of Buttons, which have an OnClickListener
> starting the sound file associated with the button. The sound files
> are stored as MP3 (64 kbit/s, LAME encoded) audio files in the res/raw
> folder and are referenced using the R class.
>
> The following problem only occurs when running the app on a real
> device, however, on the emulator it works perfectly. I have tried two
> different HTC Hero so far.
>
> I have a mysterious problem, that everytime I press a button to play a
> specific sound, ALL sounds in the res/raw folder are played in the
> order they are listed there. My current code to play a sound looks
> like this:
>
> if (player != null) {
>        player.stop();
>        player.release();
> }
>
> player = MediaPlayer.create(this, resId);
>
> if (player != null) {
>        player.start();
> }
>
> As you can see I use a "singleton" MediaPlayer to play the files. I
> have also tried using a new separate MediaPlayer instance for each
> sound file, with the same result. Additionally, I have tried playing
> the sound file in a separate thread with the result, that only the
> first time all sound files are played. After that, the buttons work as
> intended.
>
> You can take a look at the source code on the Google Code project
> site: http://code.google.com/p/zappenduster-soundboard/
>
> Thanks for your help!
> Adrian
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Check for internet connection

2009-10-12 Thread stanlick

This code seems to return true unconditionally.  Of course, I suppose
it could be the emulator, but here is the deal.  When I switch my wi-
fi off and try using the emulator browser, I get the built-in Android
404 page.  However, when my application tests for a net connection
using the code below, it returns true.

public boolean iCanHasDataNowKThxBye() {
ConnectivityManager connMgr=(ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info=connMgr.getActiveNetworkInfo();

return(info!=null && info.isConnected());

}

Scott

On Aug 21, 6:29 am, Mark Murphy  wrote:
> Guru wrote:
> > /**
> >      * Checks whether the device is able to connect to the network
> >      * @param context
> >      * @return
> >      */
> >     public static boolean isNetworkAvailable(Context context) {
>
> >         ConnectivityManager connectivity = (ConnectivityManager) context
> >                 .getSystemService(Context.CONNECTIVITY_SERVICE);
> >         if (connectivity == null) {
> >             Log.w("tag", "couldn't get connectivity manager");
>
> >         } else {
> >             NetworkInfo[] info = connectivity.getAllNetworkInfo();
>
> >             if (info != null) {
>
> >                 for (int i = 0; i < info.length; i++) {
>
> >                     if (info[i].getState() == NetworkInfo.State.CONNECTED) {
>
> >                         return true;
>
> >                     }
>
> >                 }
>
> >             }
> >         }
> >         return false;
> >     }
>
> I have been using:
>
> ConnectivityManager
> connMgr=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
> NetworkInfo info=connMgr.getActiveNetworkInfo();
>
> return(info!=null && info.isConnected());
>
> Are there scenarios where a NetworkInfo other than
> getActiveNetworkInfo() might be connected?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Custom Object Serialization in Android?

2009-10-12 Thread dsukhram

I am writing an android client app which sends a Hashtable to a remote
servlet and recieves an ArrayList consisting of a custom Object which
is serializable.  This ran fine when I was just receiving the
ArrayList from a java console app. So I know my objects are being
serialized and deserialized properly. But when I port the same client
code over to android I get an error when trying to read the ArrayList
of my objects that is sent back from the servlet.

Is there any differences in the way Android does serialization? I
can't seem to find any documentation that says it does. The error I
receive is:

java.lang.IndexOutOfBoundsException: Invalid location

   at java.util.ArrayList.get(ArrayList.java:350)

 My Android Client app is as
follows=

public class TTCPointService  {
private Logger logger;
private FileHandler handler;

public TTCPointService(){

try
{
logger = 
Logger.getLogger(TTCPointService.class.getName());
handler = new FileHandler("ttcservice.log");
handler.setFormatter(new SimpleFormatter());
logger.addHandler(handler);
}
catch(IOException e)
{
logger.log(Level.SEVERE,e.toString());
}
}

public ArrayList ConnectToServlet()
{
ArrayList list = new ArrayList();

Hashtableobj = new Hashtable();
obj.put("lat", "12.00");
obj.put("log", "-23.00");

try
{
URL servletURL = new URL("http://192.168.0.69:8080/
GTFSProcessor/TTCPoints");
HttpURLConnection servletConnection = (HttpURLConnection)
servletURL.openConnection();
servletConnection.setDoOutput(true);
servletConnection.setDoInput(true);
servletConnection.setUseCaches(false);
servletConnection.setDefaultUseCaches(false);

servletConnection.setRequestProperty("Content-
type","application/x-java-serialized-object");
servletConnection.setRequestMethod("POST");
logger.log(Level.INFO,"Connecting to Servlet");

//Send object to servlet
OutputStream os = servletConnection.getOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(os);
oos.writeObject(obj);

oos.flush();
oos.close();
logger.log(Level.INFO,"Hashtable sent to Servlet");

//Read from servlet
InputStream is = servletConnection.getInputStream();
ObjectInputStream ois = new ObjectInputStream(is);


list = (ArrayList)ois.readObject();
logger.log(Level.INFO,"Reading Object from Servlet");

os.close();

}
catch(IOException e)
{
  logger.log(Level.SEVERE,e.toString());
}
catch(ClassNotFoundException e)
{
logger.log(Level.SEVERE,e.toString());
}
return(list);
}


}
=The code that raises the error
is===

ArrayList list = new ArrayList();
TTCPointService service = new TTCPointService();
list = (ArrayList)service.ConnectToServlet();

Toast.makeText(mapView.getContext(), "list contains:
"+list.get(0).getName(), Toast.LENGTH_SHORT).show();

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: People still using ADC2 entries

2009-10-12 Thread CraigsRace

Ah!  That'd explain it.  Thanks.  :)

On Oct 13, 7:41 am, fhucho  wrote:
> Those users have rooted phones and they just somewhere exported the
> downloaded apps.
>
> On Oct 12, 10:26 pm, CraigsRace  wrote:
>
> > I had a look at my server logs, it looks like people are still playing
> > my ADC2 entry (only about 30 people / day).
>
> > The users are spread out from all over the world (LA, NY, London,
> > Spain, France, ...).
>
> > Was there a way that users could keep the ADC2 apps?  I thought they
> > got deleted as soon as the user entered their ratings?
>
> > I don't mind that people are playing my game (I think it's great!).  I
> > just would have liked to keep some of the ADC2 apps too!  :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Point Sprite support

2009-10-12 Thread Scott

All right. Perhaps a silly follow-on question. If the hardware
supports point sprites, but does not support non-power-of-two
textures, then can I support non-power-of-two image dimensions for my
point sprites? I realize I can copy an image into a portion of a
larger sized power-of-two texture, but I don't believe I can blit that
portion of the texture as a point sprite. Can someone please confirm?

Thank you,
Scott.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Default display unit px or dp?

2009-10-12 Thread Markus

Specifying android:minSdkVersion="4" in the android manifest did the
trick.

Thanks,
Markus

On Oct 12, 11:19 pm, Romain Guy  wrote:
> The Java APIs work only with pixels. Your app is probably running in
> compatibility mode.
>
>
>
> On Mon, Oct 12, 2009 at 12:20 PM, Markus  wrote:
>
> > I always thought the default display unit would be pixels.
>
> > But when I run my application on WVGA800 in the emulator the lines are
> > five pixels wide even though I called Paint.setStrokeWidth(3). The
> > same seems to happen with Drawable.setBounds(); the value I provide
> > gets multiplied by 1.5 internally.
>
> > If that's the case, how can I specify pixels instead of dips if I want
> > pixels?
>
> > Can someone clarify this?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Text Synthesis Missing Spanish in setLanguage

2009-10-12 Thread dsurround

I am interfacing with the Text Synthesis engine of 1.6.  I am trying
to set the language to Spanish.  I can set it to English, German,
French and Italian, but Spanish does not come up as an option.

myTts.setLanguage(Locale.SPANISH);  // this does not work
myTts.setLanguage(Locale.GERMAN);  // this works along with ENGLISH,
ITALIAN or FRENCH

Seems like it should be there.  Is that a known bug?  I can set it
through the setting interface, but need to set it programatically.

Please advise.

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Emulator: LogCat Errors for Donut 1.6 Release

2009-10-12 Thread TjerkW

Sorry but the

10-12 23:42:28.195: ERROR/GLLogger(709): couldn't load 
library (Cannot find library)

error message seems important.

In my application i try to start open gl but i get the following
errors:

10-12 23:42:28.005: DEBUG/AirAttackActivity(709): Launching Game
Activity
10-12 23:42:28.195: ERROR/GLLogger(709): couldn't load 
library (Cannot find library)
10-12 23:42:28.225: DEBUG/SpaceWarsActivity(709): onStart
10-12 23:42:28.315: DEBUG/dalvikvm(709): GC freed 1201 objects / 71768
bytes in 81ms
10-12 23:42:28.345: DEBUG/SpaceWarsActivity(709): onResume
10-12 23:42:28.405: DEBUG/GLGame(709): Waiting for GL Surface to be
created...
10-12 23:42:28.546: DEBUG/SurfaceFlinger(568): pid 709 requesting gpu
surface (current owner = -1)
10-12 23:42:28.546: ERROR/MemoryHeapBase(568): error opening /dev/
pmem_gpu0: No such file or directory
10-12 23:42:28.546: ERROR/MemoryHeapBase(568): error opening /dev/
pmem_gpu1: No such file or directory
10-12 23:42:28.546: ERROR/MemoryHeapBase(568): error opening /dev/
hw3d: No such file or directory
10-12 23:42:28.557: DEBUG/SurfaceFlinger(568): pid 709 requesting gpu
surface (current owner = -1)
10-12 23:42:28.557: ERROR/MemoryHeapBase(568): error opening /dev/
pmem_gpu0: No such file or directory
10-12 23:42:28.557: ERROR/MemoryHeapBase(568): error opening /dev/
pmem_gpu1: No such file or directory
10-12 23:42:28.557: ERROR/MemoryHeapBase(568): error opening /dev/
hw3d: No such file or directory
10-12 23:42:28.596: DEBUG/GLGame(709): GL Surface Created
10-12 23:42:28.606: DEBUG/GL(709): Loading texture
10-12 23:42:28.646: DEBUG/GL(709): Texture name: 0
10-12 23:42:28.646: ERROR/GL(709): Texture Load GLError: 2025968
10-12 23:42:28.646: DEBUG/GL(709): textImage2D
10-12 23:42:28.666: ERROR/GL(709): Texture Load GLError: 2025968
10-12 23:42:28.666: ERROR/GL(709): Texture Load GLError: 2025968
10-12 23:42:28.666: DEBUG/GL(709): Adding texture info: 60x60
10-12 23:42:28.706: DEBUG/GL(709): Loading texture


On Sep 16, 8:14 am, Romain Guy  wrote:
> You can ignore these.
>
>
>
>
>
> On Tue, Sep 15, 2009 at 9:30 PM, kk  wrote:
>
> > Hi All,
>
> > The following errors occurred during startup of Android 1.6 SDK
> > Release Emulator:
>
> > What do the following errors mean?
>
> > Can these errors be ignored?
>
> > Emulator Details:
>
> > Target: Google APIs (API Level 4)
> > Skin: HVGA
> > SDCARD: 64MB  image size
>
> > Errors:
>
> > 09-16 13:16:00.072: ERROR/vold(550): Error opening switch name path '/
> > sys/class/switch/test2' (No such file or directory)
> > 09-16 13:16:00.072: ERROR/vold(550): Error bootstrapping switch '/sys/
> > class/switch/test2' (No such file or directory)
> > 09-16 13:16:00.072: ERROR/vold(550): Error opening switch name path '/
> > sys/class/switch/test' (No such file or directory)
> > 09-16 13:16:00.072: ERROR/vold(550): Error bootstrapping switch '/sys/
> > class/switch/test' (No such file or directory)
> > 09-16 13:16:54.123: ERROR/MemoryHeapBase(582): error opening /dev/
> > pmem: No such file or directory
> > 09-16 13:16:54.133: ERROR/SurfaceFlinger(582): Couldn't open /sys/
> > power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
> > 09-16 13:16:54.312: ERROR/libEGL(582): couldn't load 
> > library (Cannot load library: load_library[984]: Library 'libhgl.so'
> > not found)
> > 09-16 13:16:56.602: ERROR/libEGL(598): couldn't load 
> > library (Cannot load library: load_library[984]: Library 'libhgl.so'
> > not found)
> > 09-16 13:17:17.392: ERROR/BatteryService(582): Could not open '/sys/
> > class/power_supply/usb/online'
> > 09-16 13:17:17.392: ERROR/BatteryService(582): Could not open '/sys/
> > class/power_supply/battery/batt_vol'
> > 09-16 13:17:17.401: ERROR/BatteryService(582): Could not open '/sys/
> > class/power_supply/battery/batt_temp'
> > 09-16 13:17:19.242: ERROR/EventHub(582): could not get driver version
> > for /dev/input/mouse0, Not a typewriter
> > 09-16 13:17:19.271: ERROR/EventHub(582): could not get driver version
> > for /dev/input/mice, Not a typewriter
> > 09-16 13:17:19.852: ERROR/System(582): Failure starting core service
> > 09-16 13:17:19.852: ERROR/System(582): java.lang.SecurityException
> > 09-16 13:17:19.852: ERROR/System(582):     at
> > android.os.BinderProxy.transact(Native Method)
> > 09-16 13:17:19.852: ERROR/System(582):     at
> > android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:
> > 146)
> > 09-16 13:17:19.852: ERROR/System(582):     at
> > android.os.ServiceManager.addService(ServiceManager.java:72)
> > 09-16 13:17:19.852: ERROR/System(582):     at
> > com.android.server.ServerThread.run(SystemServer.java:162)
> > 09-16 13:17:19.892: ERROR/AndroidRuntime(582): Crash logging skipped,
> > no checkin service
> > 09-16 13:17:26.013: ERROR/LockPatternKeyguardView(582): Failed to bind
> > to GLS while checking for account
>
> > Thanks,
> > KK
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have tim

[android-developers] Re: Why does getPadding() of NinePatchDrawable throw a NullPointerException?

2009-10-12 Thread Romain Guy

BTW, why are you creating the NinePatchDrawable yourself if you are
creating it from a resource anyway?

On Mon, Oct 12, 2009 at 3:01 PM, Romain Guy  wrote:
> NinePatchDrawable tagBalloon9pDrawable = new NinePatchDrawable(tagBalloon9p);
>
> this creates a NinePatchDrawable with a null padding. That's why you
> get an NPE. You need to specify the padding.
>
> On Mon, Oct 12, 2009 at 10:07 AM, Anders  wrote:
>>
>> I'm trying to use NinePatchDrawables in a LayerDrawable, but for some
>> reason I get a NullPointerException. I've isolated the problem to the
>> getPadding() method; the following code reproduces the problem:
>>
>> Bitmap tagBalloonBitmap = BitmapFactory.decodeResource(getResources(),
>> R.drawable.balloon);
>> NinePatch tagBalloon9p = new NinePatch(tagBalloonBitmap,
>> tagBalloonBitmap.getNinePatchChunk(), null);
>> NinePatchDrawable tagBalloon9pDrawable = new NinePatchDrawable
>> (tagBalloon9p);
>>
>> Rect r = new Rect();
>> tagBalloon9pDrawable.getPadding(r);  <<-- Throws NullPointerException!
>>
>> What am I missing? Do I have to do anything special with the
>> NinePatch? The program seems to work if I use the NinePatch directly
>> (instead of putting it in a LayerDrawable).
>>
>> Any suggestions and help is greatly appreciated.
>>
>> // Anders
>>
>> >>
>>
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Why does getPadding() of NinePatchDrawable throw a NullPointerException?

2009-10-12 Thread Romain Guy

NinePatchDrawable tagBalloon9pDrawable = new NinePatchDrawable(tagBalloon9p);

this creates a NinePatchDrawable with a null padding. That's why you
get an NPE. You need to specify the padding.

On Mon, Oct 12, 2009 at 10:07 AM, Anders  wrote:
>
> I'm trying to use NinePatchDrawables in a LayerDrawable, but for some
> reason I get a NullPointerException. I've isolated the problem to the
> getPadding() method; the following code reproduces the problem:
>
> Bitmap tagBalloonBitmap = BitmapFactory.decodeResource(getResources(),
> R.drawable.balloon);
> NinePatch tagBalloon9p = new NinePatch(tagBalloonBitmap,
> tagBalloonBitmap.getNinePatchChunk(), null);
> NinePatchDrawable tagBalloon9pDrawable = new NinePatchDrawable
> (tagBalloon9p);
>
> Rect r = new Rect();
> tagBalloon9pDrawable.getPadding(r);  <<-- Throws NullPointerException!
>
> What am I missing? Do I have to do anything special with the
> NinePatch? The program seems to work if I use the NinePatch directly
> (instead of putting it in a LayerDrawable).
>
> Any suggestions and help is greatly appreciated.
>
> // Anders
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Why does getPadding() of NinePatchDrawable throw a NullPointerException?

2009-10-12 Thread Anders

I'm trying to use NinePatchDrawables in a LayerDrawable, but for some
reason I get a NullPointerException. I've isolated the problem to the
getPadding() method; the following code reproduces the problem:

Bitmap tagBalloonBitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.balloon);
NinePatch tagBalloon9p = new NinePatch(tagBalloonBitmap,
tagBalloonBitmap.getNinePatchChunk(), null);
NinePatchDrawable tagBalloon9pDrawable = new NinePatchDrawable
(tagBalloon9p);

Rect r = new Rect();
tagBalloon9pDrawable.getPadding(r);  <<-- Throws NullPointerException!

What am I missing? Do I have to do anything special with the
NinePatch? The program seems to work if I use the NinePatch directly
(instead of putting it in a LayerDrawable).

Any suggestions and help is greatly appreciated.

// Anders

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Activity blocks till service completes

2009-10-12 Thread abhi

When I created the thread in the Service itself, it worked. Thank you
very much!

On Oct 12, 12:37 pm, Dianne Hackborn  wrote:
> I don't see you creating a service anywhere in your code service, so I'm not
> sure what you mean about creating one and not having it run...  yes, if you
> don't create one for your service there won't be one for it to run. :}
>
> You need to make a thread in your service -- either in onCreate() or
> onStart() -- in which to do your work, and quit the thread at the
> appropriate time when done.
>
> Or you really may want to consider just using IntentService to let it take
> care of this for you:
>
> http://developer.android.com/reference/android/app/IntentService.html
>
>
>
> On Mon, Oct 12, 2009 at 11:19 AM, abhi  wrote:
>
> > I created a new thread and tried starting the service from there, but
> > the service is not being started from the new thread. When I set a
> > break point in the new thread, it does not hit and there is nothing
> > updated on logcat. Any ideas as to why this is happening?
>
> > From my main class, I am creating a new thread and starting it:
> > Thread th = new Thread(new ServiceStarter());
> > th.start();
>
> > In the ServiceStarter, class I am creating the service and starting
> > it:
>
> > class ServiceStarter extends Activity implements Runnable
> > {
>
> >       �...@override
> >        public void run()
> >        {
> >                try
> >                {
> >                        Intent service = new Intent
> > (ServiceStarter.this,Alarm.class);
> >                        startService(service);
>
> >                }
> >                catch(Exception ex)
> >                {
> >                        ex.printStackTrace();
> >                }
> >        }
> > }
>
> > My service looks like this:
>
> > public class MyService extends Service
> > {
>
> >       �...@override
> >        public IBinder onBind(Intent intent)
> >        {
> >                return null;
> >        }
>
> >       �...@override
> >        public void onCreate()
> >        {
> >                super.onCreate();
> >        }
>
> >       �...@override
> >        public void onStart(Intent intent, int startId)
> >        {
> >                boolean loopVar = true;
>
> >                while(loopVar == true)
> >                {
> >                         //Do stuff
> >                        if(condition)
> >                        {
> >                                //Exit the loop
> >                                loopVar = false;
> >                         }
> >                }
> >        }
> > }
>
> > On Oct 11, 12:54 pm, Dianne Hackborn  wrote:
> > > Services don't take focus input focus -- a service doesn't cause the
> > current
> > > window to lose input focus, nor the foreground activity to be paused.
> > > If you mean the thread of your activity isn't running, then you may just
> > be
> > > doing all your work in the service on the main thread.  Please note that
> > a
> > > service's callbacks (but not necessarily calls through any IBinder
> > interface
> > > it publishes) happen on the main thread.  If you want to run on another
> > > thread, you'll need to make it yourself.
>
> > > On Sat, Oct 10, 2009 at 1:21 AM, abhi  wrote:
>
> > > > Hi,
>
> > > > I am starting a service from an activity. Once the services starts,
> > > > the calling activity loses focus and blocks till the service is
> > > > completed. Why is this and is there a way around it to return the
> > > > control to the calling activity while the service runs in the
> > > > background?
>
> > > > Thanks,
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] JJIL (image processing library)

2009-10-12 Thread benjamin.grant.du

Hi all,
just trying to get the face detect software found here(http://
code.google.com/p/jjil/) not because I want to do face detect but I
need to edit the code for another purpose. However, first I just want
the original code to work so I can understand it. I import face-detect-
android as a new project. I then get the errors that jjil and jjil-
android are required projects and they're missing. therefore I add
them both as external jars to the build path.  The error does not go
away - and I'm confused as to why. Any suggestions?
Ben

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: stopped unexpectedly when run on emulator

2009-10-12 Thread Marco Nelissen

Look at the system log (either using "adb logcat" or with the ddms
perspective in eclipse), and it will tell you exactly where and why it
crashed.


On Mon, Oct 12, 2009 at 7:37 AM, 登辉 黄  wrote:
>
> we modifid snake from sdk samples. there is a running exception
> "stopped unexpectedly". after step debug, i found that the statement
> setContentView(R.layout.snake_layout); and mSnakeView.setTextView
> ((TextView) findViewById(R.id.text));from snake.java file will throw
> exceptions. i think the layout xml file have a some error. but i can't
> find any error in this file.
>
>
> 
> 
>
> http://schemas.android.com/apk/res/
> android"
>        android:layout_width="fill_parent"
>        android:layout_height="fill_parent"
>         xmlns:app="http://schemas.android.com/apk/res/
> com.example.android.snake">
>
>                 android:id="@+id/snake"
>                android:layout_width="fill_parent"
>                android:layout_height="fill_parent"
>                app:tileSize="40"
>                />
>
>                        android:layout_width="fill_parent"
>                android:layout_height="fill_parent" >
>
>                                 android:id="@+id/text"
>                        android:text="@string/snake_layout_text_text"
>                        android:visibility="visible"
>                        android:layout_width="wrap_content"
>                        android:layout_height="wrap_content"
>                        android:layout_centerInParent="true"
>                        android:gravity="center_horizontal"
>                        android:textColor="#ffff"
>                        android:textSize="24sp"/>
>        
> 
>
>
> and snake.java as following:
>
> /*
>  * Copyright (C) 2007 The Android Open Source Project
>  *
>  * Licensed under the Apache License, Version 2.0 (the "License");
>  * you may not use this file except in compliance with the License.
>  * You may obtain a copy of the License at
>  *
>  *      http://www.apache.org/licenses/LICENSE-2.0
>  *
>  * Unless required by applicable law or agreed to in writing, software
>  * distributed under the License is distributed on an "AS IS" BASIS,
>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
>  * See the License for the specific language governing permissions and
>  * limitations under the License.
>  */
>
> package com.example.android.snake;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.util.Log;
> import android.view.Window;
> import android.widget.TextView;
>
> /**
>  * Snake: a simple game that everyone can enjoy.
>  *
>  * This is an implementation of the classic Game "Snake", in which you
> control a
>  * serpent roaming around the garden looking for apples. Be careful,
> though,
>  * because when you catch one, not only will you become longer, but
> you'll move
>  * faster. Running into yourself or the walls will end the game.
>  *
>  */
> public class Snake extends Activity {
>
>    private SnakeView mSnakeView;
>
>    private static String ICICLE_KEY = "snake-view";
>
>    /**
>     * Called when Activity is first created. Turns off the title bar,
> sets up
>     * the content views, and fires up the SnakeView.
>     *
>     */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>
>
>        // No Title bar
>        try{
>                        requestWindowFeature(Window.FEATURE_NO_TITLE);
>        }catch(Exception e){
>                Log.d("SnakeView", "inside onCreate function --
> requestWindowFeature!");
>
>        }
>
>                try {
>                        setContentView(R.layout.snake_layout);
>                } catch (Exception e) {
>                        Log.d("SnakeView", "inside onCreate function -- 
> setContentView!");
>
>                }
>
>                try {
>                        mSnakeView = (SnakeView) findViewById(R.id.snake);
>                } catch (Exception e) {
>                        Log.d("SnakeView", "inside onCreate function --  
> findViewById
> (R.id.snake)!");
>
>                }
>
>                try {
>                        mSnakeView.setTextView((TextView) 
> findViewById(R.id.text));
>                } catch (Exception e) {
>                        Log.d("SnakeView", "inside onCreate function last!");
>
>                }
>
>
>
>
>        if (savedInstanceState == null) {
>            // We were just launched -- set up a new game
>            mSnakeView.setMode(SnakeView.READY);
>        } else {
>            // We are being restored
>            Bundle map = savedInstanceState.getBundle(ICICLE_KEY);
>            if (map == null) {
>                mSnakeView.setMode(SnakeView.PAUSE);
>            }
>        }
>    }
>
>   �...@override
>    protected void onPause() {
>        super.onPause();
>        // Pause the game along with the activity
>        mSnakeView.setMode(SnakeView.PAUSE);
>    }
>
>
>
> }
>
> Pleas

[android-developers] Re: Duplicated permissions in Developer Console

2009-10-12 Thread Jonas Alves

Thanks ;)

On Oct 12, 4:25 pm, James Yum  wrote:
> Hi Jonas,
> It's a bug in the publisher site. The users won't see the duplication.
>
> Cheers,
> James
>
>
>
> On Sun, Oct 11, 2009 at 12:59 PM, Jonas Alves  wrote:
>
> > In my app's page, it shows:
>
> > -
> > This apk requests 4 permissions that users will be warned about
> > 'android.permission.INTERNET'
> > 'android.permission.RECORD_AUDIO'
> > android.permission.INTERNET
> > android.permission.RECORD_AUDIO
> > -
>
> > Is this being show to users when they install the app?
> > What could it be?
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Autogrow ListView is not working

2009-10-12 Thread droidin.net

I look at some posts from the past and it seems that if I add items to
the ListView adapter it should update itself and user should be able
to scroll to the newly appended items. Unfortunately it's not what I
observe. If I append new items to my existing ArrayAdapter I only will
see updated results if I rerun ListView#setAdapter again. Doing
nothing, invalidating view etc. doesn't do anything. Here's a snippet:

SearchItemsAdapter a = (SearchItemsAdapter) listview.getAdapter();
List values = fetchNextSetOfItems();
a.append(values);
// unless I do this - I will not see the update, but if I do - I'll
jump to the top
listview.setAdapter(a);

Here's append method:

public void append(List values) {
this.items.addAll(values);
}

Anything I'm missing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to build android source code and SDK correctly by cygwin?

2009-10-12 Thread Marco Nelissen

Building the entire platform under cygwin is not supported.


On Mon, Oct 12, 2009 at 2:39 AM, chuck  wrote:
>
> Hi all:
>
>    The code was downloaded successfully by cygwin. But when I make
> it, the errors were as follows:
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=1.6
> TARGET_PRODUCT=generic
> TARGET_BUILD_VARIANT=eng
> TARGET_SIMULATOR=
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> HOST_ARCH=x86
> HOST_OS=windows
> HOST_BUILD_TYPE=release
> BUILD_ID=Donut
> 
> build/core/main.mk:359: sdk-only: javac available.
> make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
> target/com
> mon/docs/offline-sdk-timestamp'.  Stop.
>
>
>    I can make the NDK successfully by cygwin and my tool chains are
> listed in the
> following:
> 1. gcc version 3.4.4
> 2. GNU Make 3.81
> 3. java version "1.6.0_16
>
> Dose anyone help me?
> Thanks a lot!!
>
> Chuck
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem using ksoap2 in Android

2009-10-12 Thread claudiotainen

Same problem here:
org.xmlpull.v1.XmlPullParserException: unexpected type
(position:END_DOCUMENT n...@1:0 in java.io.inputstreamrea...@4413ee)

I wonder if you managed to solve it. If not, have you tried checking
the xml soap request that is sent out of your client?
I'm using
androidHttpTransport.debug = true;
System.out.println ( androidHttpTransport.requestDump );
to examine the xml code that is generated bu ksoap2.

The strange thing is that I can successfully invoke other operations
of my ws, while it seems that this request can't even be "assembled"
by the parser.
I've also noticed that changing versione from 1.1 to 1.2 the exception
thrown is different, and it refers to the START_TAG.

More to come (hopefully) in the near future...
Cheers,

Claudio

On 29 Set, 20:49, Gareth  wrote:
> I've written a webservice client which usesksoap2. When I run a test
> program from outside of Android everything works without a problem,
> however when I issue the SOAP requests from within Android then every
> 2nd request seems to fail, throwing the following error (copied from
> the Dalvik Debug Monitor):
> 09-29 18:35:22.116: ERROR/class com.garethwestern.android.SoapTest
> (790): unexpected type (position:END_DOCUMENT n...@1:0 in
> java.io.inputstreamrea...@437e73a8)
>
> When I step through the code from within the IDE everything seems to
> run ok untilksoap2tries to parse the response, at which point the
> aforementioned error is thrown because the HTTP response is empty.
>
> Unfortunately the webservice is over HTTPS so I am unable to easily
> use something like fiddler or wireshark to check the exact responses
> and requests, but as mentioned it works without a problem outside
> Android, and every 2nd request without fail from within.
>
> Does anyone have any suggestions as to how I can debug this further?
>
> Thanks,
>
> Gareth

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] data exchagne on client/server applications

2009-10-12 Thread Robert

Hello list,

this is my first post and I don't hope you get this question like
everyday.
I am not new to Java, but new to Android development and am thinking
about making a classical client/server application.
The question for me is: What is the most painless way to do the data
exchange? I really dont want to start making my own protocol with
sockets, rather thought about some xml-exchange, maybe via http or
xmpp. Is any of these well supported in the android libs or the libs
usually present on android devices? Like serializating objects into
xml and back and then sending them via stream (xmpp) or packets (http)
from one direction to another?
How would you solve this?

Looking forward for inspirating answers,
Robert

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Noob question...using class variables inside listeners

2009-10-12 Thread Streets Of Boston

Two solutions:

Remove the 'this':
   okIntent.putExtra("com.example.challenge_no",
   challenge_number);// This is the problem line
   startActivity(okIntent);
   finish();

Or add Example.:
   okIntent.putExtra("com.example.challenge_no",
   Example.this.challenge_number);// This is the
problem line
   startActivity(okIntent);
   finish();


On Oct 12, 12:56 am, Tom  wrote:
> There is a probably a very simple answer to this, but I would like to
> do the following:
>
> public class Example extends Activity {
>
>     private String challenge_number = "";
>
>    .class code
>
>     Button ok_button = new Button(this);
>     ok_button.setOnClickListener(new View.OnClickListener()
>     {
>            public void onClick(View args0)
>            {
>                Intent okIntent = new Intent();
>                okIntent.setClassName("com.example",
> "com.example.newPage");
>
>                okIntent.putExtra("com.example.challenge_no",
> this.challenge_number);    // This is the problem line
>                startActivity(okIntent);
>                finish();
>            }
>
> }
>
> It fails because the listener doesn't know what "this.challenge_no"
> is.  Can anyone help me solve this problem of scope?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Problems playing MP3s on real device

2009-10-12 Thread Adrian

Hello,

I'm desperately trying to get my soundboard application to work. I
have a GridView consisting of Buttons, which have an OnClickListener
starting the sound file associated with the button. The sound files
are stored as MP3 (64 kbit/s, LAME encoded) audio files in the res/raw
folder and are referenced using the R class.

The following problem only occurs when running the app on a real
device, however, on the emulator it works perfectly. I have tried two
different HTC Hero so far.

I have a mysterious problem, that everytime I press a button to play a
specific sound, ALL sounds in the res/raw folder are played in the
order they are listed there. My current code to play a sound looks
like this:

if (player != null) {
player.stop();
player.release();
}

player = MediaPlayer.create(this, resId);

if (player != null) {
player.start();
}

As you can see I use a "singleton" MediaPlayer to play the files. I
have also tried using a new separate MediaPlayer instance for each
sound file, with the same result. Additionally, I have tried playing
the sound file in a separate thread with the result, that only the
first time all sound files are played. After that, the buttons work as
intended.

You can take a look at the source code on the Google Code project
site: http://code.google.com/p/zappenduster-soundboard/

Thanks for your help!
Adrian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Nesting an ActivityGroup as atTab content

2009-10-12 Thread Huebi

yes, the list activity handling is not that hard to implement - maybe
I do this. I was just wondering why the easy way to plug two existing
activities into an ActivityGroup was not working, but that has been
answered. Thanks :)

On 12 Okt., 19:24, Dianne Hackborn  wrote:
> If you mean implementing ListActivty, what it does is trivial.
>
> On Mon, Oct 12, 2009 at 10:04 AM, Huebi wrote:
>
>
>
>
>
>
>
> > True but one is a Map and the other a list and I don't want to
> > implement all the control code again. Simpler cases can be done
> > through views for sure
>
> > On 12 Okt., 18:43, Mark Murphy  wrote:
> > > Huebi wrote:
> > > > I almost don't dare to write it but I want to implement iPhone like
> > > > navigation behaviour where you can have nested navigation within a
> > > > tab. For UI consistency reasons I wanted the tabs to be still visible
> > > > as the new screen is specific to the one tab. I think I will leave
> > > > that now knowing that Nested ActivityGroups are not supported.
>
> > > Bear in mind that the contents of tabs do not have to be activities. In
> > > fact, I *still* don't know a solid reason to use activities for tabs.
>
> > > Make the contents of your tabs be views, and update those views as
> > > needed for your "nested navigation".
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com|
> >http://twitter.com/commonsguy
>
> > > Android Development Wiki:http://wiki.andmob.org
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to make the android source code and SDK successfully by cygwin?

2009-10-12 Thread chuck

Hi all:

 The code was downloaded successfully by cygwin. But when I make
it, the errors were as follows:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
target/com
mon/docs/offline-sdk-timestamp'.  Stop.


I can make the NDK by cygwin and my tool chains are listed in the
following:
1. gcc version 3.4.4
2. GNU Make 3.81
3. java version "1.6.0_16

Dose anyone help me?
Thanks a lot!!

Chuck

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to caculator the time?

2009-10-12 Thread Mika Halttunen

Hi,

> but if I change the system time in "//do something" , how to caculator
> the spentTime?

>From the API docs: "This method (System.currentTimeMillis()) shouldn't
be used for measuring timeouts or other elapsed time measurements, as
changing the system time can affect the results."

Instead, see the SystemClock-class, SystemClock.uptimeMillis() in
particular.

--
Mika

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Default display unit px or dp?

2009-10-12 Thread Romain Guy

The Java APIs work only with pixels. Your app is probably running in
compatibility mode.

On Mon, Oct 12, 2009 at 12:20 PM, Markus  wrote:
>
> I always thought the default display unit would be pixels.
>
> But when I run my application on WVGA800 in the emulator the lines are
> five pixels wide even though I called Paint.setStrokeWidth(3). The
> same seems to happen with Drawable.setBounds(); the value I provide
> gets multiplied by 1.5 internally.
>
> If that's the case, how can I specify pixels instead of dips if I want
> pixels?
>
> Can someone clarify this?
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to caculator the time?

2009-10-12 Thread contender

SystemClock.elapsedRealtime(); ?



On Oct 12, 8:20 am, Sansiro  wrote:
> long startTime=System.currentTimeMillis();
> // do something
> long endTime=System.currentTimeMillis();
> long spentTime=(endTime-startTime)/1000;
>
> but if I change the system time in "//do something" , how to caculator
> the spentTime?
>
> the CPU running time?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: end dialer activity

2009-10-12 Thread midoub

hi shaz,
Did you find solution for your problem? if yes, could you please share
the solution with us. I have the same issue and I don't have any idea
to solve it.
Regards,


On Oct 12, 3:53 am, shahzad ahmad  wrote:
> Hi,
>     I have started dialer activity with code
>
>         Intent myIntent = new Intent(Intent.ACTION_CALL,
> Uri.parse(createTelUrl("1234567")));
>         startActivityForResult(myIntent);
>
> Is there a way to stop the dialer activity from same code.? Logically it
> should be possible as i started it and i should have rights to stop it as
> well. But i cann't find any help in this regard.
>
> Thanks,
> shaz

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Setting Focus

2009-10-12 Thread Neilz

Thanks. It doesn't really seem to have worked in my case. It does for
the first visit, but strangely on subsequent visits the behaviour is
the same as before.

As you rightly say though, this has to be simpler...!

On Oct 12, 7:52 pm, Mark  wrote:
> Oh the addView() is just from whatever your top level container is. So
> a default Activity created through the wizard just houses a
> LinearLayout. So it's like:
>
>   LinearLayout main = (LinearLayout) findViewById(R.id.mainlayout);
>
>   LinearLayout dummy = ...;
>   dummy.setFocusable(true);
>   dummy.setFocusableInTouchMode(true);
>   main.addView(dummy);
>
>   EditText edit = ...;
>   main.addView(edit);
>
> but there has GOT to be a better way of doing this!!
>
> Mark
>
> On Oct 12, 2:39 pm, Neilz  wrote:
>
> > Hi Mark, thanks for offering a solution to this frustrating problem.
>
> > I can't implement it though... what's the addView() method from? I
> > can't seem to resolve it...
>
> > Cheers.
>
> > On Oct 12, 5:38 pm, Mark  wrote:
>
> > > For now, I created a dummy LinearLayout and set it to focusable(true),
> > > so at least when the activity starts, the first EditText isn't
> > > selected:
>
> > >   LinearLayout llDummy = new LinearLayout();
> > >   llDummy.setFocusable(true);
> > >   llDummy.setFocusableInTouchMode(true);
> > >   addView(llDummy);
>
> > >   EditText edit = ...;
> > >   addView(edit);
>
> > > however, this is ugly and there should be a "right" way to tell the
> > > Activity to not auto-selected a first control for input in touch mode?
>
> > > Thanks
>
> > > On Oct 12, 10:39 am, Mark  wrote:
>
> > > > Same problem here, setSelected(false) does nothing, my edit field
> > > > still insists on having inputfocuswhen my app starts up. There must
> > > > be a way to fix this?
>
> > > > On Oct 5, 11:59 am, Tom  wrote:
>
> > > > > Hi,
> > > > > I'm looking for the same thing.
> > > > > Best regards
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Default display unit px or dp?

2009-10-12 Thread Markus

I always thought the default display unit would be pixels.

But when I run my application on WVGA800 in the emulator the lines are
five pixels wide even though I called Paint.setStrokeWidth(3). The
same seems to happen with Drawable.setBounds(); the value I provide
gets multiplied by 1.5 internally.

If that's the case, how can I specify pixels instead of dips if I want
pixels?

Can someone clarify this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] 802.1X configuration?

2009-10-12 Thread fba

Hi all,

With the release of the features in 1.6, I am looking for the APIs
needed to write an app that can configure 802.1X.  Based on the API
documentation it looks like no official APIs were added to handle
this.   Am I missing something?

What is the best way to go about creating an 802.1X config in code?
Do I need to use JNI and link to a library that is included?  Or dig
around in the Android source to see how the built-in configuration
tool does it?  (That is my next step.  I just wanted to put this out
there in case someone has a better answer in the mean time.)

Thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: I get the "unable to start wifi"

2009-10-12 Thread mehool

Hey,

I had the similar problem and was able to get it working by doing the
default factory setting

good luck

On Oct 9, 12:08 pm, Ryck  wrote:
> I have just installed Donut version 1.6 on my HTC Dream. The install
> went smoothly. But when I try tostartmyWiFiI get the "unabletostartwifi" 
> message. Never had a problem in 1.5.
>
> The log reports:
>
> D/SettingsWifiEnabler( 303): Receivedwifistate changed from Unknown
> to Enabling
> E/WifiHW ( 74): Cannot access "/data/misc/wifi/wpa_supplicant.conf":
> Permission denied
> E/WifiHW ( 74): Wi-Fi will not be enabled
> E/vold ( 47):Unableto lookup media '/devices/platform/msm_sdcc.1/
> mmc_host/mmc0/mmc0:0001'
> E/vold ( 47): Error processing uevent msg (No such file or directory)
> E/WifiService( 74): Failed tostartsupplicant daemon.
> D/SettingsWifiEnabler( 303): Receivedwifistate changed from Enabling
> to Unknown
> D/dalvikvm( 303): GC freed 4090 objects / 272600 bytes in 118ms
> I/ActivityManager( 74): Starting activity: Intent
> { act=android.intent.action.
>
> I see wpa_supplicant doesn't have access to others, I tried changing
> the permissions of the directories and wpa_supplicant.conf file to 777
> but they keep getting set back again so that other doesn't have
> access.
>
> Do I need to set up a special user?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: The application android has stopped unexpectedly

2009-10-12 Thread Marco Nelissen

Instead of the "console", look at the system log (either using "adb
logcat" or with the ddms perspective in eclipse), and it will tell you
exactly where and why it crashed.


On Mon, Oct 12, 2009 at 5:33 AM, Sunny  wrote:
>
> Hi ,
> I am testing basic AndroidPhoneDialer application on emulator my
> console showing following result
>
> [2009-10-12 17:56:25 - AndroidPhoneDialer]Android Launch!
> [2009-10-12 17:56:25 - AndroidPhoneDialer]adb is running normally.
> [2009-10-12 17:56:25 - AndroidPhoneDialer]Performing
> com.example.AndroidPhoneDialer.AndroidPhoneDialer activity launch
> [2009-10-12 17:56:25 - AndroidPhoneDialer]Automatic Target Mode: using
> existing emulator 'emulator-5554' running compatible AVD 'MY_AVD'
> [2009-10-12 17:56:25 - AndroidPhoneDialer]Uploading
> AndroidPhoneDialer.apk onto device 'emulator-5554'
> [2009-10-12 17:56:25 - AndroidPhoneDialer]Installing
> AndroidPhoneDialer.apk...
> [2009-10-12 17:56:32 - AndroidPhoneDialer]Success!
> [2009-10-12 17:56:32 - AndroidPhoneDialer]Starting activity
> com.example.AndroidPhoneDialer.AndroidPhoneDialer on device
> [2009-10-12 17:56:40 - AndroidPhoneDialer]ActivityManager: Starting:
> Intent { cmp=com.example.AndroidPhoneDialer/.AndroidPhoneDialer }
>
> but emulator showing the massage: The application a AndroidPhoneDialer
> has stopped unexpectedly
>
> Please Help me out
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Need to know RPC design in android

2009-10-12 Thread Vishal

Hello all,
I am very new to the android world. I am concerned about the kernel
level code in android.
I am currently looking for document on RPC(Remote procedure Call) in
android. It seems like android uses SunRPC. But I do not find any
document related to RPC.
Can any please help in finding a decent document which briefs the RPC
design in android?

Looking forward to your replies

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Vertical TextView

2009-10-12 Thread fhucho

Can I somehow make my TextView to be vertical - it should look like
normal TextView rotated 90 degrees. I want this because at the bottom
of the screen I have a SlidingDrawer widget with a TextView label and
when the screen orientation changes to landscape I want to display the
SlidingDrawer at the right edge of the screen - so it will be rotated
90 degrees.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: I get the "unable to start wifi"

2009-10-12 Thread mehool

Hey,

I had the exact same problem. I was able to connect earlier using WIFI
and was able to browse the web.

I have HTC dream android developer phone and had upgraded it to 1.6.
Everything was working fine unitl one fine day when wifi decided to
show me "unable to to start wifi".

after much ordeal, I was able to get it to start working again by
restoring factory default and that did the trick and it started
working again.

I tried different kind of things like downgrading (radio and recovery)
to androind 1.1 but was able to do so for some reason (I still donot
know the reason for this).

However since I got the wifi to enable again I think I might have to
be satisfied with it :)

On Oct 9, 12:08 pm, Ryck  wrote:
> I have just installed Donut version 1.6 on my HTC Dream. The install
> went smoothly. But when I try tostartmyWiFiI get the "unabletostartwifi" 
> message. Never had a problem in 1.5.
>
> The log reports:
>
> D/SettingsWifiEnabler( 303): Receivedwifistate changed from Unknown
> to Enabling
> E/WifiHW ( 74): Cannot access "/data/misc/wifi/wpa_supplicant.conf":
> Permission denied
> E/WifiHW ( 74): Wi-Fi will not be enabled
> E/vold ( 47):Unableto lookup media '/devices/platform/msm_sdcc.1/
> mmc_host/mmc0/mmc0:0001'
> E/vold ( 47): Error processing uevent msg (No such file or directory)
> E/WifiService( 74): Failed tostartsupplicant daemon.
> D/SettingsWifiEnabler( 303): Receivedwifistate changed from Enabling
> to Unknown
> D/dalvikvm( 303): GC freed 4090 objects / 272600 bytes in 118ms
> I/ActivityManager( 74): Starting activity: Intent
> { act=android.intent.action.
>
> I see wpa_supplicant doesn't have access to others, I tried changing
> the permissions of the directories and wpa_supplicant.conf file to 777
> but they keep getting set back again so that other doesn't have
> access.
>
> Do I need to set up a special user?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to build android source code and SDK correctly by cygwin?

2009-10-12 Thread chuck

Hi all:

The code was downloaded successfully by cygwin. But when I make
it, the errors were as follows:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
target/com
mon/docs/offline-sdk-timestamp'.  Stop.


I can make the NDK successfully by cygwin and my tool chains are
listed in the
following:
1. gcc version 3.4.4
2. GNU Make 3.81
3. java version "1.6.0_16

Dose anyone help me?
Thanks a lot!!

Chuck

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where have all the Google employees gone?

2009-10-12 Thread spocky12

Yes, we've got the same kind of issue in our app.
For the records, here is the problem and the solution.
The problem lies in the Camera.startPreview : an error is reported in
logcat :
E/CameraService(  554): registerBuffers failed with status -38
followed by an exception :
java.lang.RuntimeException: startPreview failed

The problem is solved by changing the surface holder type :
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

On 1.5, commenting this line just hides the camera preview from the
surface (we don't want it to display directly, we only use it to
access to the video frame buffer), but does not crash.

Spocky

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: play video backward

2009-10-12 Thread init params
Please be more eloquent :)

On Mon, Oct 12, 2009 at 8:55 PM, Marco Nelissen  wrote:

>
> On Mon, Oct 12, 2009 at 3:34 AM, RS  wrote:
> >
> > How to play video in a time reversed direction?
>
> You can't.
>
> > The requirement is to loop playing forward and backward repeatedly.
> > Thanks a lot!
> > R.S
> > ps: The video is shot on the same android device (g1/adp1)
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can android applications install it's shared library files(*.so) from own update server?

2009-10-12 Thread killerfore

Hello,

I'm designing an app which use its own native shared libraries (*.so).

And it can download new shared libraries from some update server (not
android market)

I wonder that these *.so files can be installed in android by my
android app?

And another question,

Other applications can also access these shared libraries installed by
my app. (If all apps have same userID)

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Archos 5 Android PMP

2009-10-12 Thread Nils


> > can you enable adb debugging on the device?

using the latest firmware (v 1.1.01) just released today,
debugging works now as expected. in the usb settings, you
have to switch to "debug profile".
furthermore, there is an ftp and samba server enabled,
so you can easily get access to the filesystem.

nils

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] stopped unexpectedly when run on emulator

2009-10-12 Thread 登辉 黄

we modifid snake from sdk samples. there is a running exception
"stopped unexpectedly". after step debug, i found that the statement
setContentView(R.layout.snake_layout); and mSnakeView.setTextView
((TextView) findViewById(R.id.text));from snake.java file will throw
exceptions. i think the layout xml file have a some error. but i can't
find any error in this file.





http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
 xmlns:app="http://schemas.android.com/apk/res/
com.example.android.snake">










and snake.java as following:

/*
 * Copyright (C) 2007 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.android.snake;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.widget.TextView;

/**
 * Snake: a simple game that everyone can enjoy.
 *
 * This is an implementation of the classic Game "Snake", in which you
control a
 * serpent roaming around the garden looking for apples. Be careful,
though,
 * because when you catch one, not only will you become longer, but
you'll move
 * faster. Running into yourself or the walls will end the game.
 *
 */
public class Snake extends Activity {

private SnakeView mSnakeView;

private static String ICICLE_KEY = "snake-view";

/**
 * Called when Activity is first created. Turns off the title bar,
sets up
 * the content views, and fires up the SnakeView.
 *
 */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);


// No Title bar
try{
requestWindowFeature(Window.FEATURE_NO_TITLE);
}catch(Exception e){
Log.d("SnakeView", "inside onCreate function --
requestWindowFeature!");

}

try {
setContentView(R.layout.snake_layout);
} catch (Exception e) {
Log.d("SnakeView", "inside onCreate function -- 
setContentView!");

}

try {
mSnakeView = (SnakeView) findViewById(R.id.snake);
} catch (Exception e) {
Log.d("SnakeView", "inside onCreate function --  
findViewById
(R.id.snake)!");

}

try {
mSnakeView.setTextView((TextView) 
findViewById(R.id.text));
} catch (Exception e) {
Log.d("SnakeView", "inside onCreate function last!");

}




if (savedInstanceState == null) {
// We were just launched -- set up a new game
mSnakeView.setMode(SnakeView.READY);
} else {
// We are being restored
Bundle map = savedInstanceState.getBundle(ICICLE_KEY);
if (map == null) {
mSnakeView.setMode(SnakeView.PAUSE);
}
}
}

@Override
protected void onPause() {
super.onPause();
// Pause the game along with the activity
mSnakeView.setMode(SnakeView.PAUSE);
}



}

Please some peoples met this kind of problem or master in android
development, give me some suggestion?

By the way, how can i attach some code?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Remote Wipe /Hard Reset / Factory Default

2009-10-12 Thread kuki1984

Hello.

I would like to create application that will reset phone to factory
default. Is it possible create such application. Will I need root
access? I searched forum but i haven't found any hints about it. There
are some applications that can do hard reset. But either they are too
expensive or I haven't got access to the code. I would like to create
simple guard.

Thanks for any reply.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem using ksoap2 in Android

2009-10-12 Thread claudiotainen

Same problem here:
org.xmlpull.v1.XmlPullParserException: unexpected type
(position:END_DOCUMENT n...@1:0 in java.io.inputstreamrea...@4413ee)

I wonder if you managed to solve it. If not, have you tried checking
the xml soap request that is sent out of your client?
I'm using
androidHttpTransport.debug = true;
System.out.println ( androidHttpTransport.requestDump );
to examine the xml code that is generated bu ksoap2.

The strange thing is that I can successfully invoke other operations
of my ws, while it seems that this request can't even be "assembled"
by the parser.
I've also noticed that changing versione from 1.1 to 1.2 the exception
thrown is different, and it refers to the START_TAG.

More to come (hopefully) in the near future...
Cheers,

Claudio

On 29 Set, 20:49, Gareth  wrote:
> I've written a webservice client which usesksoap2. When I run a test
> program from outside of Android everything works without a problem,
> however when I issue the SOAP requests from within Android then every
> 2nd request seems to fail, throwing the following error (copied from
> the Dalvik Debug Monitor):
> 09-29 18:35:22.116: ERROR/class com.garethwestern.android.SoapTest
> (790): unexpected type (position:END_DOCUMENT n...@1:0 in
> java.io.inputstreamrea...@437e73a8)
>
> When I step through the code from within the IDE everything seems to
> run ok untilksoap2tries to parse the response, at which point the
> aforementioned error is thrown because the HTTP response is empty.
>
> Unfortunately the webservice is over HTTPS so I am unable to easily
> use something like fiddler or wireshark to check the exact responses
> and requests, but as mentioned it works without a problem outside
> Android, and every 2nd request without fail from within.
>
> Does anyone have any suggestions as to how I can debug this further?
>
> Thanks,
>
> Gareth

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] The application android has stopped unexpectedly

2009-10-12 Thread Sunny

Hi ,
I am testing basic AndroidPhoneDialer application on emulator my
console showing following result

[2009-10-12 17:56:25 - AndroidPhoneDialer]Android Launch!
[2009-10-12 17:56:25 - AndroidPhoneDialer]adb is running normally.
[2009-10-12 17:56:25 - AndroidPhoneDialer]Performing
com.example.AndroidPhoneDialer.AndroidPhoneDialer activity launch
[2009-10-12 17:56:25 - AndroidPhoneDialer]Automatic Target Mode: using
existing emulator 'emulator-5554' running compatible AVD 'MY_AVD'
[2009-10-12 17:56:25 - AndroidPhoneDialer]Uploading
AndroidPhoneDialer.apk onto device 'emulator-5554'
[2009-10-12 17:56:25 - AndroidPhoneDialer]Installing
AndroidPhoneDialer.apk...
[2009-10-12 17:56:32 - AndroidPhoneDialer]Success!
[2009-10-12 17:56:32 - AndroidPhoneDialer]Starting activity
com.example.AndroidPhoneDialer.AndroidPhoneDialer on device
[2009-10-12 17:56:40 - AndroidPhoneDialer]ActivityManager: Starting:
Intent { cmp=com.example.AndroidPhoneDialer/.AndroidPhoneDialer }

but emulator showing the massage: The application a AndroidPhoneDialer
has stopped unexpectedly

Please Help me out

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Noob question...using class variables inside listeners

2009-10-12 Thread Tom

There is a probably a very simple answer to this, but I would like to
do the following:


public class Example extends Activity {

private String challenge_number = "";

   .class code

Button ok_button = new Button(this);
ok_button.setOnClickListener(new View.OnClickListener()
{
   public void onClick(View args0)
   {
   Intent okIntent = new Intent();
   okIntent.setClassName("com.example",
"com.example.newPage");

   okIntent.putExtra("com.example.challenge_no",
this.challenge_number);// This is the problem line
   startActivity(okIntent);
   finish();
   }

}


It fails because the listener doesn't know what "this.challenge_no"
is.  Can anyone help me solve this problem of scope?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to build android source code and SDK by cygwin?

2009-10-12 Thread chuck

   The source was downloaded successfully by cygwin. But when I
make the source code, the error was occurred:


$ make

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
target/com
mon/docs/offline-sdk-timestamp'.  Stop.


 I can make the NDK by cygwin and the tool chains are as follows:
1. GNU Make 3.81
2. gcc version 3.4.4
3. java version 1.6.0_16


Does anyone help me?
   Thanks a lot!!

chuck

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem using ksoap2 in Android

2009-10-12 Thread claudiotainen

Hi, I've got exactly the same problem...
I'm using ksoap2 and I do manage to call some methods of my ws, but
the parser keeps popping the same error when it tries to process a
specific soap message:

W/System.err( 2313): org.xmlpull.v1.XmlPullParserException: unexpected
type (position:END_DOCUMENT n...@1:0 in
java.io.inputstreamrea...@435f9ee8)

What leaves me astonished is that if I print the xml of the generated
soap, it is ok!
By the way, don't know if this can help, but I've been using

androidHttpTransport.debug = true;
System.out.println("request: " + androidHttpTransport.requestDump);

to see the xml generated.
Also, I've noticed that changing soap version from 1.1 to 1.2 I get a
different error, this time concerning the START_TAG.
Hope this was somehow useful...
Please let me know if you find a solution for this issue.
Thank you,
Claudio


PS: I've noticed that a lot of users are facing similiar problems.
Lots of posts, but as far as I'm concerned no "ultimate" solution till
now...

On Sep 29, 8:49 pm, Gareth  wrote:
> I've written a webservice client which usesksoap2. When I run a test
> program from outside of Android everything works without a problem,
> however when I issue the SOAP requests from within Android then every
> 2nd request seems to fail, throwing the following error (copied from
> the Dalvik Debug Monitor):
> 09-29 18:35:22.116: ERROR/class com.garethwestern.android.SoapTest
> (790): unexpected type (position:END_DOCUMENT n...@1:0 in
> java.io.inputstreamrea...@437e73a8)
>
> When I step through the code from within the IDE everything seems to
> run ok untilksoap2tries to parse the response, at which point the
> aforementioned error is thrown because the HTTP response is empty.
>
> Unfortunately the webservice is over HTTPS so I am unable to easily
> use something like fiddler or wireshark to check the exact responses
> and requests, but as mentioned it works without a problem outside
> Android, and every 2nd request without fail from within.
>
> Does anyone have any suggestions as to how I can debug this further?
>
> Thanks,
>
> Gareth

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Building android source in debug mode

2009-10-12 Thread NimeshChanchani

i have downloaded the source code of android and want to build it in
debug mode. Is there any document that decibes the build process?

i basically want to build the "opencore" project in debug mode so that
i can "step in" to the code.
i don't mind if other projects are libraries.

is there a sample application for the media player on android?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SQLite - detecting whether LIMIT was hit

2009-10-12 Thread mkale

On Oct 11, 8:14 pm, westmeadboy  wrote:
> I have an SQL which uses something like "LIMIT 100".
>
> If the cursor returns 100 rows, is there an efficient way of
> distinguishing between whether the LIMIT caused it or not?
>
> Hmm, I suppose I could just call LIMIT 101 instead but I was hoping
> for a nicer way...

You can either select count(*) beforehand to know the total rows, or
if you're paging through the whole table then the next page when you
run it with "offset 100" you won't get any rows back if there were
<100 rows to begin with.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Setting Toast Orientation to be Different from the Activity Orientation

2009-10-12 Thread Mark

Hello,

I'm working on an application that makes use of the camera.  There is
a known issue with the HTC g1 (described here:
http://code.google.com/p/android/issues/detail?id=1193) that requires
the camera preview activity to be in Landscape mode in order for the
preview to work correctly.  I would like to be able to display Toast
messages in portrait mode while the main camera activity is set to
landscape.  I've tried creating a custom Toast per the directions at
http://developer.android.com/guide/topics/ui/notifiers/toasts.html,
but I don't seem to be able to change the orientation.

Can anyone suggest a way to accomplish this?

Thanks in advance for your help!

Mark

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get the size of a component in onCreate?

2009-10-12 Thread Anders

Hi all,

I'm working on an application where I wan't to show a thumbnail image
on an ImageButton. This works when I scale the image to create the
thumbnail using a hard coded size, but I would really like to use the
button.getWidth() / getHeight() to calculate the size of the
thumbnail.

However the getWidth/Height returns zero in onCreate() - probably
because the layouting is not finished(?).

Is there any way to get the size of the component? Is there any
"onLayoutDone()" function that I could override, or how should one go
about doing this?

Any suggestions will be appreciated.

Best Regards,
Anders

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: People still using ADC2 entries

2009-10-12 Thread fhucho

Those users have rooted phones and they just somewhere exported the
downloaded apps.

On Oct 12, 10:26 pm, CraigsRace  wrote:
> I had a look at my server logs, it looks like people are still playing
> my ADC2 entry (only about 30 people / day).
>
> The users are spread out from all over the world (LA, NY, London,
> Spain, France, ...).
>
> Was there a way that users could keep the ADC2 apps?  I thought they
> got deleted as soon as the user entered their ratings?
>
> I don't mind that people are playing my game (I think it's great!).  I
> just would have liked to keep some of the ADC2 apps too!  :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got doubles, want ringtone, how do I do it?

2009-10-12 Thread niko20

Oops,

That doesn't contain the code anymore. NEver mind...

-niko


On Oct 12, 3:14 pm, niko20  wrote:
> Hi Jack,
>
> A while back I was able to get some Ogg vorbis code to work, but I
> think it required a specific format input (22khz, 16 bit, stereo), and
> of course it took a while to do all the math.
>
> I've uploaded my test project to:
>
> http://rapidshare.com/files/292161983/TestOgg.zip.html
>
> you may have to figure out how to get your buffer into it, I haven't
> looked at this project in a while.
>
> -niko
>
> On Oct 9, 11:43 pm, Jack Twilley  wrote:
>
> > I am writing an app which will generate ringtones.  I have an
> > ArrayList containing all the floating point data, but I can't
> > see how to convert it to an Ogg Vorbis file.  The Android SDK doesn't
> > have any obvious modules designed to do this sort of thing.  Do I need
> > to import some other libraries or something?  Pointers to any examples
> > would be appreciated.  Thanks!
>
> > Jack.
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] People still using ADC2 entries

2009-10-12 Thread CraigsRace

I had a look at my server logs, it looks like people are still playing
my ADC2 entry (only about 30 people / day).

The users are spread out from all over the world (LA, NY, London,
Spain, France, ...).

Was there a way that users could keep the ADC2 apps?  I thought they
got deleted as soon as the user entered their ratings?

I don't mind that people are playing my game (I think it's great!).  I
just would have liked to keep some of the ADC2 apps too!  :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Alarm is canceled if app is stopped

2009-10-12 Thread Dianne Hackborn
That is intentional.  Stopping an application is there for the user to stop
everything associated with it -- processes, alarms, services, notifications,
etc.  They will not be restarted until someone explicitly does so (typically
this would be the user re-launching the app and having it do the appropriate
thing).

It sounds like TasKiller is abusing this API.  The API is there for the user
to explicitly stop an app from running without going to the most extreme
measure of uninstalling the app.  Trying to use it to automatically stop
things behind the user's back seems...  questionable, and probably not what
the user actually wants.

On Mon, Oct 12, 2009 at 1:00 PM, Lazarus 101  wrote:

>
> I have an app that does some polling every 2 hours. I set a repeating
> alarm that starts a service but I have noticed that if I use some task
> manager (e.g. TasKiller) to kill my app then the polling will not be
> performed from that moment on. I know this because I store the time of
> the last poll, I have also checked the server logs and there are no
> requests received from the client after I force close my app.
> Is this the way alarms work or should I look somewhere else for a
> crash or smth? because if alarms really get canceled then how should
> we implement the polling?
>
> I'm also interested in what happens with a running service  if it gets
> killed from another app (I assume all task managers are using
> ActivityManager.restartPackage() to kill other apps), does it get
> restarted?
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got doubles, want ringtone, how do I do it?

2009-10-12 Thread niko20

Hi Jack,

A while back I was able to get some Ogg vorbis code to work, but I
think it required a specific format input (22khz, 16 bit, stereo), and
of course it took a while to do all the math.

I've uploaded my test project to:

http://rapidshare.com/files/292161983/TestOgg.zip.html

you may have to figure out how to get your buffer into it, I haven't
looked at this project in a while.


-niko

On Oct 9, 11:43 pm, Jack Twilley  wrote:
> I am writing an app which will generate ringtones.  I have an
> ArrayList containing all the floating point data, but I can't
> see how to convert it to an Ogg Vorbis file.  The Android SDK doesn't
> have any obvious modules designed to do this sort of thing.  Do I need
> to import some other libraries or something?  Pointers to any examples
> would be appreciated.  Thanks!
>
> Jack.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >