[android-developers] Triggering an application on a special gesture / event

2009-08-31 Thread Dinesh

hi,

The App I'm trying to work on requires that when a special combination
of keys are pressed ( irrespective of the keypad being locked ) a
service / app is triggered.

How can I achieve this? My app's whole idea hinges on this particular
part to work.

I am not here to take a no for an answer. If you are going to tell
me that its not possible, atleast include an explanation as to why its
not possible.

Thanks.

Dinesh

--~--~-~--~~~---~--~~
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: Any email confirmation after submit the application for ADC 2?

2009-08-31 Thread James Yum
Hi Parchira,
No email confirmation. Just make sure (everyone) that it appears in the
application listing at http://market.android.com/adc as Submitted.

Cheers,
James

On Sun, Aug 30, 2009 at 10:46 PM, parchira tech pachira.t...@gmail.comwrote:


 I have submitted my application for ADC 2. But I didn't receive any
 email. How can I know the application is successfully submited.

 THanks!

 Parchira

 


--~--~-~--~~~---~--~~
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: Do you got any confirmation after ADC 2 submit?

2009-08-31 Thread James Yum
Hi Cindy,
No email confirmation. Just make sure (everyone) that it appears in the
application listing at http://market.android.com/adc as Submitted.

Cheers,
James

On Sun, Aug 30, 2009 at 10:48 PM, cindy ypu01...@yahoo.com wrote:


 Have you got any confirmation for ADC 2 submission? How to check the
 current status of my submission?

 Thanks!

 Cindy
 


--~--~-~--~~~---~--~~
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: ADC 2 Submission Site -- Now live

2009-08-31 Thread James Yum
Hi Monmonja,
If you already submitted the app to Market, you need to submit to the ADC
site under a different package name. Were you able to do that successfully?

Cheers,
James

On Sun, Aug 30, 2009 at 8:56 PM, monmonja almondmend...@gmail.com wrote:


 i had submitted an app on adc but it does not show on the listing but
 when i try to reupload the app, it said there is something the same on
 the market. Is this normal? can i update my app? tnx

 On Aug 28, 1:23 am, Dan Morrill morri...@google.com wrote:
  We are not planning to extend the submission deadline.
  - Dan
 
  On Tue, Aug 25, 2009 at 2:22 PM, patrick android.com...@gmail.com
 wrote:
 
   Hi,
 
   i'm asking wher can we ask google to extend the deadline?
 
   thks
 
   On 25 août, 17:05, Dan Sherman impact...@gmail.com wrote:
There's no reason that they would change the deadline.  The deadline
 has
been set at the 31st since late May (as stated before).  With that
   deadline
posted, your app should be ready to hit the submit button on the 31st
 or
sooner.  Nothing changed, they're giving you a full week to hit the
   Submit
button.
 
- Dan
 
On Tue, Aug 25, 2009 at 12:06 PM, Maps.Huge.Info (Maps API Guru) 
 
cor...@gmail.com wrote:
 
 I see no need to extend the deadline, it's been public since May
 27th,
 if you're not ready by now, you'll probably never be ready. People
 have to learn that a deadline means something, extending it would
 only
 punish those who are ready and reward those who can't meet project
 goals on time.
 
 -John Coryat
 


--~--~-~--~~~---~--~~
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] Any email confirmation after submit the application for ADC 2?

2009-08-31 Thread parchira tech

I have submitted my application for ADC 2. But I didn't receive any
email. How can I know the application is successfully submited.

THanks!

Parchira

--~--~-~--~~~---~--~~
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] Displaying Bitmap from PictureCallback works on emulator but not on G1

2009-08-31 Thread Shawn McMurdo

I am trying to display a Bitmap from the PictureCallback.
It works on the emulator but I get a blank screen on the G1.
In both cases I am running from Eclipse using ADT plugin.

Here is the relevant code:

public void onPictureTaken(byte[] data, Camera camera) {
Bitmap bitmap = BitmapFactory.decodeByteArray(
data, 0, data.length);
Rect src = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight
());
Canvas canvas = preview.getHolder().lockCanvas();
Rect dst = new Rect(0, 0, canvas.getWidth(), canvas.getHeight
());
canvas.drawBitmap(bitmap, src, dst, null);
preview.getHolder().unlockCanvasAndPost(canvas);
}

preview is of class Preview extends SurfaceView implements
SurfaceHolder.Callback

Any clues appreciated.
Thanks!
Shawn

--~--~-~--~~~---~--~~
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 stack: A B C - press BACK - go to A

2009-08-31 Thread Andrei Bucur
Maybe this helps:
http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_PREVIOUS_IS_TOP

On Mon, Aug 31, 2009 at 4:28 AM, tstanly tsai.sta...@gmail.com wrote:


 can possiable to verify whether B is exist or not?
 if B exist,so the apps can call finish() to close B,
 if not,don't call B.finish()
 (will be error because B is not exist)


 thanks!

 On 8月31日, 上午4時11分, Jonas Petersson jonas.peters...@xms.se wrote:
  fhucho wrote:
   my activity stack is ABC, in activity C I press back, and return to B,
   then press back again and go to A. What should I do to return to A
   directly from C?
 
  I guess it depends on the reason for wanting to skip B. I needed
  exactly this case yesterday and in my case B knows very well that it
  will not be needed when it starts up C, so B simply calls finish()
  after that. Solved.
 
  Best / Jonas
 


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



[android-developers] Javascript document.cookie in Android ?

2009-08-31 Thread dsuwirya

Hi,

I need help how to use correctly the javascript : document.cookie or
how
to write cookie from javascript in Android web browser ?

I've make sure in the settings that cookie is enabled. When I checked
by
using navigator.cookieEnabled, it returns true as well.

I've a piece of javascript code as follow that has been working
everywhere
( e.g. PC browsers, iPhone ), but doesn't work in Android.

function createCookie(name) {

// cookies expired in 1 year.
var expDate = new Date();
expDate.setDate(expDate.getDate() + 365);
expDate = expDate.toGMTString();

var el = document.getElementById(name);
document.cookie = name + '=' + escape(el.value) + '; path=/ ;
expires=' + expDate;
document.cookie = name + '-idx=' + escape(el.selectedIndex) + ';
path=/ ; expires=' + expDate;

//alert('cookie : ' + document.cookie);
}

When I open the 'alert' comment in the last line of code, Android will
just show blank while
all other browsers show me the content of the cookie that I've just
written.

Please help.

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: Triggering an application on a special gesture / event

2009-08-31 Thread Romain Guy

No, this is not possible. Applications cannot listen to touch/key
events that are not sent to the application itself. Only the system
can do this.

On Sun, Aug 30, 2009 at 9:41 PM, Dineshdinesh.a.jo...@gmail.com wrote:

 hi,

 The App I'm trying to work on requires that when a special combination
 of keys are pressed ( irrespective of the keypad being locked ) a
 service / app is triggered.

 How can I achieve this? My app's whole idea hinges on this particular
 part to work.

 I am not here to take a no for an answer. If you are going to tell
 me that its not possible, atleast include an explanation as to why its
 not possible.

 Thanks.

 Dinesh

 




-- 
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] Questions about ImageView.setImageMatrix

2009-08-31 Thread quill

Hi, everyone,
I;m testing to scale an image, and I got a problem:

main.xml:
ImageView
android:id=@+id/iv
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=center
/

onCreate():
iv = (ImageView) findViewById(R.id.iv);
iv.setImageResource(R.drawable.icon);

onTouchEvent():
Matrix mtrx = iv.getImageMatrix();
mtrx.postScale(2, 2);
iv.setImageMatrix(mtrx);
iv.setScaleType(ScaleType.MATRIX);
iv.invalidate();

when I touch the screen the image does scaled, but the size of
imageview does not change, so I can only see part of the image. Any
way to map the imageview to the Matrix(or the drawable)? I add
android:adjustViewBounds=true but it not works.

--~--~-~--~~~---~--~~
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: Upload a valid APK ADC2

2009-08-31 Thread James Yum
Hi William,
Try logging completely out of ADC site and/or Market site and try it again.

Cheers,
James

On Sat, Aug 29, 2009 at 8:08 AM, William Frati william.fr...@gmail.comwrote:


  I'm keep getting upload a valid APK when i'm uploading my app in
 ADC2 site submission.
  I followed all istructions at
 http://developer.android.com/guide/publishing/preparing.html,
 then signed my application with private key (40 years due date) all
 with Eclipse (Android tools\Export signed application package).
 The apk work fine in my phone.
 What I doing wrong?

 Other info:
 Cancelled all Log. references;
 this is my begin manifest file:
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=xxx.yyy.ADC2
  android:versionCode=1
  android:versionName=1.0.2
uses-sdk android:minSdkVersion=3 /
application
android:icon=@drawable/icon
android:label=@string/app_name
 

 


--~--~-~--~~~---~--~~
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] ADC deadline drawing near

2009-08-31 Thread James Yum
Hello,
There's about 24 hours left before the deadline. Please, please don't wait
until the last second to submit your entries. Your APK may not validate on
the submission site, so leave some time to correct any issues. You can
always update your entry later, and it's better to have something to show
for your work rather than nothing.

If you plan on updating an existing entry, again don't wait until the last
minute. And a quick heads up, you will have to increase your version code in
order to update over your previous APK, similar to how it is on the Market.

Good luck!
James

--~--~-~--~~~---~--~~
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: reduce list view font size

2009-08-31 Thread powerbyte

Check the sample code in

..\android-1.5\samples\ApiDemos\src\com\example\android\apis\view
\List14.java

-Somu

On Aug 31, 8:58 am, Sasi Kumar sasikumar.it1...@gmail.com wrote:
 thanks for your reply.
 Please give one example briefly/

 On Aug 29, 8:59 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t-



 mobile.com wrote:
  You can create a custom adapter and override the getView method.

  Balwinder Kaur
  Open Source Development Center
  ·T· · ·Mobile· stick together

  The views, opinions and statements in this email are those of the
  author solely in their individual capacity, and do not necessarily
  represent those of T-Mobile USA, Inc.

  On Aug 29, 12:05 am, Sasi Kumar sasikumar.it1...@gmail.com wrote:

   How can we reduce list view font size?

   Can any one know about these.

   please reply me.

   Thanks in advance

   Join

  http://groups.google.com/group/mobile-application-developers- 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 turn off camera sound on G1?

2009-08-31 Thread Shawn McMurdo

Anyone know how I can turn off the camera shutter sound on the G1 from
within my application?
Thanks!
Shawn
--~--~-~--~~~---~--~~
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] Any method to access the /data portion on the phone?

2009-08-31 Thread sharon

hi all,

I want to store some images into the /data folder,is it possible?
And how to do ? 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: How to update the UI from service

2009-08-31 Thread Abdul Muyeed

HI Abdula,

Did u find any solution. I'm also stuck up with the same problem.

regards,
Abdul Muyeed M

On Aug 23, 1:50 pm, Abdula ivanmaxime...@gmail.com wrote:
 Activity wich startedservicemust get obtained dataservicefor
 update ui.
 I think that the first options best suited. Please provide anexample
 for the first option. Thanks.

 On 21 авг, 21:01, Mark Murphy mmur...@commonsware.com wrote:

  Abdula wrote:
   Needservicewich retrive data by http and then return them to
   activity for update list view. How i can do this. I don't know return
   retrived data.

  You can:

  -- have the activity register some sort of callback or listener object
  with theservice, which theservicecalls when the data is loaded

  -- use a message bus (http://github.com/commonsguy/cwac-bus/tree),
  though my current implementation is overly complicated and needs a rewrite

  -- broadcast an Intent and have the activity listen for the broadcast Intent

  -- put the activity in a static public data member, though this is
  dangerous, as it think it is more prone than the other techniques to
  lead to memory leaks

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

  Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] about adc2 app

2009-08-31 Thread omnitial

hello,
i'm quite new in adc2 and also a late comer.
i developed 2 app for the adc2 rushly.
One of my app is a social app which need a server to run in real time.
But i couldn't manage to acquire a server for my app, by far now (due
to many reasons).
So i decided to make a demo database inside my app. So if a end user
use my app he can get all the options fully functional.
while discussing about it with others, some one said that, my app is
invalid for the adc2 due to this demo database.

i'm really confused about it. i need suggestions now. :(
am i heading towards right or invalid way ???

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



[android-developers] Listview populate with Xml file

2009-08-31 Thread sweet

Hello i search a tuto which show how to populate au listview with an
xml file of internet. I found one but it populate with attribut of a
marker:

xml file:
listerecette
recette name= »Le Cari de Boeuf » type= »Repas » Country= »France »
nbrofpers= »4″ level= » content= »Coupez le boeuf en morceaux
(style daube). Émincez les oignons, coupez les tomates en petits
morceaux et pilez ail, sel poivre e… »
/recette
…
listerecette

Java:
public  ArrayListArrayList renvoi_liste_recette_xml() throws
Exception{

  ArrayListArrayList aTableRetour = new ArrayListArrayList();
  URL myURL = new URL(http://www.dgentreprises.com/recette/
listerecette.php);
  DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance
();
  // création d'un constructeur de documents
  DocumentBuilder constructeur = fabrique.newDocumentBuilder();
  Document document = constructeur.parse(myURL.openStream());
  Element racine = document.getDocumentElement();
  NodeList liste = racine.getElementsByTagName(recette);
  for(int i=0; iliste.getLength(); i++){
  ArrayListString aTableauTmp =  new ArrayListString();
  Element E1= (Element) liste.item(i);
  //aTableRetour[i]= ;
  aTableauTmp.add(E1.getAttribute(name));
  aTableauTmp.add(E1.getAttribute(content));
  aTableRetour.add(aTableauTmp);
  }

  return aTableRetour;

I give you an exemple of my xml file(i would like to populate my
listview with the content of markers and not attributs):
xml file:
liste
item
nomL'ours blanc/nom
hebergHotel /heberg
tel321-123-4567/tel
emailoursbl...@menuirs.com/email
/item
item
nomLe coin du paradis/nom
hebergChambres d'hotes/heberg
tel0450257569/tel
emailpara...@menuirs.com/email
/item
item
nomL'Albanc/nom
hebergHotel **/heberg
tel0473589898/tel
emailalb...@menuirs.com/email
/item
/liste

If anyone know a tuto for that or if anyone can help me to fit the
fist code to my xml file it will be great because i'm blocked here ...
Thanks
Sweet

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



[android-developers] problem in Http Get method..can any one tell me pls...

2009-08-31 Thread ragavendran s
Can anyone tell what is the problem in the given code to retrieve

 the data from the local server by using Http Get method..pls give some

example code..i tried but if i give the url the result i m getting same
url

in the text view...shall any one point out wat the error in the code


pls point out the errors...

With regards,
Raghav.S



package req.http1;


import java.io.IOException;
import java.io.InputStream;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.impl.client.DefaultHttpClient;

import android.app.Activity;
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;

public class reqhttp extends Activity {
TextView text;
 EditText edt;
 Button btn;
 String n=null;
 String contentOfMyInputStream1;
 String output = null;


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

edt=(EditText)findViewById(R.id.edt);
text=(TextView)findViewById(R.id.text);
btn=(Button)findViewById(R.id.btn);




btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
text.setText();
// Thread thread = new Thread();
 String st1;

 st1=edt.getText().toString();
//thread.start();


try {
 output =http://localhost:8080/Serv1/servlet/Servlet1?st1=
+st1;
downloadUrl(output);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (output != null)
{
text.setText(output);
}


}
});


}

public String downloadUrl(String url) throws  IOException{
HttpClient httpclient = new DefaultHttpClient();
HttpRequestBase httpRequest = null;
HttpResponse httpResponse = null;
InputStream inputStream = null;
String response = ;
StringBuffer buffer = new StringBuffer();

httpRequest = new HttpGet(url);

httpResponse = httpclient.execute(httpRequest);
inputStream = httpResponse.getEntity().getContent();
int contentLength = (int)
httpResponse.getEntity().getContentLength();
if (contentLength  0){
   // Log.e(TAG, The HTTP response is too long.);
}
byte[] data = new byte[256];
int len = 0;
while (-1 != (len = inputStream.read(data)) )
{
buffer.append(new String(data, 0, len));
}

inputStream.close();

response = buffer.toString();

return response;

}


}

--~--~-~--~~~---~--~~
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] chrome os can execute apk?

2009-08-31 Thread freeanderson

of course i don't know google's plan.
i just hope it. through emulation though.

how about android-sdk for chrome application?
the idea is just recompiling to make execution file for google chrome
os.

how about the sdk for windows?
it's for windows platform.

is there any supporting like this? or plan?
if no, i want 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] Using an Android Phone as a Host Device

2009-08-31 Thread Kit

Im trying to find out if it is possible to use an Android device (such
as the G1, Touch or any other Android device)

 I know that the G1 for instance has a usb port however I have been
told it can not be used as a host device, I'm wondering if this can be
overcome or if the usb port may be used as a serial connection for
sending and receiving to other serial devices. By using the info found
in this discussion:

http://groups.google.com/group/android-platform/browse_thread/thread/439d3f3af7a88a09/10a80eb835e8dbcc?lnk=gstq=serialpli=1

One problem might be the 5v issue mentioned however I would be
powering the external devices separately so I'm not worried about it.
But I feel It should still be addressed in case anyone else were to
use their device for similar sensors and controllers.

The devices i would like to control are the ones found at: 
http://www.pololu.com/

Motor Controllers, Servo Controllers, Sonar Distance Sensors, Ect.


 That is obviously concern number one, concern number two is the
software side of things which i feel will be easy in comparison. I
envision using sliders to control outputs and an area for inputs. Also
a programing screen where one could use the sliders/inputs to write
a programed sequence of events, Possible even by using a code based
input box.

Anyone that has any interest or knows how to accomplish any of this
please let me know or just add to the discussion.
--~--~-~--~~~---~--~~
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] My ADC2 entry is not complete yet Can I submit Upgrade.

2009-08-31 Thread rizwan

hi ,
My ADC2 entery is not yet complete can I submit upgrade later and what
will be the deadline for that upgrade submission . as i did submit my
incomplete entry but have to upgradge it before Judging I can see the
upgrade option but my question is what is the deadline for that
upgrade ?

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] Faded edges on View

2009-08-31 Thread Deren

I have a custom ViewGroup. Now I'd like it to have faded edges (like
ListViews when you scroll them and such). How can this be done?
(assuming that the View-class supports 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] Re: Who is responsible for validation of layout xml file?

2009-08-31 Thread Susan

Anybody can help me?

Susan wrote:
 Thanks for your help!
 But I really can't find where ADT does it.
 In build method of
 com.android.ide.eclipse.adt.build.PreCompilerBuilder.java:
  // launch the command line process
  Process process = Runtime.getRuntime().exec(
 array.toArray(new String[array.size
 ()]));

   // list to store each line of stderr
   ArrayListString results = new ArrayListString();

  // get the output and return code from the process
   execError = grabProcessOutput(process, results);

 It seems that after invoke aapt in first line and then we get the
 error message from aapt process.
 Could you please give me a hint?

 Thanks again.

 Balwinder Kaur (T-Mobile USA) wrote:
  ADT.
 
  Balwinder Kaur
  Open Source Development Center
  ·T· · ·Mobile· stick together
 
  The views, opinions and statements in this email are those of the
  author solely in their individual capacity, and do not necessarily
  represent those of T-Mobile USA, Inc.
 
 
  On Aug 27, 2:18 am, Susan smxb...@gmail.com wrote:
   Who is responsible for validation of xml file when editing xml in
   Android layout editor?  For example, when I set a negtive valut to
   android:maxLength of TextView, it will be marked in red. ADT or aapt
   is responsible for check?
  
   Your help will be appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: My ADC2 entry is not complete yet Can I submit Upgrade.

2009-08-31 Thread Mark Murphy

rizwan wrote:
 My ADC2 entery is not yet complete can I submit upgrade later and what
 will be the deadline for that upgrade submission .

5. CHALLENGE TIMELINE: All Entries must be submitted before the end of
the Submission Period. The Submission Period ends at 11:59:59 P.M.
Pacific Time (PT) Zone in the United States on August 31, 2009.

http://code.google.com/android/adc/adc2_terms.html

You have less than 24 hours.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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: No com.android.camera.CropImage on HTC Magic?

2009-08-31 Thread admin.androidsl...@googlemail.com

Same issue here - both crop and wallpaper.

Please advise the correct techniques to call these across all phones.



On Aug 29, 5:15 pm, Dianne Hackborn hack...@android.com wrote:
 This is not part of the SDK.  You dug up the internal package and class name
 from somewhere, which happens to exist on the G1, but there is no guarantee
 it will exist on other devices (nor that it won't change in a future update
 to the G1).



 On Fri, Aug 28, 2009 at 3:16 PM, Klaus Kartou kar...@gmail.com wrote:
  Hi,

  I have a pretty urgent issue. I am using the CropImage intent on my G1 Dev
  phone to crop images.
  However when starting this intent on a HTC Magic I get an error indicating
  the activity cannot be found:

  Unable to find explicit activity class
  {com.android.camera/com.android.camera.CropImage}

  Why is this activity not present on HTC Magic?
  Any input is much appreciated.

  Best regards,

 --
 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: Faded edges on View

2009-08-31 Thread Deren

I solved this by using
setFadingEdgeLength and setVerticalFadingEdgeEnabled. I also had to
override getBottomFadingEdgeStrength/getTopFadingEdgeStrength. Is this
the correct way of doing it? My ViewGroup handles scrolling
internally, so I cannot use the fact the Views get faded edges on
regular scrolling

--~--~-~--~~~---~--~~
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] Expose service interface to other application

2009-08-31 Thread Lutz Schönemann

Hi,

I have created a service and want to expose the interface to other  
applications. For one service I have done this successfuly. I just put  
the AIDL interface into the new project and all worked fine. Now for  
this service I've done the same but I get a java.lang.VerifyError when  
trying to use this interface. I think that the problem is that the  
AIDL uses a class (PolicyRole) that is only defined in the source code  
of the service. To compile the source that uses the interface I had to  
link against the code of the service but at runtime the error appears.




The AIDL for the interface I want to use

--- 8 ---  8 ---  8 ---

package de. [...] . [...] .softwarepolicy.pep;

import de. [...] . [...] .softwarepolicy.pep.roles.PolicyRole;

interface IPEPServiceManagement {
ListPolicyRole getAvailableRoles(in int type);

void setRoles(inout String[] roles);

ListPolicyRole getActiveRoles(in int type);

void updateRoles(String uri);
void reloadRoles();
}

--- 8 ---  8 ---  8 ---



the AIDL for the class PolicyRole that is used in the previous AIDL

--- 8 ---  8 ---  8 ---

package de.fraunhofer.sit.softwarepolicy.pep.roles;

parcelable PolicyRole;

--- 8 ---  8 ---  8 ---


The code for the class PolicyRole is only inside the services project  
so I added the service to the build path and the compile doesn't  
complain..


can someone give me a hint how to expose a service the right way?

Thanks

smime.p7s
Description: S/MIME cryptographic signature


[android-developers] Re: Who will be viewing apps during Round 1 and Round 2 of the ADC2

2009-08-31 Thread Mark Murphy

bkbonner wrote:
 1.  The judges for Round 1, are they only people from Google? 

The judges for Round 1 are anybody who downloads, installs, and uses the
judging application.

8. FIRST ROUND JUDGING: After the Submission Period ends, all eligible
Entries will be judged by end users of Android-powered handsets who
choose to participate in judging (Community Judges).

http://code.google.com/android/adc/adc2_terms.html

 Will
 the masses be able to SEE the application and install it during Round
 1.

Only the subset of masses who choose to participate, and of that, only
the sub-subset who randomly receive your application to judge.

 3.  Will the users for Round 2 be any user with an Android phone, or
 can they run it from the Emulator or some other mechanism?

b. JUDGING: All Qualifying Entries for the Second Round Judging will be
judged by (1) end users of Android-powered handsets who choose to
participate in judging, whether or not they participated in First Round
Judging (Community Judges), and (2) a panel of experts in the fields
of mobile devices, cellular telecommunications, software development,
and/or technology innovation (Expert Judges). Google will select the
Expert Judges from the member organizations of the Open Handset
Alliance, from Google, or from other organizations. 

As with the First Round Judging, any end user of an Android-power
handset running Android 1.5 or higher with access to the Android Market
will be able to download a special, free judging application (Judging
Application) that will allow the end user to randomly download
Qualifying Entries.

http://code.google.com/android/adc/adc2_terms.html

Since the Android Market is not generally available for emulators, the
vast majority of judges should be using hardware. That hardware, though,
will run the gamut from T-Mobile G1's bought they first day they were
sold to the latest handsets from new Android manufacturers.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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: Package my common code as library

2009-08-31 Thread Mark Murphy

Siu Man Yu wrote:
 I have done some cusomtizations on general user interface behavior.
 
 I would put those features into my applications. Therefore, I package
 my source code as a jar and add this external library to my
 applications.
 
 As my cusomtization include some inflation of xml files, I put those
 resource in my package. However, when I finished compiled my
 application and ran it, it reports error. It seems cannot locate the
 xml file in the jar. (My debugger stop while inflate the xml file).
 
 Do I miss any step to use my jar file?

JARs cannot package resources, and JARs cannot use R.* identifiers
(e.g., R.layout.main).

Distribute your resources separately and have applications using your
JAR merge your resources into their resource directory tree. Then,
modify your API to access resource identifiers as parameters, or use
getResources().getIdentifier() to (slowly) look them up by name.

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

Looking for Android opportunities? http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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: Any method to access the /data portion on the phone?

2009-08-31 Thread Mark Murphy

sharon wrote:
 I want to store some images into the /data folder,is it possible?

No. Store them in your application-private files directory (via
openFileOutput() or getFilesDir()), or store them on the SD card (see
the Environment class for getting the path to the SD card).

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

Looking for Android opportunities? http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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: No com.android.camera.CropImage on HTC Magic?

2009-08-31 Thread Mark Murphy

admin.androidsl...@googlemail.com wrote:
 Same issue here - both crop and wallpaper.
 
 Please advise the correct techniques to call these across all phones.

In terms of cropping:

Option #1: Upload it to a Web service that handles cropping, and let it
do the work

Option #2: Find a third-party JAR that handles cropping, and let it do
the work

Option #3: Implement cropping algorithms yourself

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

Looking for Android opportunities? http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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: Can not access my own service

2009-08-31 Thread Lutz Schönemann
I've tested it with a system permission (android.permission.INTERNET)  
and it worked fine. But what is wrong with the permission definition :


--- 8 --- 8 --- 8 ---
permission android:protectionLevel=dangerous android:name=de.  
[...] . [...] .softwarepolicy.pdp.PDPManagement  
android:description=@string/pdpmanagement_permission_description/ 
permission

--- 8 --- 8 --- 8 ---

The three dots are not in the definition. parts of the right URL are  
just replaced.



Am 28.08.2009 um 17:35 schrieb Roman ( T-Mobile USA):



Only for testing purpose, instead of using your own created
permission, use an already defined system permission and check whether
your code works fine. If yes, you know that there are some problems
with how you define and expose your own permission.

--
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 Aug 28, 3:29 am, Lutz Schönemann
lutz.schoenem...@sit.fraunhofer.de wrote:

Hi, my current problem is to access my own service. The thing is I
have 2 interfaces for my service and want to restrict one of them to
applications that have a special permission.

I have a service and an activity in one package. The application has
that special permission but I always get a security exception:

I've tried the to following things:

1) put the check inside the onBind() method:

@Override
public IBinder onBind(Intent intent) {
if(intent.getAction() != null 
 
intent.getAction().equals(ACTION_SERVICE_MANAGEMENT)) {

// check permission
 
if(checkCallingPermission(PERMISSION_MANAGEMENT) ==

PackageManager.PERMISSION_DENIED) {
Log.d(TAG, Checked for permission:  
 + PERMISSION_MANAGEMENT +

\nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
throw new SecurityException();
}

// return management binder
return mManagementBinder;
}

if(_DEBUG) Log.d(TAG, onBind finished);
// call was not local so return public binder
return mBinder;
}

2) ptu the check inside a method of the binder it self:

private IServiceManagement.Stub mManagementBinder = new
IServiceManagement.Stub() {

public String[] getRoles() throws RemoteException {
return PDPService.this.getRoles();
}

public void updatePolicy(String policyuri) {
// check permission
 
if(checkCallingPermission(PERMISSION_MANAGEMENT) ==

PackageManager.PERMISSION_DENIED) {
Log.d(TAG, Checked for permission:  
 + PERMISSION_MANAGEMENT +

\nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
throw new SecurityException();
}
Uri uri = Uri.parse(policyuri);
Service.this.updateFile(uri,  
Service.POLICY_FILE);

}
}

both cases end with a security exception (the one I throw). The  
result

of checkCallingPermission is always -1
(PackageManager.PERMISSION_DENIED). I have doublechecked that the  
name

of the permission in code is the same as the one specified in the
manifest file.

What am I doing wrong?

Thanks for help

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






smime.p7s
Description: S/MIME cryptographic signature


[android-developers] Re: Can not access my own service

2009-08-31 Thread Lutz Schönemann
That is right that the service it self has the uses-permission tag  
in the AndroidManifest.xml file. But I don't call  
checkCallingOrSelfPermission. I call the checkCallingPermission and  
the result is PERMISSION_DENIED. Normaly I would let android check the  
permissions but I want to expose more than one interface for that  
service and each interface should be accessed with different  
permissions.



Am 28.08.2009 um 20:58 schrieb Balwinder Kaur (T-Mobile USA):



It seems like if you declare a uses-permission in your
AndroidManifest.xml file and you call checkCallingOrSelfPermission
method, it returns PERMISSION_GRANTED. I would be curious though to
know if there is a more elegant way of doing this, or if this is the
expected way.

Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 28, 8:35 am, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:

Only for testing purpose, instead of using your own created
permission, use an already defined system permission and check  
whether

your code works fine. If yes, you know that there are some problems
with how you define and expose your own permission.

--
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 Aug 28, 3:29 am, Lutz Schönemann

lutz.schoenem...@sit.fraunhofer.de wrote:

Hi, my current problem is to access my own service. The thing is I
have 2 interfaces for my service and want to restrict one of them to
applications that have a special permission.



I have a service and an activity in one package. The application has
that special permission but I always get a security exception:



I've tried the to following things:



1) put the check inside the onBind() method:



@Override
public IBinder onBind(Intent intent) {
if(intent.getAction() != null 
 
intent.getAction().equals(ACTION_SERVICE_MANAGEMENT)) {

// check permission
 
if(checkCallingPermission(PERMISSION_MANAGEMENT) ==

PackageManager.PERMISSION_DENIED) {
Log.d(TAG, Checked for  
permission:  + PERMISSION_MANAGEMENT +

\nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
throw new SecurityException();
}



// return management binder
return mManagementBinder;
}



if(_DEBUG) Log.d(TAG, onBind finished);
// call was not local so return public binder
return mBinder;
}



2) ptu the check inside a method of the binder it self:



private IServiceManagement.Stub mManagementBinder = new
IServiceManagement.Stub() {



public String[] getRoles() throws RemoteException {
return PDPService.this.getRoles();
}



public void updatePolicy(String policyuri) {
// check permission
 
if(checkCallingPermission(PERMISSION_MANAGEMENT) ==

PackageManager.PERMISSION_DENIED) {
Log.d(TAG, Checked for  
permission:  + PERMISSION_MANAGEMENT +

\nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
throw new SecurityException();
}
Uri uri = Uri.parse(policyuri);
Service.this.updateFile(uri,  
Service.POLICY_FILE);

}
}


both cases end with a security exception (the one I throw). The  
result

of checkCallingPermission is always -1
(PackageManager.PERMISSION_DENIED). I have doublechecked that the  
name

of the permission in code is the same as the one specified in the
manifest file.



What am I doing wrong?



Thanks for help




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






smime.p7s
Description: S/MIME cryptographic signature


[android-developers] Re: Can not access my own service

2009-08-31 Thread Lutz Schönemann
Suddenly it works. The change is, that instead of hardcode the  
permissions name into the code, I used:

Manifest.permission.MY_PERMISSIONS_NAME;





Am 31.08.2009 um 11:41 schrieb Lutz Schönemann:

I've tested it with a system permission  
(android.permission.INTERNET) and it worked fine. But what is wrong  
with the permission definition :


--- 8 --- 8 --- 8 ---
permission android:protectionLevel=dangerous android:name=de.  
[...] . [...] .softwarepolicy.pdp.PDPManagement  
android:description=@string/pdpmanagement_permission_description/ 
permission

--- 8 --- 8 --- 8 ---

The three dots are not in the definition. parts of the right URL are  
just replaced.



Am 28.08.2009 um 17:35 schrieb Roman ( T-Mobile USA):



Only for testing purpose, instead of using your own created
permission, use an already defined system permission and check  
whether

your code works fine. If yes, you know that there are some problems
with how you define and expose your own permission.

--
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 Aug 28, 3:29 am, Lutz Schönemann
lutz.schoenem...@sit.fraunhofer.de wrote:

Hi, my current problem is to access my own service. The thing is I
have 2 interfaces for my service and want to restrict one of them to
applications that have a special permission.

I have a service and an activity in one package. The application has
that special permission but I always get a security exception:

I've tried the to following things:

1) put the check inside the onBind() method:

   @Override
   public IBinder onBind(Intent intent) {
   if(intent.getAction() != null 

intent.getAction().equals(ACTION_SERVICE_MANAGEMENT)) {

   // check permission

if(checkCallingPermission(PERMISSION_MANAGEMENT) ==

PackageManager.PERMISSION_DENIED) {
   Log.d(TAG, Checked for permission:  
 + PERMISSION_MANAGEMENT +

\nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
   throw new SecurityException();
   }

   // return management binder
   return mManagementBinder;
   }

   if(_DEBUG) Log.d(TAG, onBind finished);
   // call was not local so return public binder
   return mBinder;
   }

2) ptu the check inside a method of the binder it self:

   private IServiceManagement.Stub mManagementBinder = new
IServiceManagement.Stub() {

   public String[] getRoles() throws RemoteException {
   return PDPService.this.getRoles();
   }

   public void updatePolicy(String policyuri) {
   // check permission

if(checkCallingPermission(PERMISSION_MANAGEMENT) ==

PackageManager.PERMISSION_DENIED) {
   Log.d(TAG, Checked for permission:  
 + PERMISSION_MANAGEMENT +

\nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
   throw new SecurityException();
   }
   Uri uri = Uri.parse(policyuri);
   Service.this.updateFile(uri,  
Service.POLICY_FILE);

   }
   }

both cases end with a security exception (the one I throw). The  
result

of checkCallingPermission is always -1
(PackageManager.PERMISSION_DENIED). I have doublechecked that the  
name

of the permission in code is the same as the one specified in the
manifest file.

What am I doing wrong?

Thanks for help

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








smime.p7s
Description: S/MIME cryptographic signature


[android-developers] Is it possible to make pure VOIP for Android?

2009-08-31 Thread echo

Hi. I'm new to Android. I've search a lot about VOIP for Android and I
found Skype, Nimbuzz, iSkoot, etc.
But sadly it's not pure VOIP.
My question for all the Android experts.
Is it possible to make an application to do pure VOIP using Android?
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: Who will be viewing apps during Round 1 and Round 2 of the ADC2

2009-08-31 Thread Che

Will the judging application be available to people with unlocked
phones?

On Aug 31, 4:59 pm, Mark Murphy mmur...@commonsware.com wrote:
 bkbonner wrote:
  1.  The judges for Round 1, are they only people from Google?

 The judges for Round 1 are anybody who downloads, installs, and uses the
 judging application.

 8. FIRST ROUND JUDGING: After the Submission Period ends, all eligible
 Entries will be judged by end users of Android-powered handsets who
 choose to participate in judging (Community Judges).

 http://code.google.com/android/adc/adc2_terms.html

  Will
  the masses be able to SEE the application and install it during Round
  1.

 Only the subset of masses who choose to participate, and of that, only
 the sub-subset who randomly receive your application to judge.

  3.  Will the users for Round 2 be any user with an Android phone, or
  can they run it from the Emulator or some other mechanism?

 b. JUDGING: All Qualifying Entries for the Second Round Judging will be
 judged by (1) end users of Android-powered handsets who choose to
 participate in judging, whether or not they participated in First Round
 Judging (Community Judges), and (2) a panel of experts in the fields
 of mobile devices, cellular telecommunications, software development,
 and/or technology innovation (Expert Judges). Google will select the
 Expert Judges from the member organizations of the Open Handset
 Alliance, from Google, or from other organizations. 

 As with the First Round Judging, any end user of an Android-power
 handset running Android 1.5 or higher with access to the Android Market
 will be able to download a special, free judging application (Judging
 Application) that will allow the end user to randomly download
 Qualifying Entries.

 http://code.google.com/android/adc/adc2_terms.html

 Since the Android Market is not generally available for emulators, the
 vast majority of judges should be using hardware. That hardware, though,
 will run the gamut from T-Mobile G1's bought they first day they were
 sold to the latest handsets from new Android manufacturers.

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

 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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: Is it possible to make pure VOIP for Android?

2009-08-31 Thread Mark Murphy

echo wrote:
 Hi. I'm new to Android. I've search a lot about VOIP for Android and I
 found Skype, Nimbuzz, iSkoot, etc.
 But sadly it's not pure VOIP.
 My question for all the Android experts.
 Is it possible to make an application to do pure VOIP using Android?

See sipdroid.org.

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.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: ADC 2 Submission Site -- Now live

2009-08-31 Thread Nicholas Albion

Me too!

I uploaded it, filled out the description and pressed save.  The
developer console site said that it was uploaded but not submitted.
I then checked that my profile details were right, cancelled out of
that and went back to submit.

The developer's console site says No applications uploaded but then
if I try to re-upload the same non-modified apk it says that an
application already exists on the market (which it doesn't) or ADC2
(which I'm confused about because of the lack of confirmation).

I read on here that we'd be able to modify the application (and I
would assume we'd be able to visually confirm that it had been
submitted to the comp)

(I'm not registered with the Market if that makes any difference)

On Aug 27, 12:08 pm, Wesley sit06...@gmail.com wrote:
 hi All,

 I have problem of submit my app...
 1st times I try to upload it to ADC...
 so I start browse my apk...
 then the site will auto upload I think...
 but before I click save button, suddenly my browser got problem or I mistype
 some shortcut key or what... my browser quit...

 then I open my browser back try to upload again, it said I already uploaded,
 and ask me to upgrade the copy I upload at others application, but I can't
 find any others application to continue my unsaved entries...
 so what should I do???

 Wesley.
--~--~-~--~~~---~--~~
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] DISABLE_DEXPREOPT ?

2009-08-31 Thread Victor

Dear All,

Who knows, what is DISABLE_DEXPREOPT parameter managing?
What for used dexpreopt feature? What is this useful/useless for?

Thanks in advance.
Victor.
--~--~-~--~~~---~--~~
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] Use classes defined inside other applications

2009-08-31 Thread Lutz Schönemann

Hi,

is it possible to use classes that are defined in other applications?

I have two dependent projects and want to use classes from one project  
inside the other. I use eclipse and in the project preferences   
Project References I checked the other project. In addition I added  
the Project/bin-path of the first project to the seconds project  
libraries. Both apps are installed on a device but I get a  
VerifyError. How is it possible to use classes from an other  
application? I don't want to copy the code into the second project!


Thanks for help

smime.p7s
Description: S/MIME cryptographic signature


[android-developers] Getting Contents of LinearLayout Flashing When Pressed

2009-08-31 Thread Don

Hi All,
Is there way to get the contents of a LinearLayout to flash when it is
pressed? The same as a ListItem flashes orange when pressed.
Best Regards,
Don
--~--~-~--~~~---~--~~
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: chrome os can execute apk?

2009-08-31 Thread String

I think you should go back and read the announcements about Chrome OS.
Word is it will be an Internet-only OS; the ONLY applications it
will run are web apps. As in delivered over the web.

Don't expect it to run native apps of any sort, be they Android,
Linux, or anything else. At least, not at a level that any user will
see. It may be built on top of a Linux kernel, but I expect that'll be
invisible to users.

String

On Aug 31, 8:35 am, freeanderson freeander...@gmail.com wrote:
 of course i don't know google's plan.
 i just hope it. through emulation though.

 how about android-sdk for chrome application?
 the idea is just recompiling to make execution file for google chrome
 os.

 how about the sdk for windows?
 it's for windows platform.

 is there any supporting like this? or plan?
 if no, i want 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] Why the buffer is 0 when I play the rtsp movie from the internet?

2009-08-31 Thread yjshi

Why the buffer is 0 when I play the rtsp movie from the internet?
I wrote a appliaction to play the movie from the internet.I try many
times and could not found out the reason ,so I decided to have a look
at opencore source code.
I look at the opencore source code ,and I find that it is the most
important code is below.But I could not find out how the percentage is
increasing .So I could not find out where the reason caused all
these.could someone give me a hand?
——
void PlayerDriver::HandleInformationalEvent(const
PVAsyncInformationalEvent aEvent)
{
..
 case PVMFInfoBufferingStatus:
{
const void *buffer = aEvent.GetLocalBuffer();
const size_t size = aEvent.GetLocalBufferSize();
int percentage;
if (GetBufferingPercentage(buffer, size, percentage))
{

//This place print the log D/PlayerDriver(   31):
buffering (0)
LOGD(buffering (%d), percentage);

mPvPlayer-sendEvent(MEDIA_BUFFERING_UPDATE,
percentage);
}
}
break;
..

-
bool GetBufferingPercentage(const void *buffer,
const size_t size,
int *percentage)
{
if (buffer == NULL) {
LOGI( GetBufferingPercentage  Invalid buffer: NULL);
LOGE(Invalid buffer: NULL);
return false;
}
if (sizeof(int) != size)
{
LOGE(Invalid percentage buffer size %d (expected %d), size,
sizeof(int));
return false;
}
// TODO: The PVEvent class should expose a memcopy method
// that does bound checking instead of having clients reaching
// for its internal buffer.
// Clamp the value and complain loudly.
oscl_memcpy(percentage, buffer, sizeof(int));


if (*percentage  0 || *percentage  100)
{
LOGE(Invalid percentage value %d, *percentage);
return false;
}
return true;
}
-
log
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)

while play the http movie ,it's ok;
and now I don't konw where the percentage is not increasing ,and how
the percentage is increasing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android 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: Suggestions on how to stop threads with long operations?

2009-08-31 Thread jsdf

Does anyone out there have thoughts on this?
Thanks,
jsdf

On Aug 28, 5:56 pm, jsdf jasons...@gmail.com wrote:
 Hi Android experts,
 I have a tricky question that I would like some advice on.

 I have a thread that does a large amount of network and database
 work.  E.g.:

 new Thread(new Runnable() {
   public void run() {
     String largeData = getLargeDataFromServer();
     Object largeObject = xmlParser.parseFromXml(largeData);
     saveLargeObjectToDatabase();
     putLargeDataToSecondServer();
   }

 }).start();

 The problem I have is that I need to stop this thread at any point.
 It does not need to stop absolutely immediately, but given limited
 network and memory on the phone, the sooner I can stop it the better.

 I currently am testing and stopping with a method similar to this:

 new Thread(new Runnable() {
   public void run() {
     if (shouldStop) return;
     String largeData = getLargeDataFromServer();
     if (shouldStop) return;
     Object largeObject = xmlParser.parseFromXml(largeData);
     if (shouldStop) return;
     saveLargeObjectToDatabase();
     if (shouldStop) return;
     putLargeDataToSecondServer();
   }

 }).start();

 This makes me very uncomfortable, and litters my code with these
 shouldStop statements.  Furthermore, if the system is in any of the
 four long functions, that function has to complete before the test can
 actually happen.

 I notice that there is a Thread.stop(), but the comments warn against
 using it.

 Does anyone have suggestions on how to reconfigure the thread so I can
 stop relatively quickly and regardless of whether execution is in one
 of its subfunctions?

 Thanks so much in advance,
 jsdf
--~--~-~--~~~---~--~~
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: Use classes defined inside other applications

2009-08-31 Thread Alessio Grumiro
you have to create a jar file and import jar library in other projects

2009/8/31 Lutz Schönemann lutz.schoenem...@sit.fraunhofer.de

 Hi,

 is it possible to use classes that are defined in other applications?

 I have two dependent projects and want to use classes from one project
 inside the other. I use eclipse and in the project preferences  Project
 References I checked the other project. In addition I added the
 Project/bin-path of the first project to the seconds project libraries. Both
 apps are installed on a device but I get a VerifyError. How is it possible
 to use classes from an other application? I don't want to copy the code into
 the second project!

 Thanks for help

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



[android-developers] Problems with ADC upload

2009-08-31 Thread longhairedsi

Hi

I've been trying to upload my adc submission. I keep getting an error
saying Upload a valid APK. can anyone elaborate on what this
means I've followed the checklist for publisihing and tested on my
g1 and it all seems fine. Why can't I upload? What constitutes as a
valid apk?

Thanks
Simon
--~--~-~--~~~---~--~~
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: Layouts for base Android applications

2009-08-31 Thread stanlick

This message suffered quite a delay before being visible on this
group, and ended up many pages down in the stack!  Does anyone know
where the UI's are for the basic applications?



On Aug 27, 12:04 pm, stanlick stanl...@gmail.com wrote:
 Where in the source are the layouts for the built-in UI's?  I would
 like to reuse (copy) a couple of the contact UI's rather than recreate
 the wheel.

 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] 16M application heap limit

2009-08-31 Thread WoodManEXP

Does the 1.5 SDK still have the 16mB application heap limit? Is there
any way to change it? Do you think this limit will persist into the
forseeable future?
--~--~-~--~~~---~--~~
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] Constructor problem

2009-08-31 Thread sweet

I've a problem with this code:

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

public static  ArrayListArrayList renvoi_liste_recette_xml() throws
Exception{


  ArrayListArrayList aTableRetour = new ArrayListArrayList();
  URL myURL = new URL(http://benji.roullet.free.fr/recette.xml;);
  DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance
();
  DocumentBuilder constructeur = fabrique.newDocumentBuilder();
  Document document = constructeur.parse(myURL.openStream());
  Element racine = document.getDocumentElement();
  NodeList liste = racine.getElementsByTagName(recette);
  for(int i=0; iliste.getLength(); i++){
  ArrayListString aTableauTmp =  new ArrayListString();
  Element E1= (Element) liste.item(i);
  //aTableRetour[i]= ;
  aTableauTmp.add(E1.getAttribute(nom));
  aTableRetour.add(aTableauTmp);
  }

  return aTableRetour;

}
ArrayList listeRecette = renvoi_liste_recette_xml();

ListView mRecetteList = (ListView) findViewById(android.R.id.list);
SimpleAdapter mSchedule = new SimpleAdapter(this, listeRecette ,
R.layout.item,
   new String[] {titre}, new int[] { R.id.titre});

}

Eclipse say that Default constructor cannot handle exception type
Exception thrown by implicit super constructor. Must define an
explicit constructor but I don't understand what it's mean.
Someone can help me please ?
--~--~-~--~~~---~--~~
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] java.net.HttpURLConnection throws Received authentication challenge is null

2009-08-31 Thread Matthias

I am using HttpURLConnection to send a GET request to a server. Upon
reading the response code, the Android implementation of
HttpURLConnection.doRequestInternal() throws an exception:

java.io.IOException: Received authentication challenge is null

I don't even get what the error is trying to tell me. I write an OAuth
param string to the Authorization header, but this works fine on other
occasions. There is nothing peculiar about my request apart from that.

Any idea what this means, what is causing this and how to get around
it? This works fine with Sun's Java implementation, so I guess it's a
problem with Apache Harmony?

Thanks!
Matthias
--~--~-~--~~~---~--~~
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: 16M application heap limit

2009-08-31 Thread Mark Murphy

 Does the 1.5 SDK still have the 16mB application heap limit?

Yes.

 Is there any way to change it?

Not from the SDK. You might be able to change it with custom firmware.

 Do you think this limit will persist into the
 forseeable future?

Until you start seeing significant numbers of Android devices with a lot
more RAM, my guess is yes, but that's a guess.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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: Threads and Screen Orientation Change

2009-08-31 Thread ReubenH

Having used Android for 4 months, and now having a game doing well in
the market, I am still wondering why a rotation change results in
Activity creation / destruction in the first place? It has never made
sense... why not an onLayoutChanged() type of event instead?

It seems wasteful and counterintuitive to create new activities when
the activity hasn't actually changed...

I'd love to know the reason for it, am sure I am probably missing
something obvious.

Thanks,


-- Reuben

On Aug 31, 2:39 am, CraigsRace craig...@gmail.com wrote:
 Dianne: Yes, using a static Handler is a solution.  Although, IMO,
 it's not the most eloquent solution.  But it will work, so I should be
 happy.  :)

 On Aug 31, 11:19 am, Dianne Hackborn hack...@android.com wrote:



  And you shouldn't be doing this.  You could have a static pointing to the
  currently running activity instance (which very well may be null, which is a
  valid state, and something your thread needs to deal with anyway).  Often
  you do this by giving the thread just a Handler to communicate back with the
  main thread, which the activity implements as a static along with a static
  of the current activity instance.  So your thread posts a message to display
  a dialog, and then on the main thread you get that message and handle it on
  whichever activity instance is the current one.

  On Sun, Aug 30, 2009 at 4:10 PM, CraigsRace craig...@gmail.com wrote:

   Mark: Sorry, I deleted my original post (very rude, I know!), as I
   decided to just go ahead and write a solution myself (see previous
   post).

   As for starting multiple threads, yes, they will hold on to the old
   Activities.  However, that's what happens right now, no?  In fact,
   that's the whole problem, when the threads try to do UI, they are
   referring to the old activities.

   On Aug 31, 8:26 am, Mark Murphy mmur...@commonsware.com wrote:
CraigsRace wrote:
 I'm obviously missing something, as I thought the Thread would be the
 only thing holding onto the old Activity (as it is now).  When the
 Thread dies, the old activity would be garbage collected (as it does
 now).  All forwarding would be done via the Activity class.

Correct, but what Ms. Hackborn wrote was:

 And that still means it needs to keep the old activity around so the
thread
 can use it.

So, given that, imagine this scenario:

-- Activity instance A starts
-- You fork a background thread, holding onto A, that will run for 30
seconds, as a result of a button click
-- At 0:02 into the thread, the user rotates the screen
-- Android creates a new activity instance (B), and has A point to B for
the purposes of your call forwarding stuff
-- At 0:05 into the first thread, you fork another thread, holding onto
B, that will run for 30 seconds, as a result of a button click
-- At 0:07 into the thread, the user rotates the screen again (bear in
mind that for non-QWERTY devices, it doesn't take much to cause the
screen to rotate)
-- Android creates a new activity instance (C), and has B point to C for
the purposes of your call forwarding stuff

At this point, we have three total instances of the activity running (A,
B, C), and we still have 23 seconds of the original 30 to work with.
Factor in the possibility of developers having threads that run for 30
days instead of 30 seconds.

In your specific example, coded properly, the forwarding mechanism may
work fine, if your thread is very short lived (a couple of seconds),
won't get started again, and your activities are not terribly complex.
It's when you start to violate those assumptions (coded improperly,
lotsa threads, long threads, complex activities) that memory issues
become more painful.

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

Warescription: Three Android Books, Plus Updates, $35/Year

  --
  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: Constructor problem

2009-08-31 Thread sweet

Eclipse say that for the line:
ArrayList listeRecette = renvoi_liste_recette_xml();
--~--~-~--~~~---~--~~
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 status of Donut and HTC hero

2009-08-31 Thread johnny

Hi,

Any one knows the status of Donut. There is already leaked HTC Hero
phone. I wonder which version that Hero phone will be based.

Regards,
Johnny Xia.
--~--~-~--~~~---~--~~
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 with ADC upload

2009-08-31 Thread fhucho

Is your app signed? But if you tested it on your G1 it probably is...

On Aug 31, 2:26 pm, longhairedsi longhaire...@googlemail.com wrote:
 Hi

 I've been trying to upload my adc submission. I keep getting an error
 saying Upload a valid APK. can anyone elaborate on what this
 means I've followed the checklist for publisihing and tested on my
 g1 and it all seems fine. Why can't I upload? What constitutes as a
 valid apk?

 Thanks
 Simon
--~--~-~--~~~---~--~~
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: Threads and Screen Orientation Change

2009-08-31 Thread Mark Murphy



 Having used Android for 4 months, and now having a game doing well in
 the market, I am still wondering why a rotation change results in
 Activity creation / destruction in the first place? It has never made
 sense... why not an onLayoutChanged() type of event instead?

 It seems wasteful and counterintuitive to create new activities when
 the activity hasn't actually changed...

 I'd love to know the reason for it, am sure I am probably missing
 something obvious.

For applications using the widget framework (most non-games), Android will
map in fresh resources, as these may differ based upon screen orientation.
So, for example, you get fresh XML layout files, if you have different
ones for landscape versus portrait.

There are ways to tell Android to not destroy and recreate the activity,
if that is not what you want.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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: The status of Donut and HTC hero

2009-08-31 Thread Mark Murphy

 Any one knows the status of Donut.

There are no official dates for any Android updates at this time.

 There is already leaked HTC Hero phone.

Leaked? It is shipping in some markets. I saw one or two in Sweden last
week.

 I wonder which version that Hero phone will be based.

It has Android 1.5, plus the HTC Sense proprietary UI.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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: Layouts for base Android applications

2009-08-31 Thread Mark Murphy



 This message suffered quite a delay before being visible on this
 group, and ended up many pages down in the stack!  Does anyone know
 where the UI's are for the basic applications?

Generally, http://source.android.com.

You may find using Google Code Search to be easier than browsing. Add the
package:android search constraint, and it will search only Android
projects.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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: java.net.HttpURLConnection throws Received authentication challenge is null

2009-08-31 Thread Mark Murphy

 I am using HttpURLConnection to send a GET request to a server. Upon
 reading the response code, the Android implementation of
 HttpURLConnection.doRequestInternal() throws an exception:

 java.io.IOException: Received authentication challenge is null

 I don't even get what the error is trying to tell me.

Off the cuff, it would seem as though you're getting a 401 Unauthorized
error, due to a malformed Authorization header.

 This works fine with Sun's Java implementation, so I guess it's a
 problem with Apache Harmony?

That's a distinct possibility.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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] enable ANDROID_ANIMATED_GIF

2009-08-31 Thread Chris Ho


I understand that animated gifs are currently not supported in the
webkit port for Android.
Can this functionality be enabled by turning on the compiler directive
ANDROID_ANIMATED_GIF  (webcore\platform\graphics\android\)?

Will this work or are any other changes needed? Any caveats.

Thanks,
Chris



--~--~-~--~~~---~--~~
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: Camera preview

2009-08-31 Thread tinyang

Thank you Bill for your response!  This has been confounding me for a
while and I've had no idea how to remedy it.  Is it possible for you
to please include a code sample or a link to a code sample?

On Aug 28, 8:45 am, Bill wrobb...@gmail.com wrote:
 There seems to be a bug in the EXTRA_OPTIONS if you're using the
 default camera activity. That is why you are not getting full sized
 pictures.

 If you want to embed the preview you can use the Camera object
 directly.

 On Aug 28, 1:02 am, Pavel pavli...@gmail.com wrote:

  Hey tinyang,

  Could you please share the code you use for picture taking? I am
  working on the same thing and having weird issues with it - it does
  not take full sized pictures for unknown reason...

  And yeah, sorry, no answer to your question from my side at the moment.

  Pavlo

  On Thu, Aug 27, 2009 at 9:14 PM, tinyanggnay...@gmail.com wrote:

   Hello.

   I just got my camera preview working for my app, but it is not
   appearing
   where I want it to appear, and I'm not sure how to get it there.
   Instead of
   using the entire screen for the preview, I would like to put it inside
   a
   surfaceview in an activity xml gui.  What do I need to change?  Here
   is my
   code:

   public class TakePic extends Activity {

   SurfaceView camSurface;

   Preview camPreview;

   @Override

   protected void onCreate(Bundle savedInstanceState) {

   super.onCreate(savedInstanceState);

   requestWindowFeature(Window.FEATURE_NO_TITLE);//hide window title

   camPreview = new Preview(this); //create preview

   setContentView(R.layout.takepic);

   setContentView(camPreview); //set preview as activity content

   camSurface = (SurfaceView) findViewById(R.id.camsurface);

   }
--~--~-~--~~~---~--~~
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: Threads and Screen Orientation Change

2009-08-31 Thread Streets Of Boston

I deal with these situations by just keeping a public static reference
around to the currently active activity. E.g.

public MyActivity extends Activity {
  public static MyActivity ACTIVE_INSTANCE = null;

  protected void onCreate() {
ACTIVE_INSTANCE = this;
...
  }

  protected void onDestroy {
...
ACTIVE_INSTANCE = null; // clean up. important to do this.
  }

  ...
}

And within my background threads, i just use the
MyActivity.ACTIVE_INSTANCE to access any part of MyActivity's gui
elements (getting a handler to post back a message to its gui-thread
and then during the handling of that message, i use
MyActivity.ACTIVE_INSTANCE again to update the GUI, e.g. dismissing
waiting dialogs, updating progess dialogs).

And I check for MyActivity.ACTIVE_INSTANCE being null... just in
case :-)

This assumes that there is at most one instance of an activity around
at any given time.

On Aug 30, 9:23 pm, CraigsRace craig...@gmail.com wrote:
 Romain: Agreed, my solution is bad.

 I still feel like there should be a solution.  I would think a lot of
 developers would want to do UI from a thread (closing a progress
 dialog, etc).  And making them track if the activity has been
 destroyed and recreated seems like something that the framework should
 be able to handle (or at least have some sort of helper class for).

 Also, the Example ProgressDialog with a second thread 
 inhttp://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
 is bad example, as it starts a new thread on every screen rotate, so,
 devs (like me) will move the creation of the thread into the button
 click, and then fall into the issue discussed here where they need to
 track Activity creation/deletion (which there is no example for).

 On Aug 31, 10:36 am, Romain Guy romain...@google.com wrote:



  No, this is not a good solution. There is no guarantee on how long the
  thread will run, which means there is no guarantee on how long the
  Activity (and everything tied to it) will survive.

  On Sun, Aug 30, 2009 at 4:00 PM, CraigsRacecraig...@gmail.com wrote:

   The thread is holding onto the old activity, nothing else references
   it.  When the thread dies, so does the old activity.

   I went ahead and wrote a solution myself by extending the Activity
   class.

   What I wanted to do was:
   1. onSaveInstanceState put a reference to itself (the activity) in the
   Bundle.
   2. onCreate retrieve the reference to the activity in the bundle (if
   it exists), then call the activity telling it about itself.  Ie: It
   tell the old activity about itself (the new activity).
   3. Make showDialog and dismissDialog call out to the new activity (if
   it exists).

   There were 2 problems with this:
   1. showDialog and dismissDialog are marked as final
   2. Bundle doesn't allow Objects to be added to it.

   I worked around this by:
   1. Creating showDialog2 and dismissDialog2 methods.
   2. Not using the Bundle, rather a static variable (this is not a good
   solution, as it is assumes there will only be 1 activity).

   These workarounds mean that it is not a proper solution for all devs
   to use.

   However, the Android framework could easily be enhanced to do this.

   Cheers.

   PS: I was going to attach my code as reference, however, I can't see
   anywhere that I can do this.

   On Aug 31, 1:44 am, Dianne Hackborn hack...@android.com wrote:
   And that still means it needs to keep the old activity around so the 
   thread
   can use it.

   On Sat, Aug 29, 2009 at 9:47 PM, CraigsRace craig...@gmail.com wrote:

It would only be a forward reference (from the destroyed activity to
the new activity), not a back reference.

On Aug 30, 2:34 pm, Romain Guy romain...@google.com wrote:
  However, couldn't the Android framework just forward any requests 
  from
  a destroyed activity, to the newly created Activity, saving us
  developers the pain of handling it ourselves?

 To do this, the framework would have to keep around references to all
 previous Activities pretty much forever. Which would be a large waste
 of resources.

 --
 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

   --
   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.

  --
  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 

[android-developers] Re: Publishing Upgrades on Android Market ... Still Relevant?

2009-08-31 Thread Jason Van Anden

A developer's time is a terrible thing to waste.

This really ought to be revised.

:(


On Sun, Aug 30, 2009 at 8:56 PM, Streets Of
Bostonflyingdutc...@gmail.com wrote:

 This documentation is old.

 Users of Android phones with the Market installed get a notification
 (in the top bar) that one or more applications have been updated by
 their developer.
 Then, when the user opens this notification and clicks on it, it
 brings the user to the Market app showing which app(s) have been
 updated.


 On Aug 30, 1:28 pm, jonna rjo...@gmail.com wrote:
 Could someone answer this question please?

 On Aug 29, 8:46 am, Jason Van Anden jason.van.an...@gmail.com wrote:



  Are the docs on the Developer site regarding Publishing out of date?
  In other words, is the Market still considered Beta and do users
  actually need a web service to compare their versions with so they can
  query the Market for updates?

  This is what is on the Android Developer site:

 http://developer.android.com/guide/publishing/publishing.html

  j- 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] Getting failed to copy 'content' to '/sdcard/content': Read only file system on donut compilation.

2009-08-31 Thread Anand

Hi There

I followed below sequence, and facing below issues while pushing the
content.

1. repo init -u git://android.git.kernel.org/platform/manifest.git -b
donut. By this I got today donut code.
2. repo sync
3. source build/envsetup.sh
4. make -j2

after that

5. mksdcard 1024M sdcard.img
6. emulator -sdcard sdcard.img 

While the emulator is launched successfully, the sdcard is shown as
read only. That is how the content can not be pushed inside.

# ls -l
drwxrwxrwt root root  2009-08-31 19:55
sqlite_stmt_journals
drwxrwx--- system   cache 2009-08-31 19:55 cache
d- system   system2009-08-31 19:55 sdcard
lrwxrwxrwx root root  2009-08-31 19:55 etc - /system/
etc
drwxr-xr-x root root  2009-08-31 14:01 system
drwxr-xr-x root root  1970-01-01 05:30 sys
drwxr-x--- root root  1970-01-01 05:30 sbin
dr-xr-xr-x root root  1970-01-01 05:30 proc
-rwxr-x--- root root10688 1970-01-01 05:30 init.rc
-rwxr-x--- root root 1677 1970-01-01 05:30
init.goldfish.rc
-rwxr-x--- root root   106696 1970-01-01 05:30 init
-rw-r--r-- root root  118 1970-01-01 05:30 default.prop
drwxrwx--x system   system2009-08-31 14:23 data
drwx-- root root  1970-01-01 05:30 root
drwxr-xr-x root root  2009-08-31 19:55 dev



Please let me know incase there is any clue.

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



[android-developers] Re: java.net.HttpURLConnection throws Received authentication challenge is null

2009-08-31 Thread matthias

Hi Mark,

you were right: it was a 401 causing this. The odd thing being, I got
this exception *before* I was actually able to check for a 401 (it was
thrown in getResponseCode()). But now knowing this error represents a
401, I was able to fix it in my code (I was not sending the OAuth
verifier code which was required at this point).

Thanks!

On Aug 31, 3:33 pm, Mark Murphy mmur...@commonsware.com wrote:
  I am using HttpURLConnection to send a GET request to a server. Upon
  reading the response code, the Android implementation of
  HttpURLConnection.doRequestInternal() throws an exception:

  java.io.IOException: Received authentication challenge is null

  I don't even get what the error is trying to tell me.

 Off the cuff, it would seem as though you're getting a 401 Unauthorized
 error, due to a malformed Authorization header.

  This works fine with Sun's Java implementation, so I guess it's a
  problem with Apache Harmony?

 That's a distinct possibility.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.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] Jaimin's Birthday Calendar

2009-08-31 Thread Jaimin Mehta

Hi

I'm setting up a birthday calendar and need your help.  Just click on the link 
below and enter your birthday details.  (It's quick, easy, and you can keep 
your age a secret.)

http://www.birthdayalarm.com/bd2/85580695a218396311b1478139796c627209871d1386

Thanks
Jaimin


--~--~-~--~~~---~--~~
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: onDraw issue? -- what's going on?!

2009-08-31 Thread niko20



  Must be the reason that Electrum Drum
  Machine (the only other Android drum sequencer I've seen) doesn't give
  the user any visual indication of playback position.



Hi,

As the dev of Electrum Drum, I'll tell you the reason - I chose not to
show the position mainly to save precious CPU cycles for the audio
generation thread. Otherwise I can simply post a handler to the UI to
show the current position.

Also, because of the audio buffer there is a small delay from when the
data is actually ready vs. when it plays. So I would have to code to
fit that delay properly.

I just didn't believe it was important enough of a feature at this
time to bother with using more CPU and having more complex code as
well. But it certainly would be possible to show the position from
another thread (which is what I use). Take a look at Electrum's live
mode, it DOES show the current pattern, etc. while it's playing.

-niko
--~--~-~--~~~---~--~~
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: Use classes defined inside other applications

2009-08-31 Thread Lutz Schönemann

I managed it by creating a new Java-Project set the Project  
Reference to that project and also added that project to the Java  
Build Path. Is that identical to creating a jar file and specify it  
in the manifest file?



Am 31.08.2009 um 14:22 schrieb Alessio Grumiro:

 you have to create a jar file and import jar library in other projects

 2009/8/31 Lutz Schönemann lutz.schoenem...@sit.fraunhofer.de
 Hi,

 is it possible to use classes that are defined in other applications?

 I have two dependent projects and want to use classes from one  
 project inside the other. I use eclipse and in the project  
 preferences  Project References I checked the other project. In  
 addition I added the Project/bin-path of the first project to the  
 seconds project libraries. Both apps are installed on a device but I  
 get a VerifyError. How is it possible to use classes from an other  
 application? I don't want to copy the code into the second project!

 Thanks for help


 


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



[android-developers] Re: GLSurfaceView does not invoke OnKeyDown(...)

2009-08-31 Thread tylik

I was in a similar situation with another view and had to override
dispatchKeyEvent(). You can try and see if it helps
--
Best regards,
Dmitry

On Aug 29, 10:43 am, Gameboy r59...@gmail.com wrote:
 I'm trying to use SDK 1.5 for developing app on opengl feautre, but
 GLSurfaceView does not invoke OnKeyDown(...) any more, what's reason?
 App runs on windows emulator.

 There is sample code in SDK document:

  class MyGLSurfaceView extends GLSurfaceView {

      private MyRenderer mMyRenderer;

      public void start() {
          mMyRenderer = ...;
          setRenderer(mMyRenderer);
      }

      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
              queueEvent(new Runnable() {
                  // This method will be called on the rendering
                  // thread:
                  public void run() {
                      mMyRenderer.handleDpadCenter();
                  }});
              return true;
          }
          return super.onKeyDown(keyCode, event);
      }
  }
--~--~-~--~~~---~--~~
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] copy raw data from internal phone storage

2009-08-31 Thread Unrealshade

Hi Android Developers,

I tried to copy my wiped data from my phone, so i have to read raw
data with dd command. I have root and BusyBox v1.14.2 installed, but
when i type:
dd if=/dev/block/mtdblock5 of=/sdcard/testfile
or even just
dd if=/dev/block/mtdblock5
I get:
dd: /dev/block/mtdblock5: Input/output error
Why can't I copy the data? Any help will be greatly appreciated! :)
Thank You

Unrealshade
--~--~-~--~~~---~--~~
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] ADC: I don't see my uploaded application

2009-08-31 Thread fhucho

Hi,
I uploaded my app to ADC, but I don't see it in the developer console.
When I want to upload an updated version it says You have another
application on Android Market or ADC with the same package name
(cz.fhejl.chess). Go to that other application, and click upgrade.
--~--~-~--~~~---~--~~
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: Constructor problem

2009-08-31 Thread Bart van Wissen

The problem is that renvoi_liste_recette_xml() throws an Exception
(you shouldn't do this - either make it more specific or catch the
exception within the method) and the initialization section of your
Activity cannot handle this, because the constructor of Activity
doesn't throw Exception.

Move the initialization of your member variables to (a try/catch block
within) the onCreate callback.


On 31 aug, 15:07, sweet junkybr...@gmail.com wrote:
 Eclipse say that for the line:
 ArrayList listeRecette = renvoi_liste_recette_xml();
--~--~-~--~~~---~--~~
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: Getting failed to copy 'content' to '/sdcard/content': Read only file system on donut compilation.

2009-08-31 Thread Marco Nelissen

What does 'adb shell df' say?


On Mon, Aug 31, 2009 at 7:26 AM, Anandanandss2...@gmail.com wrote:

 Hi There

 I followed below sequence, and facing below issues while pushing the
 content.

 1. repo init -u git://android.git.kernel.org/platform/manifest.git -b
 donut. By this I got today donut code.
 2. repo sync
 3. source build/envsetup.sh
 4. make -j2

 after that

 5. mksdcard 1024M sdcard.img
 6. emulator -sdcard sdcard.img 

 While the emulator is launched successfully, the sdcard is shown as
 read only. That is how the content can not be pushed inside.

 # ls -l
 drwxrwxrwt root     root              2009-08-31 19:55
 sqlite_stmt_journals
 drwxrwx--- system   cache             2009-08-31 19:55 cache
 d- system   system            2009-08-31 19:55 sdcard
 lrwxrwxrwx root     root              2009-08-31 19:55 etc - /system/
 etc
 drwxr-xr-x root     root              2009-08-31 14:01 system
 drwxr-xr-x root     root              1970-01-01 05:30 sys
 drwxr-x--- root     root              1970-01-01 05:30 sbin
 dr-xr-xr-x root     root              1970-01-01 05:30 proc
 -rwxr-x--- root     root        10688 1970-01-01 05:30 init.rc
 -rwxr-x--- root     root         1677 1970-01-01 05:30
 init.goldfish.rc
 -rwxr-x--- root     root       106696 1970-01-01 05:30 init
 -rw-r--r-- root     root          118 1970-01-01 05:30 default.prop
 drwxrwx--x system   system            2009-08-31 14:23 data
 drwx-- root     root              1970-01-01 05:30 root
 drwxr-xr-x root     root              2009-08-31 19:55 dev



 Please let me know incase there is any clue.

 Thanks
 Anand
 


--~--~-~--~~~---~--~~
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: Layouts for base Android applications

2009-08-31 Thread stanlick

Thanks bro!  I'll try that now.

P.S. Where do you get all these tips?

Peace,
Scott

On Aug 31, 8:31 am, Mark Murphy mmur...@commonsware.com wrote:
  This message suffered quite a delay before being visible on this
  group, and ended up many pages down in the stack!  Does anyone know
  where the UI's are for the basic applications?

 Generally,http://source.android.com.

 You may find using Google Code Search to be easier than browsing. Add the
 package:android search constraint, and it will search only Android
 projects.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.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: Getting failed to copy 'content' to '/sdcard/content': Read only file system on donut compilation.

2009-08-31 Thread Chris Stratton

probably adb shell mount  rather than df, if the goal is to see if
anything is mounted, since this would also tell if it's mounted rw or
ro.

However, the permissions of the mount point look a bit suspect,
too...
I have d---rwxrwx on a saphire... suspect some startup script is not
doing it's thing?

On Aug 31, 11:47 am, Marco Nelissen marc...@android.com wrote:
 What does 'adb shell df' say?

 On Mon, Aug 31, 2009 at 7:26 AM, Anandanandss2...@gmail.com wrote:

  While the emulator is launched successfully, the sdcard is shown as
  read only. That is how the content can not be pushed inside.

  # ls -l
  drwxrwxrwt root     root              2009-08-31 19:55
  sqlite_stmt_journals
  drwxrwx--- system   cache             2009-08-31 19:55 cache
  d- system   system            2009-08-31 19:55 sdcard

--~--~-~--~~~---~--~~
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: Is it possible to make pure VOIP for Android?

2009-08-31 Thread Roman ( T-Mobile USA)

What is for you pure VOIP? In case of putting a Voip application on
Android you have to decide which kind of signaling protocol you want
to use

-- XMPP
-- SIP
-- your own signaling

As Mark already posted earlier, SipDroid is a pretty good Voip client
using SIP signaling. You can create an account on pbxes.org and play
around with Voip. Both Wifi and 3G Voip is supported.

--
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 Aug 31, 3:27 am, Mark Murphy mmur...@commonsware.com wrote:
 echo wrote:
  Hi. I'm new to Android. I've search a lot about VOIP for Android and I
  found Skype, Nimbuzz, iSkoot, etc.
  But sadly it's not pure VOIP.
  My question for all the Android experts.
  Is it possible to make an application to do pure VOIP using Android?

 See sipdroid.org.

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

 Android Training in Germany, 18-22 January 2010:http://bignerdranch.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: copy raw data from internal phone storage

2009-08-31 Thread Chris Stratton

You want /dev/mtd/mtd5 or /dev/mtd/mtd5ro  I forget which.  And you
will  need yaffs tools to do anything with the result as most desktop
kernels can't mount a yaffs image (get yaffs out of the android git,
the desktop tools are hiding in its tree).

More generally you should google for the writeup someone did on
Android Forensics

If wipe is to be taken literally you shouldn't find anything... but
maybe it shouldn't be

On Aug 31, 11:04 am, Unrealshade sche...@googlemail.com wrote:
 Hi Android Developers,

 I tried to copy my wiped data from my phone, so i have to read raw
 data with dd command. I have root and BusyBox v1.14.2 installed, but
 when i type:
 dd if=/dev/block/mtdblock5 of=/sdcard/testfile
 or even just
 dd if=/dev/block/mtdblock5
 I get:
 dd: /dev/block/mtdblock5: Input/output error
 Why can't I copy the data? Any help will be greatly appreciated! :)
 Thank You

 Unrealshade
--~--~-~--~~~---~--~~
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: Threads and Screen Orientation Change

2009-08-31 Thread Marco Nelissen

On Mon, Aug 31, 2009 at 6:06 AM, ReubenHreuben.har...@gmail.com wrote:

 Having used Android for 4 months, and now having a game doing well in
 the market, I am still wondering why a rotation change results in
 Activity creation / destruction in the first place? It has never made
 sense... why not an onLayoutChanged() type of event instead?

You can have this too, if that's what you want. You can specify in
your manifest which configuration changes your activity can handle
itself, and you will see your Activity.onConfigurationChanged() called
when such a configuration change happens.
Note however that in that case your activity is responsible for
handling the configuration change, e.g. loading a new layout and
resources if needed, updating all the references your app has to
buttons, lists and other widgets, etc.

 It seems wasteful and counterintuitive to create new activities when
 the activity hasn't actually changed...

 I'd love to know the reason for it, am sure I am probably missing
 something obvious.

 Thanks,


 -- Reuben

 On Aug 31, 2:39 am, CraigsRace craig...@gmail.com wrote:
 Dianne: Yes, using a static Handler is a solution.  Although, IMO,
 it's not the most eloquent solution.  But it will work, so I should be
 happy.  :)

 On Aug 31, 11:19 am, Dianne Hackborn hack...@android.com wrote:



  And you shouldn't be doing this.  You could have a static pointing to the
  currently running activity instance (which very well may be null, which is 
  a
  valid state, and something your thread needs to deal with anyway).  Often
  you do this by giving the thread just a Handler to communicate back with 
  the
  main thread, which the activity implements as a static along with a static
  of the current activity instance.  So your thread posts a message to 
  display
  a dialog, and then on the main thread you get that message and handle it on
  whichever activity instance is the current one.

  On Sun, Aug 30, 2009 at 4:10 PM, CraigsRace craig...@gmail.com wrote:

   Mark: Sorry, I deleted my original post (very rude, I know!), as I
   decided to just go ahead and write a solution myself (see previous
   post).

   As for starting multiple threads, yes, they will hold on to the old
   Activities.  However, that's what happens right now, no?  In fact,
   that's the whole problem, when the threads try to do UI, they are
   referring to the old activities.

   On Aug 31, 8:26 am, Mark Murphy mmur...@commonsware.com wrote:
CraigsRace wrote:
 I'm obviously missing something, as I thought the Thread would be the
 only thing holding onto the old Activity (as it is now).  When the
 Thread dies, the old activity would be garbage collected (as it does
 now).  All forwarding would be done via the Activity class.

Correct, but what Ms. Hackborn wrote was:

 And that still means it needs to keep the old activity around so the
thread
 can use it.

So, given that, imagine this scenario:

-- Activity instance A starts
-- You fork a background thread, holding onto A, that will run for 30
seconds, as a result of a button click
-- At 0:02 into the thread, the user rotates the screen
-- Android creates a new activity instance (B), and has A point to B 
for
the purposes of your call forwarding stuff
-- At 0:05 into the first thread, you fork another thread, holding onto
B, that will run for 30 seconds, as a result of a button click
-- At 0:07 into the thread, the user rotates the screen again (bear in
mind that for non-QWERTY devices, it doesn't take much to cause the
screen to rotate)
-- Android creates a new activity instance (C), and has B point to C 
for
the purposes of your call forwarding stuff

At this point, we have three total instances of the activity running 
(A,
B, C), and we still have 23 seconds of the original 30 to work with.
Factor in the possibility of developers having threads that run for 30
days instead of 30 seconds.

In your specific example, coded properly, the forwarding mechanism may
work fine, if your thread is very short lived (a couple of seconds),
won't get started again, and your activities are not terribly complex.
It's when you start to violate those assumptions (coded improperly,
lotsa threads, long threads, complex activities) that memory issues
become more painful.

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

Warescription: Three Android Books, Plus Updates, $35/Year

  --
  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 

[android-developers] Re: Suggestions on how to stop threads with long operations?

2009-08-31 Thread Yusuf Saib (T-Mobile USA)

You might run this thread in a service, and have another thread stop
the service as needed.



Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 31, 5:14 am, jsdf jasons...@gmail.com wrote:
 Does anyone out there have thoughts on this?
 Thanks,
 jsdf

 On Aug 28, 5:56 pm, jsdf jasons...@gmail.com wrote:



  Hi Android experts,
  I have a tricky question that I would like some advice on.

  I have a thread that does a large amount of network and database
  work.  E.g.:

  new Thread(new Runnable() {
    public void run() {
      String largeData = getLargeDataFromServer();
      Object largeObject = xmlParser.parseFromXml(largeData);
      saveLargeObjectToDatabase();
      putLargeDataToSecondServer();
    }

  }).start();

  The problem I have is that I need to stop this thread at any point.
  It does not need to stop absolutely immediately, but given limited
  network and memory on the phone, the sooner I can stop it the better.

  I currently am testing and stopping with a method similar to this:

  new Thread(new Runnable() {
    public void run() {
      if (shouldStop) return;
      String largeData = getLargeDataFromServer();
      if (shouldStop) return;
      Object largeObject = xmlParser.parseFromXml(largeData);
      if (shouldStop) return;
      saveLargeObjectToDatabase();
      if (shouldStop) return;
      putLargeDataToSecondServer();
    }

  }).start();

  This makes me very uncomfortable, and litters my code with these
  shouldStop statements.  Furthermore, if the system is in any of the
  four long functions, that function has to complete before the test can
  actually happen.

  I notice that there is a Thread.stop(), but the comments warn against
  using it.

  Does anyone have suggestions on how to reconfigure the thread so I can
  stop relatively quickly and regardless of whether execution is in one
  of its subfunctions?

  Thanks so much in advance,
  jsdf
--~--~-~--~~~---~--~~
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: Recorded sound file not getting listed in Music menu

2009-08-31 Thread Marco Nelissen

On the other hand, do you really want your recordings to show up in
the music app? This means those recordings will be mixed in with
regular music when using shuffle mode, for instance. That might be OK
if you actually recorded yourself making music, but if the recording
is a voice memo that says buy milk and eggs, then you probably don't
want to hear that while listening to music.


On Fri, Aug 28, 2009 at 11:35 AM, elcadarmogrif...@gmail.com wrote:

 Use this:

 http://developer.android.com/reference/android/media/MediaScannerConnection.html

 Force it to scan the new file. Then your audio file will show up when
 using the Music app.

 On Aug 20, 2:49 am, kk_Kiran simplyurki...@gmail.com wrote:
 Thx for your reply Marco.
 WhilerecordingtheaudioI need to specify output file path. So I
 have already added the title and path for the recorded file. That file
 is being created with correct name and correct path in sdcard. The
 only problem is emulator is not able to scan the file and thus that
 file is not getting listed in music menu until emulator is closed and
 relaunched.

 On Aug 20, 12:15 am, Marco Nelissen marc...@android.com wrote:



  If you create a media file, it is your responsibility to add it to the
  database with a proper title, artist, album, etc.

  On Wed, Aug 19, 2009 at 8:23 AM,kk_Kiransimplyurki...@gmail.com wrote:

   Hi friends,

   I have created an basic sound recorder application using MediaRecorder
   class. It has 3 buttons i.e.

   1.Record : Startrecording
   2.Stop     : Stoprecording
   3.Play      : Play recorded file ( 3gp format)

   I can record any number of files using this. Each files gets name as
   audio1,audio2 ..etc.

   The problem is afterrecordingthe file I can play it using play
   button. But if I exit my application I am not able to see that file
   listed in music menu in emulator. But at the same time when i browse
   my sdcard using eclipse I can see the recordedaudiofile. ( I have
   aleady mounted sdcard image and can see other sdcard content in
   emulator)

   Now if I close the emulator and relaunch it I can see that file in
   emulator music menu. Now suppose that file name is audio1.3gp. If I
   record a sound using my app it will record it using name audio1.3gp on
   same location. This time if I goto music menu I can see audio1.3gp
   file with latest recordedaudio.

   Can anybody help me on why this is happening?

   Thanks in advance and sorry for long description :).
 


--~--~-~--~~~---~--~~
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 with ADC upload

2009-08-31 Thread RainBow

 But if you tested it on your G1 it probably is...
Beg to differ but being able to test/run on phone does not mean its
signed. I spent several hours to get this sorted and get a valid
signed apk.

I have posted the entire steps to do this correctly here: But if you
tested it on your G1 it probably is...

http://groups.google.com/group/android-developers/browse_thread/thread/a71551b7349207cc

Also refer to three URLs that Mark has mentioned. They helped me
profoundly...

Btw, are you using windows? I found that on Windows the eclipse points
to jre rather than jdk version. Lastly, u need to export an unsigned
version of your app in eclipse before u feed it to jarsigner.

Good luck!!

On Aug 31, 6:10 am, fhucho fhu...@gmail.com wrote:
 Is your app signed? But if you tested it on your G1 it probably is...

 On Aug 31, 2:26 pm, longhairedsi longhaire...@googlemail.com wrote:

  Hi

  I've been trying to upload my adc submission. I keep getting an error
  saying Upload a valid APK. can anyone elaborate on what this
  means I've followed the checklist for publisihing and tested on my
  g1 and it all seems fine. Why can't I upload? What constitutes as a
  valid apk?

  Thanks
  Simon
--~--~-~--~~~---~--~~
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 with ADC upload

2009-08-31 Thread RainBow

Sorry for But if you tested it on your G1 it probably is... pasting
it before URL...it was by mistake.

On Aug 31, 9:34 am, RainBow drvir...@gmail.com wrote:
  But if you tested it on your G1 it probably is...

 Beg to differ but being able to test/run on phone does not mean its
 signed. I spent several hours to get this sorted and get a valid
 signed apk.

 I have posted the entire steps to do this correctly here: But if you
 tested it on your G1 it probably is...

 http://groups.google.com/group/android-developers/browse_thread/threa...

 Also refer to three URLs that Mark has mentioned. They helped me
 profoundly...

 Btw, are you using windows? I found that on Windows the eclipse points
 to jre rather than jdk version. Lastly, u need to export an unsigned
 version of your app in eclipse before u feed it to jarsigner.

 Good luck!!

 On Aug 31, 6:10 am, fhucho fhu...@gmail.com wrote:

  Is your app signed? But if you tested it on your G1 it probably is...

  On Aug 31, 2:26 pm, longhairedsi longhaire...@googlemail.com wrote:

   Hi

   I've been trying to upload my adc submission. I keep getting an error
   saying Upload a valid APK. can anyone elaborate on what this
   means I've followed the checklist for publisihing and tested on my
   g1 and it all seems fine. Why can't I upload? What constitutes as a
   valid apk?

   Thanks
   Simon
--~--~-~--~~~---~--~~
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] StackTrace Doesn't Reference Application

2009-08-31 Thread Dan Sherman
Hey guys, getting a Force-Close in my logs here (unfortunately from a remote
trace, haven't been able to reproduce locally), but it doesn't mention my
app anywhere in it...

Anyone know what could be causing this, or how to track it down further?

java.lang.IndexOutOfBoundsException: getChars (13 ... 0) has end before
start
at
android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:935)
at
android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:847)
at android.text.TextUtils.getChars(TextUtils.java:69)
at
android.text.SpannableStringBuilder.init(SpannableStringBuilder.java:59)
at
android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:839)
at android.widget.TextView.extractTextInternal(TextView.java:4405)
at android.widget.TextView.reportExtractedText(TextView.java:4443)
at android.widget.TextView.finishBatchEdit(TextView.java:4585)
at android.widget.TextView.endBatchEdit(TextView.java:4567)
at
com.android.internal.widget.EditableInputConnection.endBatchEdit(EditableInputConnection.java:54)
at
com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:334)
at
com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:57)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)


- Dan

--~--~-~--~~~---~--~~
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: 16M application heap limit

2009-08-31 Thread Dianne Hackborn
On Mon, Aug 31, 2009 at 5:56 AM, Mark Murphy mmur...@commonsware.comwrote:

  Do you think this limit will persist into the
  forseeable future?
 Until you start seeing significant numbers of Android devices with a lot
 more RAM, my guess is yes, but that's a guess.


It is definitely not going up for the current class of hardware, which is
already under pretty significant memory pressure.  It will definitely go up
on certain kinds of higher-end hardware -- for example, if one were to
imagine a device with a higher-density/resolution screen, this would require
larger graphics, so you'd want more overall RAM and a higher limit per app
to account for the extra space requirements.

Another driver would probably be the camera -- if one increases to say an
8MP camera, apps would need more memory to be able to do anything with such
images.

-- 
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: Can not access my own service

2009-08-31 Thread Dianne Hackborn
2009/8/28 Lutz Schönemann lutz.schoenem...@sit.fraunhofer.de

 Hi, my current problem is to access my own service. The thing is I
 have 2 interfaces for my service and want to restrict one of them to
 applications that have a special permission.


Please note that you can't do this: the onBind() method is called only
-once- for each interface you publish, NOT every time a client binds.

To implement different permissions for different clients, you will need to
have one top-level interface that all clients call bind to, and an API call
there to retrieve the protected interface, allowing you to do the permission
check at the point of that call.

-- 
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: Expose service interface to other application

2009-08-31 Thread Dianne Hackborn
Applications can't link against each other.  You'll need to link all needed
code into each app.

2009/8/31 Lutz Schönemann lutz.schoenem...@sit.fraunhofer.de

 Hi,

 I have created a service and want to expose the interface to other
 applications. For one service I have done this successfuly. I just put the
 AIDL interface into the new project and all worked fine. Now for this
 service I've done the same but I get a java.lang.VerifyError when trying to
 use this interface. I think that the problem is that the AIDL uses a class
 (PolicyRole) that is only defined in the source code of the service. To
 compile the source that uses the interface I had to link against the code of
 the service but at runtime the error appears.



 The AIDL for the interface I want to use

 --- 8 ---  8 ---  8 ---

 package de. [...] . [...] .softwarepolicy.pep;

 import de. [...] . [...] .softwarepolicy.pep.roles.PolicyRole;

 interface IPEPServiceManagement {
ListPolicyRole getAvailableRoles(in int type);

void setRoles(inout String[] roles);

ListPolicyRole getActiveRoles(in int type);

void updateRoles(String uri);
void reloadRoles();
 }

 --- 8 ---  8 ---  8 ---



 the AIDL for the class PolicyRole that is used in the previous AIDL

 --- 8 ---  8 ---  8 ---

 package de.fraunhofer.sit.softwarepolicy.pep.roles;

 parcelable PolicyRole;

 --- 8 ---  8 ---  8 ---


 The code for the class PolicyRole is only inside the services project so I
 added the service to the build path and the compile doesn't complain..

 can someone give me a hint how to expose a service the right way?

 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.

--~--~-~--~~~---~--~~
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: No com.android.camera.CropImage on HTC Magic?

2009-08-31 Thread Dianne Hackborn
I don't know what you mean by wallpaper, so there is no way to help you.

As for cropping, as I said, I don't believe there is an official intent to
do this.  You'll need to implement it yourself.  If nothing else, just go
copy the code out of the camera app that does what you want.

On Mon, Aug 31, 2009 at 1:57 AM, admin.androidsl...@googlemail.com 
admin.androidsl...@googlemail.com wrote:


 Same issue here - both crop and wallpaper.

 Please advise the correct techniques to call these across all phones.



 On Aug 29, 5:15 pm, Dianne Hackborn hack...@android.com wrote:
  This is not part of the SDK.  You dug up the internal package and class
 name
  from somewhere, which happens to exist on the G1, but there is no
 guarantee
  it will exist on other devices (nor that it won't change in a future
 update
  to the G1).
 
 
 
  On Fri, Aug 28, 2009 at 3:16 PM, Klaus Kartou kar...@gmail.com wrote:
   Hi,
 
   I have a pretty urgent issue. I am using the CropImage intent on my G1
 Dev
   phone to crop images.
   However when starting this intent on a HTC Magic I get an error
 indicating
   the activity cannot be found:
 
   Unable to find explicit activity class
   {com.android.camera/com.android.camera.CropImage}
 
   Why is this activity not present on HTC Magic?
   Any input is much appreciated.
 
   Best regards,
 
  --
  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: Date Picker

2009-08-31 Thread Wiebbe

I dont really see why this should not be able to be done with a
spinner? You can add items to a spinner programmaticly, just calculate
the 3 next days add them to the spinner?

You can easily get the date from the Calendar object and then use a
ArrayAdapter to add your items.

I found this link that shows how you can custom add the spinner items,
seems for a older SDK, but i think the code hasnt changed that much.

http://www.designerandroid.com/?p=8=1

On Aug 31, 6:05 am, Sasi Kumar sasikumar.it1...@gmail.com wrote:
 I want only 3 days that should genarate automatically..
 Pls give some suggestion  with example..

 ex:-

 I want like

 30/08/2009
 31/08/2009
 1/09/2009

 we can't able to enter it manually b'coz the date and the month will
 cahnge.

 On Aug 29, 7:21 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t-



 mobile.com wrote:
  How about just using a Spinner instead of a DatePicker ?
  Balwinder Kaur
  Open Source Development Center
  ·T· · ·Mobile· stick together

  The views, opinions and statements in this email are those of the
  author solely in their individual capacity, and do not necessarily
  represent those of T-Mobile USA, Inc.

  On Aug 29, 4:08 am, Sasi Kumar sasikumar.it1...@gmail.com wrote:

   I want a date picker with maximum of 3 days.

   i want like

   yesterday
   today
   tomorrow

   this 3 days only i want.

   any one can sugess some idea.

   please 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: Setting internal storage in the AVD

2009-08-31 Thread Balwinder Kaur (T-Mobile USA)

What do you mean you tried setting hw.ramSize in the AVD's .config
file but no change. Do you mean you edited the file and it didn't
save it ?

Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 30, 2:42 pm, WoodManEXP robert_woodr...@bellsouth.net wrote:
 Does anyone know how to set internal storage in the AVD to something
 other than the default 92M?

 I have tried setting hw.ramSize in the AVD's .config file, but no
 change and also tried setting it when creating a AVD with the android
 create command. Same net resut.

 I'm on Windows XP.

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



[android-developers] Re: Android icons

2009-08-31 Thread Balwinder Kaur (T-Mobile USA)

You can view the inbuilt icons by unzipping android.jar file.

You can use any icon that follows the recommended guidelines for
icons.
http://developer.android.com/guide/practices/ui_guidelines/icon_design.html


Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 31, 12:34 am, Noor nurandr...@gmail.com wrote:
 I think there is no such sites there...But if u have the Android
 Source Code, just search .png there and will get all the icons of
 Android..Source code are available in site, no need to dig them
 using Linux PC...

 Nur Al Hasan
 New Delhi, India

 On Aug 30, 4:43 pm, bennyb taw...@gmail.com wrote:

  Apart from the standard G1 icons, are there any sites or free packages
  for Android icons?


--~--~-~--~~~---~--~~
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] ADC II Package Rename Content Providers

2009-08-31 Thread Michael Elsdörfer

This is slightly confusing me right now. If I have a content provider, 
should it's authority be renamed also? I would have thought it makes 
sense, allowing both versions to run next to each other cleanly.

But then I seem to be experiencing strange errors if both versions do 
run hat the same time, with the non-ADC version of the app trying to use 
the ADC-Provider...or something. I can not exclude a bug in my own code, 
but I don't see where the problem is right now - both the Authority 
defined as well as the URI used to access seem to be correct and 
different in each case.

Any obvious problems I might be missing? Is using two different URIs 
generally the way to go?

Michael

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



[android-developers] Re: can one cmulator control controls two emulators in the same computor at the same time ?

2009-08-31 Thread Roman ( T-Mobile USA)

Make sure to use two different AVD images to start up two different
emulator instances.

--
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 Aug 31, 2:40 am, Noor nurandr...@gmail.com wrote:
 You can control using ddms.Two emulators will be in view in same
 computer by using command prompts and the process status of the two
 emulators will be on ddms also.U can sent lat long from that same ddms
 by selecting which emulator will be in use..

 Nur Al Hasan
 New Delhi, India

 On Aug 30, 1:02 am, Emre A. Yavuz eayl...@hotmail.com wrote:

  Did you try opening two command screens and telneting to each emulator 
  seperately ? You can then use the command geo fix lat long ..  to send 
  mock locations.

  Cheers,

  Emre

  Date: Sat, 29 Aug 2009 13:23:11 +0800
  Subject: [android-developers] can one cmulator control controls two 
  emulators in the same computor at the same time ?
  From: yuyang3...@gmail.com
  To: android-developers@googlegroups.com

  Hello,
     I'm dealing with a application which associate with GPS mock locations 
  and XMPP comunication,and need to send the mock location to two emulator by 
  ADT at the same time .However I've got a problem .It seems that the 
  location cann't be send to two emulator  in my computor at the same time . 
  So ,may any master-hand can tell me if it is possible for us to send mock 
  location to two emulator in the same computor at the same  time ?
     thanks very much.

  _
  Send and receive email from all of your webmail 
  accounts.http://go.microsoft.com/?linkid=9671356


--~--~-~--~~~---~--~~
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 in Http Get method..can any one tell me pls...

2009-08-31 Thread Wiebbe

Looking at your code, it seems that you print the String variable
Output. This variable contains the value of the URL but you never set
it to anything else. I think you want to set a variable to the return
value of your downloadUrl method.

And some unasked advice with regards to dealing with the retrieving of
the http content. I retrieve the data directly with the HttpEntity
class as followed:

(I use a Post because i use it to post data to a external server, but
it works the same)


HttpPost siteRequest = new HttpPost(url);

HttpResponse httpResponse = client.execute(dataRequest);

responseData = EntityUtils.toString(httpResponse.getEntity());

After this responseData contains the http content retrieved from the
request.

On Aug 31, 9:30 am, ragavendran s sraghav.ra...@gmail.com wrote:
 Can anyone tell what is the problem in the given code to retrieve

  the data from the local server by using Http Get method..pls give some

 example code..i tried but if i give the url the result i m getting same
 url

 in the text view...shall any one point out wat the error in the code

 pls point out the errors...

 With regards,
 Raghav.S

 package req.http1;

 import java.io.IOException;
 import java.io.InputStream;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.impl.client.DefaultHttpClient;

 import android.app.Activity;
 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;

 public class reqhttp extends Activity {
     TextView text;
      EditText edt;
      Button btn;
      String n=null;
      String contentOfMyInputStream1;
      String output = null;

     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         edt=(EditText)findViewById(R.id.edt);
         text=(TextView)findViewById(R.id.text);
         btn=(Button)findViewById(R.id.btn);

         btn.setOnClickListener(new OnClickListener() {
             public void onClick(View v) {
             text.setText();
             // Thread thread = new Thread();
              String st1;

              st1=edt.getText().toString();
             //thread.start();

             try {
                  output =http://localhost:8080/Serv1/servlet/Servlet1?st1=
 +st1;
                 downloadUrl(output);
             } catch (IOException e) {
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
             if (output != null)
             {
                 text.setText(output);
             }

             }
             });

     }

     public String downloadUrl(String url) throws  IOException{
         HttpClient httpclient = new DefaultHttpClient();
         HttpRequestBase httpRequest = null;
         HttpResponse httpResponse = null;
         InputStream inputStream = null;
         String response = ;
         StringBuffer buffer = new StringBuffer();

         httpRequest = new HttpGet(url);

         httpResponse = httpclient.execute(httpRequest);
         inputStream = httpResponse.getEntity().getContent();
         int contentLength = (int)
 httpResponse.getEntity().getContentLength();
         if (contentLength  0){
            // Log.e(TAG, The HTTP response is too long.);
         }
         byte[] data = new byte[256];
         int len = 0;
         while (-1 != (len = inputStream.read(data)) )
         {
             buffer.append(new String(data, 0, len));
         }

         inputStream.close();

         response = buffer.toString();

         return response;

     }



 }
--~--~-~--~~~---~--~~
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: Having Android Documentation in Groups Pages area

2009-08-31 Thread Dianne Hackborn
I don't manage the docs, so I can't really address your request, except that
the tech writers have very limited time and I doubt they will be able to
spend it on setting all of this up.  I also question value to them of this,
since this would be a significant investment in time for monitoring all of
this, synchronizing with the real documentation, etc.

If you want to contribute to the docs, they are there in source control open
to any contributing a patch, which a number of people have done already.

On Mon, Aug 31, 2009 at 10:28 AM, tansaku tans...@gmail.com wrote:


 Good to know that you guys are accepting contributions to the
 documentation in its current location. I can imagine that it would be
 a big task to move it elsewhere, but what about mirroring it to the
 google group discussion pages?  That way any updates to the main
 source tree would be reflected in the google group documentation -
 both services are Google internal right?  My main desire is not so
 much that everyone can freely edit the android documentation as in
 wikipedia, but that discussions about it can be directly linked into
 parts of the API.

 I think it might actually make your job easier as you would have at
 least some of the discussions organized around the API.  I think it
 would also lead to more focused discussion in the group, and not
 require developers to waste time trying to find which of 8 discussions
 on the same topic provide the correct answer to their problem.  And it
 would lower the barrier to entry to making suggestions for changes in
 the documentation.

 At the moment if I see something in the documentation that doesn't
 make sense, or is even just out of date, what do I do?  I have to open
 a mail client, cut and paste, work out who to email to?  Wonder if
 anyone will care if I do.  If the android source tree was mirrored
 into the google groups pages, I could just hit the comment button and
 make my suggestion, knowing that it would also be there for others to
 see, even if the google developers working on Android didn't have time
 to look at it. That means you'll get much more feedback.

 Just my $0.02

 On Aug 27, 6:38 am, Dianne Hackborn hack...@android.com wrote:
  The official location of the documentation is in the source tree, in the
  source documentation files and various java docs related to all of the
  classes.  We have been regularly accepting contributions to that code to
 fix
  and improve the documentation there.
 
  Someone could certainly copy the docs to wherever else they want, but
 they
  are going to have a fair amount of work cut out for them to keep those in
  sync with the official docs.
 
  On Thu, Aug 27, 2009 at 7:44 AM, Balwinder Kaur (T-Mobile USA) 
 
 
 
  balwinder.k...@t-mobile.com wrote:
 
   I think that is quite a nice idea :)
 
   As we come across ways that we feel can make the documentation become
   more succinct and report those, it helps Android Developers' lives
   become easier. The strength of an open source platform comes piping
   the knowledge of its users back into the platform.
 
   Balwinder Kaur
   Open Source Development Center
   ·T· · ·Mobile· stick together
 
   The views, opinions and statements in this email are those of the
   author solely in their individual capacity, and do not necessarily
   represent those of T-Mobile USA, Inc.
 
   On Aug 26, 6:37 pm, Michael Leung michaelchi...@gmail.com wrote:
But that needs someone to update it. I think that is fine to read
 from
   the
main android site.
 
However, that is a good and positive idea.
 
On Thu, Aug 27, 2009 at 9:32 AM, tansaku tans...@gmail.com wrote:
 
 Hi All,
 
 I was thinking, wouldn't it be great if all the android reference
 documentation was in the pages section of this Google Group, i.e.
 stick everything in here:
 
http://developer.android.com/reference/packages.html
 
 in here:
 
http://groups.google.com/group/android-developers/web
 
 then everyone could comment on specific bits in the reference docs,
 and even get involved in trying to improve them?
 
 CHEERSS AM
 
--
Regards,
Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info
 
  --
  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 

[android-developers] Re: Android Idle screen

2009-08-31 Thread Dianne Hackborn
You can't customize the lock screen.  It is not part of home, it is built
into the core system.

On Mon, Aug 31, 2009 at 2:43 AM, sbrytskyy sbryts...@gmail.com wrote:


 Hi,
 I have some questions about Android. First of all is question of
 therms -  Idle screen is screensaver or it is another name of Home
 screen?
 Another is related to first one, can I add my custom application to
 Android screensaver? Is there API to create custom screensaver?
 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.

--~--~-~--~~~---~--~~
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: Use classes defined inside other applications

2009-08-31 Thread Abu
U can use dalvik.system.DexFile class to access class available in another
APK

DexFile d = DexFile(apkname

d.entries() will give u an enumeration of classes available in the APK

- Hope this will answer ur question

Abu


2009/8/31 Lutz Schönemann lutz.schoenem...@sit.fraunhofer.de

 Hi,

 is it possible to use classes that are defined in other applications?

 I have two dependent projects and want to use classes from one project
 inside the other. I use eclipse and in the project preferences  Project
 References I checked the other project. In addition I added the
 Project/bin-path of the first project to the seconds project libraries. Both
 apps are installed on a device but I get a VerifyError. How is it possible
 to use classes from an other application? I don't want to copy the code into
 the second project!

 Thanks for help

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



[android-developers] Re: about adc2 app

2009-08-31 Thread omnitial

i'm not getting any answer :(( plz some one say something :( im really
confused now

On Aug 31, 1:26 pm, omnitial omnit...@gmail.com wrote:
 hello,
 i'm quite new in adc2 and also a late comer.
 i developed 2 app for the adc2 rushly.
 One of my app is a social app which need a server to run in real time.
 But i couldn't manage to acquire a server for my app, by far now (due
 to many reasons).
 So i decided to make a demo database inside my app. So if a end user
 use my app he can get all the options fully functional.
 while discussing about it with others, some one said that, my app is
 invalid for the adc2 due to this demo database.

 i'm really confused about it. i need suggestions now. :(
 am i heading towards right or invalid way ???

 omnitial

--~--~-~--~~~---~--~~
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] ANR - when using google-json library to serailize.

2009-08-31 Thread sr

My application uses a media player and I'm using the google-json
library to serailize some application data.
I'm using the gson.toJson() method to acomplish this.

It seems that 3 times out of 10, the application will terminated with
an ANR.
Not sure what I can do about this - but any tips on how this can be
dealt with outside writing my own
serailizer? the gson code does seem a bit heavy weight.

Thanks for any help.
-sr

I/ActivityManager(   60): ANR (application not responding) in process:
com.jaldi5.portray
I/ActivityManager(   60): Annotation: keyDispatchingTimedOut
I/ActivityManager(   60): CPU usage:
I/ActivityManager(   60): Load: 3.84 / 3.69 / 3.55
I/ActivityManager(   60): CPU usage from 33287ms to 40ms ago:
I/ActivityManager(   60):   mediaserver: 26% = 16% user + 10% kernel
I/ActivityManager(   60):   com.jaldi5.portray: 23% = 17% user + 6%
kernel
I/ActivityManager(   60):   system_server: 3% = 1% user + 2% kernel
I/ActivityManager(   60):   tiwlan_wifi_wq: 2% = 0% user + 2% kernel
I/ActivityManager(   60):   android.process.acore: 0% = 0% user + 0%
kernel
I/ActivityManager(   60):   com.google.process.gapps: 0% = 0% user +
0% kernel
I/ActivityManager(   60):   kondemand/0: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   adbd: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   wpa_supplicant: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   logcat: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   synaptics_wq: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   com.android.vending: 0% = 0% user + 0%
kernel
I/ActivityManager(   60):   pdflush: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   kswapd0: 0% = 0% user + 0% kernel
I/ActivityManager(   60):   mmcqd: 0% = 0% user + 0% kernel
I/ActivityManager(   60): TOTAL: 57% = 36% user + 21% kernel + 0%
iowait + 0% softirq
I/ActivityManager(   60): Removing old ANR trace file from /data/anr/
traces.txt
I/Process (   60): Sending signal. PID: 1361 SIG: 3
I/dalvikvm( 1361): threadid=7: reacting to signal 3
I/Process (   60): Sending signal. PID: 1295 SIG: 3
I/dalvikvm( 1295): threadid=7: reacting to signal 3
I/Process (   60): Sending signal. PID: 1288 SIG: 3
I/dalvikvm( 1288): threadid=7: reacting to signal 3
I/Process (   60): Sending signal. PID: 107 SIG: 3
I/dalvikvm(  107): threadid=7: reacting to signal 3
I/Process (   60): Sending signal. PID: 1276 SIG: 3
I/dalvikvm( 1276): threadid=7: reacting to signal 3
I/dalvikvm( 1288): Wrote stack trace to '/data/anr/traces.txt'
I/Process (   60): Sending signal. PID: 60 SIG: 3
I/dalvikvm(   60): threadid=7: reacting to signal 3
I/dalvikvm( 1361): Wrote stack trace to '/data/anr/traces.txt'
I/dalvikvm( 1295): Wrote stack trace to '/data/anr/traces.txt'
I/dalvikvm(   60): Wrote stack trace to '/data/anr/traces.txt'
I/dalvikvm(  107): Wrote stack trace to '/data/anr/traces.txt'
I/Process (   60): Sending signal. PID: 153 SIG: 3
I/dalvikvm(  153): threadid=7: reacting to signal 3
I/Process (   60): Sending signal. PID: 218 SIG: 3
I/dalvikvm(  218): threadid=7: reacting to signal 3
I/Process (   60): Sending signal. PID: 105 SIG: 3
I/dalvikvm(  105): threadid=7: reacting to signal 3
I/dalvikvm(  105): Wrote stack trace to '/data/anr/traces.txt'
--~--~-~--~~~---~--~~
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 sound hz?

2009-08-31 Thread guruk

sorry i just dont find that simple thing.
how to create a tone lets say 10khz / 5 secs

something like that,, just play a individual created sound, not
playing a mpg or so?

any example will be helpful

thx
chri
--~--~-~--~~~---~--~~
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   3   >