[android-developers] Re: need help

2011-11-02 Thread Divyata Panchal
plz help me.

i want to add an option to contact inflate when long pressing any
contact number from contact list...


On Nov 1, 5:14 pm, TreKing treking...@gmail.com wrote:
 On Mon, Oct 31, 2011 at 11:16 PM, Divyata Panchal 

 panchal.divyat...@gmail.com wrote:
  is it possible to change default contact manager app made by google..?

 Yes, it is possible.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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: Showing notification dialog over a incoming call

2011-11-02 Thread Sunil Mishra
Hi,

The log -

11-02 11:25:57.706: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
11-02 11:25:57.706: ERROR/AndroidRuntime(339):
android.view.WindowManager$BadTokenException: Unable to add window --
token android.os.BinderProxy@44e7d968 is not valid; is your activity
running?
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.ViewRoot.setView(ViewRoot.java:505)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.Window$LocalWindowManager.addView(Window.java:424)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.app.Dialog.show(Dialog.java:241)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
com.motorola.EzeeTransferActivity
$1.onCallStateChanged(EzeeTransferActivity.java:63)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.telephony.PhoneStateListener
$2.handleMessage(PhoneStateListener.java:319)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.os.Looper.loop(Looper.java:123)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.app.ActivityThread.main(ActivityThread.java:4627)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
java.lang.reflect.Method.invokeNative(Native Method)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
java.lang.reflect.Method.invoke(Method.java:521)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
dalvik.system.NativeStart.main(Native Method)


On Oct 26, 7:36 am, gjs garyjamessi...@gmail.com wrote:
 Hi,

 Examine or post console log showing the error.

 Regards

 On Oct 25, 8:10 pm,SunilMishrasuniljmis...@gmail.com wrote:







  Hi,

  I have written a code to display a dialog box when a incoming call
  arrives, but it crashes.
  It is working fine when done by only displaying message using Toast.

  Please 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


Re: [android-developers] Re: Showing notification dialog over a incoming call

2011-11-02 Thread Francisco Dalla Rosa soares
when a call comes, your activity goes to background and the phone app's
activity becomes active.
You're trying to show a dialog that is tied to a activity that's not
running at the moment, thus the error.
Toasts don't have these strong ties to the activity showing them. that's
why it works.

2011/11/2 Sunil Mishra suniljmis...@gmail.com

 Hi,

 The log -

 11-02 11:25:57.706: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
 11-02 11:25:57.706: ERROR/AndroidRuntime(339):
 android.view.WindowManager$BadTokenException: Unable to add window --
 token android.os.BinderProxy@44e7d968 is not valid; is your activity
 running?
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.view.ViewRoot.setView(ViewRoot.java:505)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.view.Window$LocalWindowManager.addView(Window.java:424)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.app.Dialog.show(Dialog.java:241)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 com.motorola.EzeeTransferActivity
 $1.onCallStateChanged(EzeeTransferActivity.java:63)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.telephony.PhoneStateListener
 $2.handleMessage(PhoneStateListener.java:319)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.os.Looper.loop(Looper.java:123)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 java.lang.reflect.Method.invokeNative(Native Method)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 java.lang.reflect.Method.invoke(Method.java:521)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:868)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
 11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
 dalvik.system.NativeStart.main(Native Method)


 On Oct 26, 7:36 am, gjs garyjamessi...@gmail.com wrote:
  Hi,
 
  Examine or post console log showing the error.
 
  Regards
 
  On Oct 25, 8:10 pm,SunilMishrasuniljmis...@gmail.com wrote:
 
 
 
 
 
 
 
   Hi,
 
   I have written a code to display a dialog box when a incoming call
   arrives, but it crashes.
   It is working fine when done by only displaying message using Toast.
 
   Please 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




-- 
株式会社アルゴ ARGO Inc.
〒130-0012
東京都墨田区太平3-11-10
NTKオオノビル8階

ソアレス フランシスコ ( Soares Francisco )
Mail : soa...@argo.bz HP : http://www.argo.bz/
TEL:03-5619-4511 FAX:03-5619-4512

-- 
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: ViewPager in a ListView - how to lock the scrolling axis?

2011-11-02 Thread Zsombor
Found a solution by overriding the onInterceptTouchEvent() of
ListView, here it goes:

...
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
//Call super first because it does some hidden motion event
handling
boolean result = super.onInterceptTouchEvent(ev);
//Now see if we are scrolling vertically with the custom gesture
detector
if (gestureDetector.onTouchEvent(ev)) {
return result;
}
//If not scrolling vertically (more y than x), don't hijack the
event.
else {
return false;
}
}

// Return false if we're scrolling in the x direction
class YScrollDetector extends SimpleOnGestureListener {
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX, float distanceY) {
try {
if (Math.abs(distanceY)  Math.abs(distanceX)) {
return true;
} else {
return false;
}
} catch (Exception e) {
// nothing
}
return false;
}
}
...

As for the recycling: yes, it sucks, there's actually none right now
on the vertical axis this way, so the scrolling is a bit clunky, since
I'm constructing new ViewPagers. But I have to implement this
behavior, so at least it does work.

On Oct 27, 1:21 am, Dianne Hackborn hack...@android.com wrote:
 How exactly do you recycle the list view items correctly?  This is...
  crazy.









 On Wed, Oct 26, 2011 at 2:25 AM, Zsombor scythe...@gmail.com wrote:
  I have a ViewPager widget in every row of a ListView. This provides a
  shelf-like UI, so the user can scroll around searching for a shelf
  vertically, and then scroll horizontally amongst the contents of a
  shelf. This works.

  But the scrolling experience is terrible: if I start to drag a shelf's
  ViewPager, scroll it horizontally, and accidentally drag a bit upwards/
  downwards, then the ListView traps this dragging action, and start
  to scroll vertically, ending my horizontal drag. In this state, the
  drag action won't return to the ViewPager, the ListView has it, and
  that's it. I have to start another drag action to affect the ViewPager
  again. So I guess the ListView has precedence in these cases.

  How can this be fixed? I'd like to achieve the exact opposite: If the
  ViewPager inside a list row starts reacting to a horizontal drag, then
  it should trap that action, and this drag should stop affecting the
  ListView, no matter how the user moves his/her finger vertically. Can
  this be done?

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

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

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

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


[android-developers] How to find which drawable folder is being used??

2011-11-02 Thread Shashidhar
Hi,
  Is there a way to find which drawable folder images are currently used
when I run my application.
I mean, say when I run my app on Nexus-one phone, I want to know which
drawable folder images are used on the UI.
I have 3 separate folder and each having the same set of images with
different sizes.


Thanks,
Shashidhar

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

Re: [android-developers] Re: Fwd: Want to send cookie with Json RPC

2011-11-02 Thread kapnkore
I didnt understood how it explains to set in json rpc ,i dont have much
idea i am new to this

Please check following code


 URL serverURL = null;
try {
serverURL = new URL(webURL);
} catch (MalformedURLException e) {
// handle exception...
}
JSONRPC2Session mySession = new JSONRPC2Session(serverURL);
mySession.getOptions().

int requestID = ID;
JSONRPC2Request request = new JSONRPC2Request(authentication,
requestID);


JSONRPC2Response response = null;
try {
response = mySession.send(request);

} catch (JSONRPC2SessionException e) {
System.err.println(e.getMessage());
}
if (response.indicatesSuccess())
System.out.println(response.getResult());
else
System.out.println(response.getError().getMessage());
}


I want to attach my cookie to this request can i do it?


On Wed, Nov 2, 2011 at 11:24 AM, Ben H benhirash...@gmail.com wrote:


 On Nov 1, 10:40 pm, kapnk...@gmail.com wrote:
  Can i attach cookie to json rpc object in client side  sent a
  request?
  If yes How?

 yes, you can. create an instance of org.apache.http.cookie.Cookie, and
 add it to an instance of
 org.apache.http.impl.client.BasicCookieStore.BasicCookieStore, then
 add that to your BasicHttpContext. then it goes something like this:

 AndroidHttpClient client = AndroidHttpClient.newInstance(USER_AGENT);

 BasicHttpContext httpContext = new BasicHttpContext();
 httpContext.setAttribute(ClientContext.COOKIE_STORE, mCookieStore);

 HttpGet request = new HttpGet(url);
 HttpResponse httpResponse = client.execute(request, httpContext);

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

-- 
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 creation order after kill

2011-11-02 Thread Assaf
Update - Answer to 2 is Yes.

On Oct 27, 6:48 pm, Assaf assaf.sas...@gmail.com wrote:
 As I now understand, Android will start the top-most activity even
 after killing the process due to resource shortage. 
 (seehttp://groups.google.com/group/android-developers/browse_thread/threa...
 )

 My root activity is responsible for some initialization code that I
 wouldn't like to bother-with from other activities.

 Questions:

 1. Any way to change this behavior and ask Android to clear the task
 when killing my process ?

 2. If not, what will happen if the user press BACK in such scenario ?
 will Android re-create the next activity in the stack ?  i.e. stack
 has activities A,B,C. process is killed. User re-selects my app,
 Android creates *C*, user presses BACK. will Android now create B ?

 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: Activity creation order after kill

2011-11-02 Thread Belvedere Computer Services
packageandroid.app

goes through the entire application load  remover giving several
places to put code ~ you just implement the methods - how a:b:c  call
chain would be manages is startActivityForResult

copy-paste from the search result for that term is

Activity | Android Developers
To do this, you call the startActivityForResult(Intent, int) version
with a second integer parameter identifying the call. The result will
come back through your ...
developer.android.com/reference/android/app/Activity.html


On Nov 2, 2:02 am, Assaf assaf.sas...@gmail.com wrote:
 Update - Answer to 2 is Yes.

 On Oct 27, 6:48 pm, Assaf assaf.sas...@gmail.com wrote:







  As I now understand, Android will start the top-most activity even
  after killing the process due to resource shortage. 
  (seehttp://groups.google.com/group/android-developers/browse_thread/threa...
  )

  My root activity is responsible for some initialization code that I
  wouldn't like to bother-with from other activities.

  Questions:

  1. Any way to change this behavior and ask Android to clear the task
  when killing my process ?

  2. If not, what will happen if the user press BACK in such scenario ?
  will Android re-create the next activity in the stack ?  i.e. stack
  has activities A,B,C. process is killed. User re-selects my app,
  Android creates *C*, user presses BACK. will Android now create B ?

  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] LED Button

2011-11-02 Thread Navindian
I need a button or text box which shows the status in different colors.
which control matches to this as close asap.

-- 
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: Showing notification dialog over a incoming call

2011-11-02 Thread Sunil Mishra
Thanks Francisco for the explanation. Is there any possibility of
doing so? any work around?

On Nov 2, 11:18 am, Francisco Dalla Rosa soares soa...@argo.bz
wrote:
 when a call comes, your activity goes to background and the phone app's
 activity becomes active.
 You're trying to show a dialog that is tied to a activity that's not
 running at the moment, thus the error.
 Toasts don't have these strong ties to the activity showing them. that's
 why it works.

 2011/11/2 Sunil Mishra suniljmis...@gmail.com









  Hi,

  The log -

  11-02 11:25:57.706: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
  11-02 11:25:57.706: ERROR/AndroidRuntime(339):
  android.view.WindowManager$BadTokenException: Unable to add window --
  token android.os.BinderProxy@44e7d968 is not valid; is your activity
  running?
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.view.ViewRoot.setView(ViewRoot.java:505)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.view.Window$LocalWindowManager.addView(Window.java:424)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.app.Dialog.show(Dialog.java:241)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  com.motorola.EzeeTransferActivity
  $1.onCallStateChanged(EzeeTransferActivity.java:63)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.telephony.PhoneStateListener
  $2.handleMessage(PhoneStateListener.java:319)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.os.Handler.dispatchMessage(Handler.java:99)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.os.Looper.loop(Looper.java:123)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  android.app.ActivityThread.main(ActivityThread.java:4627)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  java.lang.reflect.Method.invokeNative(Native Method)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  java.lang.reflect.Method.invoke(Method.java:521)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:868)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
  dalvik.system.NativeStart.main(Native Method)

  On Oct 26, 7:36 am, gjs garyjamessi...@gmail.com wrote:
   Hi,

   Examine or post console log showing the error.

   Regards

   On Oct 25, 8:10 pm,SunilMishrasuniljmis...@gmail.com wrote:

Hi,

I have written a code to display a dialog box when a incoming call
arrives, but it crashes.
It is working fine when done by only displaying message using Toast.

Please 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

 --
 株式会社アルゴ ARGO Inc.
 〒130-0012
 東京都墨田区太平3-11-10
 NTKオオノビル8階

 ソアレス フランシスコ ( Soares Francisco )
 Mail : soa...@argo.bz HP :http://www.argo.bz/
 TEL:03-5619-4511 FAX:03-5619-4512

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


Re: [android-developers] Starting Google Analytics session when application goes to background

2011-11-02 Thread Aki


 GA is not part of the SDK, so you're going to be hard-pressed to get a 
 good answer here. Try the GA documentation and see if there is a forum or 
 user group. I'll try anyway.


I have gone through the documentation, couldn't find anything useful. The 
GA documentation doesn't really focus on how to fit into applications. They 
have mostly focused on webpage tracking. 

  
 You mean you want to call stop on the tracker? Why?


I intend to start a new session for the tracker, not stop it. Since mostly 
users use the Home key to exit applications, which technically just puts 
the application in the background, I am getting very unrealistic session 
lengths.

What state do you think you need to be tracking?


Well, one way I could track the application going to the background is by 
maintaining a count of the Activities (say by incrementing and decrementing 
a counter when an Activity is resumed or paused. That way, whenever the 
count reaches zero, I can know that the application is in background, i.e, 
no application activity is in the foreground. I haven't worked out the 
details yet, but I think it can be done.) The reason I don't want to use 
this approach is because I have a large number of Activites.

Apparently iOS provides some way to detect the 
application-going-to-background state (not sure though, never used iOS, but 
read something related to it in StackOverflow) . I think it is a good 
feature. Any reason why Android doesn't provide us a way to do 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] how to install my apk file into android mobile with eclipses?

2011-11-02 Thread venugopal reddy
Hi friends,


how to install my apk file into android mobile with eclipses?

pls help me

-- 
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] PPI (pixel per inches) of PNG file in Android - How to change (or create the new one)

2011-11-02 Thread Trung Nguyen Thanh
How to change PPI of an image in Android. Everytime i try to create
new bitmap and save to SD Card, PPI of that image alway is 72.
Im stuck with this problem for a week.
Someone give me a HINT 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


Re: [android-developers] how to install my apk file into android mobile with eclipses?

2011-11-02 Thread Michael Banzon
Under normal circumstances you should be able to plug your phone into
the computer and just click Run in Eclipse.

On Wed, Nov 2, 2011 at 8:57 AM, venugopal reddy
venugopal.re...@tspl.com wrote:
 Hi friends,


 how to install my apk file into android mobile with eclipses?

 pls help me

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




-- 
Michael Banzon
http://michaelbanzon.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: how to install my apk file into android mobile with eclipses?

2011-11-02 Thread Trung Nguyen Thanh
open CMD and go like this:
1. Cd to your platorm-tools folder.
2. run adb install D:\yourapp.apk

Note:
- Your apk is placed at D:\
- You must connect your device first.
- Dont open any emulator

On Nov 2, 2:57 pm, venugopal reddy venugopal.re...@tspl.com wrote:
 Hi friends,

 how to install my apk file into android mobile with eclipses?

 pls help me

-- 
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: Zooming Polygons: Can i know if the polygon borders are reaching the borders of the screen?

2011-11-02 Thread saex
Please, can you explain how to do it? i am a week trying to do it and
searching in google for examples/tutorials/help and i still find the
way

thanks

On Oct 31, 5:04 pm, TreKing treking...@gmail.com wrote:
 On Mon, Oct 31, 2011 at 9:46 AM, saex elpablos...@gmail.com wrote:
  I want to show a square with the 100% of the width of the screen,
  then, i supose that i must zoom it (with Z axis) until the polygon
  borders are tounching the screen borders.

  But how can i detect that?

 You don't - you do the math necessary to calculate at what distance you
 must render the polygon such that the width is equal to the width of the
 device screen.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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: Zooming Polygons: Can i know if the polygon borders are reaching the borders of the screen?

2011-11-02 Thread saex
Please, can you explain how to do it? i am a week trying to do it and
searching in google for examples/tutorials/help and i still can't find
the
way

thanks

On Oct 31, 5:04 pm, TreKing treking...@gmail.com wrote:
 On Mon, Oct 31, 2011 at 9:46 AM, saex elpablos...@gmail.com wrote:
  I want to show a square with the 100% of the width of the screen,
  then, i supose that i must zoom it (with Z axis) until the polygon
  borders are tounching the screen borders.

  But how can i detect that?

 You don't - you do the math necessary to calculate at what distance you
 must render the polygon such that the width is equal to the width of the
 device screen.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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: Best way to communicate between two applications (on the same device)?

2011-11-02 Thread Ali Chousein
I would suggest creating services and binding to them. Binding to
services is the way to make interprocess communication in Android.
http://developer.android.com/reference/android/app/Service.htmlhttp://developer.android.com/guide/topics/fundamentals/services.html
-Ali Chousein Weather-
Buddyhttp://weatherbuddy.blogspot.com/ | 
http://twitter.com/weather_buddy Geo-Filtered
Assistant http://geo-filtered-assistant.blogspot.com/https://
marketplace.cisco.com/apphq/store/products/994

-- 
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: Sudden rash of license check failures in LVL. Anyone else?

2011-11-02 Thread Pent
I had one yesterday.

Since I didn't have any for the preceeding 18 months, I guess you can
call that a rash.

Pent

-- 
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] ContactsContract.Contacts.Photo API level

2011-11-02 Thread Anthony
I am trying to implement the retrieve thumbnail example on this page:
http://developer.android.com/reference/android/provider/ContactsContract.Contacts.Photo.html

The listed API level is 5.

However, Eclipse reports the error 'PHOTO cannot be resolved or is not
a field' until the target API level for the project is set to 11.

Can anyone shed some light on this please?

This is the code:

public InputStream openPhoto(long contactId)
{
Uri contactUri =
ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
Uri photoUri = Uri.withAppendedPath(contactUri,
Contacts.Photo.CONTENT_DIRECTORY);
Cursor cursor = getContentResolver().query(photoUri,
 new String[] {Contacts.Photo.PHOTO}, null, null, null);
if (cursor == null) {
return null;
}
try {
if (cursor.moveToFirst()) {
byte[] data = cursor.getBlob(0);
if (data != null) {
return new ByteArrayInputStream(data);
}
}
} finally {
cursor.close();
}
return null;
}

And I have these imports at the top of the class file:

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.lang.Object;

import android.app.Activity;
import android.content.ContentUris;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract.CommonDataKinds.Photo;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.RawContacts;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;

-- 
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] Application is available for 0 devices

2011-11-02 Thread Dmitry Karymov
After submitting of new app (com.mcf.strip_club) we see 0 devices in
console, and no compatible phones on Market. The main info is below (I
can be incorrect in some terms since I see them not in English):

API Level: 7-14+
Supported screens: small-xlarge
OpenGL Textures: all

Code Version: 1
Version: 1.0
Size: 5,2M
Supported languages: default
Permissions: android.permission.INTERNET
Features: android.hardware.screen.landscape,
android.hardware.touchscreen

Well, does not seem very restricive to me, but we see in console, that
all devices are filtered out due to manifest.

-- 
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] Share Audio file(.mp3) via Facebook, Email, SMS/MMS

2011-11-02 Thread Kartik Domadiya
-1 down vote favorite
share [fb] share [tw]


I have an audio(.mp3) file and some information related to it.

I want to share with Facebook, E Mail, SMS/MMS etc..

What i have done is : when user clicks on Share Button, it pops up
list of all supported apps that can handle this Intent.

But this doesnot show Facebook and SMS/MMS options.

Here is my code..

public void shareWithFriends(int resId)
{
  Intent share = new Intent(Intent.ACTION_SEND);
  share.setType(audio/mp3);
  share.putExtra(Intent.EXTRA_SUBJECT,Ringtone File : +
getResources().getResourceEntryName(resId)+.mp3);
  share.putExtra(Intent.EXTRA_TEXT,Ringtone File :
+getResources().getResourceEntryName(resId)+.mp3);
  share.putExtra(Intent.EXTRA_STREAM,Uri.parse(android.resource://
com.my.android.soundfiles/+resId));
  share.putExtra(sms_body,Ringtone File : +
getResources().getResourceEntryName(resId)+.mp3);
  startActivity(Intent.createChooser(share, Share Sound File));
}

Here are some results :

When i use mime type audio/mp3, only Email options pops up. No
Facebook and SMS/MMS share.

When i use mime type /, Email and SMS options pops up. No Facebook
Option is there. Here interesting to see that when i click on SMS
option, only text appears, I dont see any any mp3 file attached (Same
thing happens in Whatsapp application (as i have whatsapp installed on
my phone). However when i click on any Mail app (eg.Gmail or Yahoo
mail ) it shows me mp3 file attached.

Can anybody please tell me where i am going wrong ?

-- 
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] Get URI of .mp3 file stored in res/raw folder in android

2011-11-02 Thread Kartik Domadiya
vote 2 down vote favorite
1
share [fb] share [tw]


I have many .mp3 files stored in res/raw folder.

I am getting URI of .mp3 file using following code.

Uri.parse(android.resource:///com.my.android.sharesound/+resId);

This returns : android.resource:///com.my.android.sharesound/
2130968609

Now I am using this URI in creating Share Intent

 
shareIntent.putExtra(Intent.EXTRA_STREAM,Uri.parse(android.resource://
com.my.android.sharesound/+resId));
startActivity(Intent.createChooser(shareIntent,Share Sound);

When i select any Mail application eg. Gmail or YahooMail from the
Share Intent, the mp3 file attached successfully. But it shows that
2130968609(as an attachment)

i dont want resourceId(2130968609) to appear.

I want to display fileName.mp3

How can i do that? Am i missing something ?

OR

Is there any other way to attach .mp3 file stored in res/raw to mail
via Share Intent.

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


Re: [android-developers] Abridged summary of android-developers@googlegroups.com - 100 Messages in 70 Topics

2011-11-02 Thread Michael Schweisthal



--
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] Playing in memory WAV file

2011-11-02 Thread Joey Studwell
I've been reading quite a bit and I can't find a great answer, but it
seems like what I want to do should be pretty simple.

I have a WAV stored as a byte array, read from a database.  I want to
play it when a button is presssed.

Is there a simple way to do that?

This article seems promising, but it still seems like more work than
should be necessary.   
http://mindtherobot.com/blog/580/android-audio-play-a-wav-file-on-an-audiotrack/

My temporary solution is to dump the byte array to disk and use
MediaPlayer to play the resulting file.  But that seems silly as well.

Thanks,
Joey

-- 
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] Get the URI of audio files(.mp3) stored in raw folder

2011-11-02 Thread Kartik Domadiya
I want to send .mp3 file via mail (using share intent).

I have tried the following code :

Intent share = new Intent(Intent.ACTION_SEND);
share.setType(*/*);
share.putExtra(Intent.EXTRA_STREAM,Uri.parse(android.resource://
com.my.android.package/+resId));
startActivity(Intent.createChooser(share, Share Sound));

Log of Uri.parse(android.resource://com.my.android.package/+resId)
shows the below string :

android.resource://com.my.android.package/2130968609

When i select any mail application, the audio file(.mp3)  gets
attached with resourceId.mp3 file (2130968609). I dont want that.

I want to get fileName.mp3. I want something like android.resource://
com.my.android.package/fileName.mp3. So that user can recognize the
file they wanted to share.

How can i do that ?

-- 
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] [In App Purchase] Service still Alive/ Keep Running After Tasks Kill

2011-11-02 Thread android_hkray
According to the documentation of Google In App billing,
http://developer.android.com/guide/market/billing/billing_overview.html
Apps will receive a pending intent to launch UI interface of the
Checkout upon REQUEST_PURCHASE .

I found 3 problems that confused a lot.

1.) After starting and closing (with the back button) the Dungeons
activity as attached above, the mBillingService continues to run and
show in Phone's Running Services info screen.

2.) After launching the Check-Out Intent, I found that a  task kill 
of the activity will not stop the service at all.Then a warning
appeared on the console  Scheduling restart of crashed service
com.android.vending/... . Is there any way to control over the
pre-assigned Check-Out Intent ?

3.) If I input an wrong credit card Number, the authentication keep
running without getting back to the calling activity. Any Idea about
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] passing values from service to activity

2011-11-02 Thread Firzan Gulam
hi friends...!!!
my application consist a A activity[activity consist a one ListView]
and S service, the working of service is to get the data from a remote
server database in a String format.

now my problem is how i retrieve String from Service to Activity???
plz plz help me ...!!!


:sad:

-- 
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] Stagefright: unable to set frame rate

2011-11-02 Thread Johnny
hi,

I have an application streaming video from the device to a remote
computer. When trying to set the frame rate I keep getting:
ERROR/StagefrightRecorder(131): Failed to set frame rate to 15 fps.
The actual frame rate is 30

The code I use is:
video = new MediaStreamer();
video.setVideoSource(MediaRecorder.VideoSource.CAMERA);
video.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
video.setVideoFrameRate(frameRate);

Any ideas on how to fix 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


Re: [android-developers] AlertDialog + setMultiChoiceItems + cursor, oh my!

2011-11-02 Thread Jake Wilson
Mind explaining what you did?  How did you pass the cursor into the 
OnMultiChoiceClickListener() method?

-- 
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] Ringtone and TTS

2011-11-02 Thread Thiago
Hi,

I´m developing an application that should read the contact name.
I already created the BroadcastReceiver to receive the incoming phone
call, and already created the service that 'speak' the contact name
(using TTS).

But I´m getting an issue that I have no idea how to fix it. When the
phone ring, the ringtone start to play and I cannot hear the contact
name... (I can see by the logs that it is speaking it...). But if I
silent the ringtone (for example, pressing volume down), I start to
hear my service running (it reads the name).

It seems that ringtone is not allowing TTS to speak the name together
(as ringtone is only one allowed sound at this moment).

Do you know a way to fix this? Or have both sound coming out from the
speaker at same time ?

Thanks in advance !

Regards,
-Thiago

-- 
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] Regarding Bluetooth pairing and connection

2011-11-02 Thread wiki
Hello Guys,
I have a requirement where we want to let our application handle the
pairing and connection done the same way as the process achieved via
Phone's Bluetooth settings screen.

So it is evident that we can use only SPP with Android 2,2 But is
there a way if I wanted to conencted to a headset which has HSFSp/A2Dp
profile and could pair and connect to this headset by calling some JNI
calls or etc so that I my device gets paired and conencted the same
way when I click on headset from bluetooth settings screen and it
gets paired with the device and show the paired device state as
Paired and connected.

 I can achieve the Pairing with headset with RFComm but can not make
its state to connected.

Regards,
Shobhit

-- 
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] Does android originally support Oma download?

2011-11-02 Thread nicefuture
Hi, all
 
When I use originally android browser to download Oma dd file, seems it did not 
support, and moto, htc' phone' browser can recognize the Oma dd file, and 
process based on oma download rule.
 
My question is does android originally support Oma download? Or must oem 
develop it by self?
 




nicefuture

-- 
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 register the JAR into Android system and make it work?

2011-11-02 Thread Nicefuture
I meet a problem for JAR in android.
 
1.   I create a new folder and add some java file and .mk file to compile 
the JAR file, it can successfully compiled and output into /system/frameworks.
2.   Then, in my Client apk, I just import the package name, and found it 
compiled failed, cannot found the package, then, I add LOCAL_JAVA_LIBRARIES := 
jar name in my Client apk’s mk file. Now it can compiled successfully.
3.   BUT, in runtime, VM still occurred exception that can not found the 
Class, and the JAR file already in system/framework/
4.   Then, I create a xml file, contain below info to register jar, and add 
it into system/etc/permissions.  BUT, in run time, still VM said class not 
found.
 
permissions
library name=
file=/system/framework/xxx.jar /
/permissions
 
 
What is the matter??

Since I want to add the jar as plug in, so I did not want to add it into 
bootclasspath in initial.rc
Thx a lot.
 
Send from my IPad

-- 
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] Change the label for the ProgressBar in ListFragment

2011-11-02 Thread Dauntless
I'm using SDK12.

When my ListFragment doesn't have an adapter yet, it shows an
indeterminate progressbar and the text Loading How can I change
this text?

I asked a few people, and they said that (fe) the ACL only has the
progressbar and no label. The current ListFragment documentation also
only mentions a progressbar and no label. So has this been removed in
newer SDK's or something?

-- 
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: TCP Socket communication between C# and Android

2011-11-02 Thread serene
From the .net socket , canu try to send the message with a new line
character at the end of message. ??

On Nov 1, 1:39 pm, Tonez apires...@gmail.com wrote:
 Hi Everyone,

 I have a .net c# application acting as a server listening on a
 particular port, and an Android app that I'm building acting as the
 client which will connect and send / receive tcp messages to / from
 the .net server application.  I have it working at the moment but am
 faced with a challenge that I'm hoping has a better solution than the
 one I've implemented.  My Android app connects to the .net server
 fine, upon successfully connecting the .net application sends back a
 tcp message - my Android app receives this message but it won't
 continue code execution whilst it's reading the connected stream
 unless I close the network stream in the .net server application.
 Below is the bit of code which handles reading / writing to the
 network stream:

 out = new PrintWriter( new BufferedWriter( new
 OutputStreamWriter(socketObj.getOutputStream())), true);
 in = new BufferedReader( new
 InputStreamReader( socketObj.getInputStream()));

 out.printLn(my command);

 String text = ;
 String responseStr = ;

 while ((text = in.readLine()) != null) {
 responseStr += text;

 }

 So the while loop above continues to execute until I close the network
 stream in the .net app.  Is there some way of specifying to the
 Android / Java network stream that the data being sent has ended so it
 can break out that while loop and continue code execution apart from
 closing down the network stream on the .net side?

 Thanks for the help.

 T

-- 
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] Does Gmail used C2DM?

2011-11-02 Thread Quiel
Does Gmail, Contacts and Calendar uses C2DM to do push?
The above is not open source app, but some one may know the answer.

-- 
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] Client-Server application (possibly using ADB for USB as well)

2011-11-02 Thread flip66
I am new to Java and Android programming. I have created a few very
small Client-Server programs on my PC, but am having issues doing it
with my android device. I am trying to use the same server piece from
my preview program that listens to port 8001. When I use the same
client code from my client piece in my android project it doesnt work.
Do you know of any clear tutorials for sending data on a specific
socket/ipaddress?

Also, I was looking into using ADB to talk over USB. I see that you
can forward TCP from one port to the other using something like this:

adb forward tcp:8001 tcp:23049
adb forward tcp:8001 tcp:8001?

I am a bit confused on this as well.. when I create the socket on the
android application what would i put for the ipaddress and socket
number? (10.0.2.2, 8001)? and for the server piece would i leave it as
it is listening on 8001?

Any insight to this would be helpful. I have looked at sample code,
but it is all very complicated and I just want a simple example of how
to accomplish both of these things.

-- 
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] AIDL with Map generating broken Java

2011-11-02 Thread randyv2
I have an AIDL written as follows:

interface IGameInterfaceResult {
void success(out Map result);
}

In the generated .java file, I see this being generated:

_arg0 = new java.util.Map();

This leads to my project having errors because Map can't be
instantiated.  This seems like a bug in the AIDL tool, but my googling
hasn't resulted in anything useful regarding this error.  Does anybody
have suggestions on what I should try doing to resolve this problem?

-- 
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 display a 3d model imported on to the screen

2011-11-02 Thread manne
Hi,
   can u please give me an idea about how to make my model visible on
the screen after loading it using an ObjLoader.

ex:
model = ObjLoader.load(glGame, cube.obj);

Regards,
Manne

-- 
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] HID Keyboard on Android 2.2

2011-11-02 Thread Udayan U
Hello All,

I have been trying to get a USB HID keyboard working on an Android 2.2
and Android 2.3 tablet. I connected my device to a PC and the device
was enumerated as ADB device, this was visible in the Eclipse
environment. The logcat was providing me logs of the events on the
tablet. I was able to see that when I connect the USB HID keyboard to
the Android tablet, the device was getting enumerated. A USB hub event
was raised when I connect the device and when I remove the device.
However any keyboard input was not appearing on the tablet.

What I wanted to know is,

1) Is the enumeration happening at linux kernel level ?
2) Android 2.2 and 2.3 did not have support for USB HID device, does
that something has to be done in order to get it working ?

-- 
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] View reuse in android viewpager

2011-11-02 Thread Vaibhav Mishra
I have a viewpager with nearly 200 pages   inside it and each page can have 
a webview or imageview so it is a pretty heavy and maybe because of this 
performance is very bad, I understand viewholder pattern in android 
listivew can in some sense be applied in this situation to facilitate view 
reuse and easy the load on GC, right now on every transaction GC is kicking 
in and transitions have substantial(1-2s  ) delays.

-- 
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] Install apk file

2011-11-02 Thread Subanand Thiruppathirajan
I have developed an Android application integrated with Facebook.

Can anyone please let me know if the apk files for the dependent project
com_facebook_android will be automatically included if I export the main
application in Eclipse. Should the apk files for facbook be separately on
the target mobile?

Thanks
Subanand

-- 
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 support WAP PUSH SI/SL/CO by OEMs

2011-11-02 Thread xiaodong mao
By default, Mms apk in Original Android did not support SI/SL/CO Wap
push receive/display/management. if OEM want to support it, what
should they do??

I found for SI/SL/CO Wap push, seems the broadcasting intent only
contain the Raw Push content, Does Android framework provide some
publich API to decoding the SI/SL/CO Raw Push content to quickly
retrieve the useful string based SI/SL/CO information?

-- 
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 Add OMA Download support in Browser by OEMs

2011-11-02 Thread xiaodong mao
When I use originally android browser to download Oma dd file, seems
it did not support, and moto, htc' phone' browser can recognize the
Oma dd file, and process based on oma download rule.

My question is does android originally support Oma download engine in
framework and public the API? when OEM add OMA Download in the
Browser, should them only need focus on the UI, or they also need
implement the OMA Download protocol by theirself?

-- 
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 dynamic Plug-in JAR in Android system

2011-11-02 Thread xiaodong mao
I meet a problem for JAR in android.

1.  I create a new folder and add some java file and .mk file to
compile the JAR file, it can successfully compiled and output into /
system/frameworks.
2.  Then, in my Client apk, I just import the package name, and found
it compiled failed, cannot found the package, then, I add
LOCAL_JAVA_LIBRARIES := jar name in my Client apk’s mk file. Now it
can compiled successfully.
3.  BUT, in runtime, VM still occurred exception that can not found the
Class, and the JAR file already in system/framework/
4.  Then, I create a xml file, contain below info to register jar, and
add it into system/etc/permissions.  BUT, in run time, still VM said
class not found.

permissions
library name=
file=/system/framework/xxx.jar /
/permissions


5. at last, i found i must add use-libary in my androidmanifest.xml,
then it can work.

What is the matter, per my opinion, in runtime, the xml in etc/
permissions and the jar in /system/frameworks already declare the
JAR's exist in the system, Why must i add use libary in my apk's
manifest file??

meanwhile, is it possible to make my Client can compile successfully
without add the LOCAL_JAVA_LIBRARIES := jar name in my mk file??
just like i import the SDK API, i never need add the
LOCAL_JAVA_LIBRARIES :=  in my mk file.

Thx a lot

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


Re: [android-developers] ExpandableListView expand/collapse question

2011-11-02 Thread Kostya Vasilyev

You're not updating your data structure from a non-UI thread, are you?

Other than that, make sure your getView never returns null - doing so 
will cause a crash inside obtainView:


http://www.grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/AbsListView.java#AbsListView

( this is 2.2, and seems to match your stack trace )

You can test if a ListView is pending a layout by calling 
isLayoutRequested, or by comparing the item count in the adapter with 
the list view's child count and first/last visible position. However, in 
my opinion, it's best to just assume that the list view's UI can be out 
of sync with the adapter at any time, and to instead use view tags for 
accessing the data.


-- Kostya

02.11.2011 6:11, Ash пишет:
3. If the screen is currently not actively showing the messages (as in 
I am in some other part of the application) and if I get these delete 
messages then there is no issue. HOWEVER, if I am viewing the 
expandable list view and if I get these deletion messages then the 
application dies. Output from Logcat:

11-02 02:23:12.609: ERROR/AndroidRuntime(9541): FATAL EXCEPTION: main
11-02 02:23:12.609: ERROR/AndroidRuntime(9541): 
java.lang.NullPointerException
11-02 02:23:12.609: ERROR/AndroidRuntime(9541): at 
android.widget.AbsListView.obtainView(AbsListView.java:1304)
11-02 02:23:12.609: ERROR/AndroidRuntime(9541): at 
android.widget.ListView.makeAndAddView(ListView.java:1727)
11-02 02:23:12.609: ERROR/AndroidRuntime(9541): at 
android.widget.ListView.fillDown(ListView.java:652)


4. Any idea why? My algorithm is basically remove the message from 
local list and then call notifyOnDataSetChanged. The only thing that I 
can suspect is that the the listview is being generated and in the 
process another item gets deleted. Is there a way to find out that the 
updating of the listview is finished?


--
Kostya Vasilyev

--
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] Play content of phone on PC browser

2011-11-02 Thread Sunil Mishra
Hi,

I have developed a app that lists all the available media files on the
phone.

But i am unable to play that content on web browser. Any way to do
this?

Please help, its urgent.

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


Re: [android-developers] Re: Showing notification dialog over a incoming call

2011-11-02 Thread vinay kumar mj
Hi Sunil,

I think you should use BroadcastReceiver API for this.

2011/11/2 Sunil Mishra suniljmis...@gmail.com

 Thanks Francisco for the explanation. Is there any possibility of
 doing so? any work around?

 On Nov 2, 11:18 am, Francisco Dalla Rosa soares soa...@argo.bz
 wrote:
  when a call comes, your activity goes to background and the phone app's
  activity becomes active.
  You're trying to show a dialog that is tied to a activity that's not
  running at the moment, thus the error.
  Toasts don't have these strong ties to the activity showing them.
 that's
  why it works.
 
  2011/11/2 Sunil Mishra suniljmis...@gmail.com
 
 
 
 
 
 
 
 
 
   Hi,
 
   The log -
 
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
   11-02 11:25:57.706: ERROR/AndroidRuntime(339):
   android.view.WindowManager$BadTokenException: Unable to add window --
   token android.os.BinderProxy@44e7d968 is not valid; is your activity
   running?
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.ViewRoot.setView(ViewRoot.java:505)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.Window$LocalWindowManager.addView(Window.java:424)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.app.Dialog.show(Dialog.java:241)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   com.motorola.EzeeTransferActivity
   $1.onCallStateChanged(EzeeTransferActivity.java:63)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.telephony.PhoneStateListener
   $2.handleMessage(PhoneStateListener.java:319)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.os.Handler.dispatchMessage(Handler.java:99)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.os.Looper.loop(Looper.java:123)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.app.ActivityThread.main(ActivityThread.java:4627)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   java.lang.reflect.Method.invokeNative(Native Method)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   java.lang.reflect.Method.invoke(Method.java:521)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:868)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   dalvik.system.NativeStart.main(Native Method)
 
   On Oct 26, 7:36 am, gjs garyjamessi...@gmail.com wrote:
Hi,
 
Examine or post console log showing the error.
 
Regards
 
On Oct 25, 8:10 pm,SunilMishrasuniljmis...@gmail.com wrote:
 
 Hi,
 
 I have written a code to display a dialog box when a incoming call
 arrives, but it crashes.
 It is working fine when done by only displaying message using
 Toast.
 
 Please 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
 
  --
  株式会社アルゴ ARGO Inc.
  〒130-0012
  東京都墨田区太平3-11-10
  NTKオオノビル8階
 
  ソアレス フランシスコ ( Soares Francisco )
  Mail : soa...@argo.bz HP :http://www.argo.bz/
  TEL:03-5619-4511 FAX:03-5619-4512

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


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

Re: [android-developers] Re: Showing notification dialog over a incoming call

2011-11-02 Thread vinay kumar mj
Hi Sunil,

I think you should use BroadcastReceiver API for this.Below link may
helpfull.

http://thinkandroid.wordpress.com/2010/02/02/custom-intents-and-broadcasting-with-receivers/


Hi Sunil,

 I think you should use BroadcastReceiver API for this.


 2011/11/2 Sunil Mishra suniljmis...@gmail.com

 Thanks Francisco for the explanation. Is there any possibility of
 doing so? any work around?

 On Nov 2, 11:18 am, Francisco Dalla Rosa soares soa...@argo.bz
 wrote:
  when a call comes, your activity goes to background and the phone app's
  activity becomes active.
  You're trying to show a dialog that is tied to a activity that's not
  running at the moment, thus the error.
  Toasts don't have these strong ties to the activity showing them.
 that's
  why it works.
 
  2011/11/2 Sunil Mishra suniljmis...@gmail.com
 
 
 
 
 
 
 
 
 
   Hi,
 
   The log -
 
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
   11-02 11:25:57.706: ERROR/AndroidRuntime(339):
   android.view.WindowManager$BadTokenException: Unable to add window --
   token android.os.BinderProxy@44e7d968 is not valid; is your activity
   running?
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.ViewRoot.setView(ViewRoot.java:505)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.view.Window$LocalWindowManager.addView(Window.java:424)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.app.Dialog.show(Dialog.java:241)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   com.motorola.EzeeTransferActivity
   $1.onCallStateChanged(EzeeTransferActivity.java:63)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.telephony.PhoneStateListener
   $2.handleMessage(PhoneStateListener.java:319)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.os.Handler.dispatchMessage(Handler.java:99)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.os.Looper.loop(Looper.java:123)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   android.app.ActivityThread.main(ActivityThread.java:4627)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   java.lang.reflect.Method.invokeNative(Native Method)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   java.lang.reflect.Method.invoke(Method.java:521)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:868)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
   11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
   dalvik.system.NativeStart.main(Native Method)
 
   On Oct 26, 7:36 am, gjs garyjamessi...@gmail.com wrote:
Hi,
 
Examine or post console log showing the error.
 
Regards
 
On Oct 25, 8:10 pm,SunilMishrasuniljmis...@gmail.com wrote:
 
 Hi,
 
 I have written a code to display a dialog box when a incoming call
 arrives, but it crashes.
 It is working fine when done by only displaying message using
 Toast.
 
 Please 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
 
  --
  株式会社アルゴ ARGO Inc.
  〒130-0012
  東京都墨田区太平3-11-10
  NTKオオノビル8階
 
  ソアレス フランシスコ ( Soares Francisco )
  Mail : soa...@argo.bz HP :http://www.argo.bz/
  TEL:03-5619-4511 FAX:03-5619-4512

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




-- 
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] bypass android Error dialogs

2011-11-02 Thread Jey
Hi all,

can we show our custom dialog's when any exception occurs?
i can catch the exception with help of UncaughtExceptionHandler but i
need to disable error dialogs

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

2011-11-02 Thread leigh8347
The peice of code im using to disply the date and time is as follows

datetime.toString()

but like i said this does not update
regards


On Nov 2, 12:02 am, Lew lewbl...@gmail.com wrote:
 leigh8347 wrote:

  im [sic] making an app that writes to a .txt file and at the end of each
  save i want to put the date and time.

  this is my code that turns the time/date into a string. which works
  fine.

  SimpleDateFormat dateFormat = new SimpleDateFormat(dd/MM/
  hh:mm:ss);
  java.util.Date date = new java.util.Date();
  final String datetime = dateFormat.format(date);

  The problem im [sic] having is every time i save the time does not update.
  each row has the same time and date?

 Sounds like you are using the same 'datetime' reference for each save,
 perhaps by doing the save at the end of a longer process?

 It's impossible to say since the problem is in the code you have not shown.

 http://sscce.org/
 please

 --
 Lew

-- 
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 Quick Action Dialog

2011-11-02 Thread Bishan
I have created a Quick Action Dialog after reading article on
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/.

Now i'm trying to display data on this Quick Action Dialog which retrieved
from sqlite database as a list.
how can i do this? how could implement list on Quick Action Dialog with
data retrieved from sqlite database ?

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

[android-developers] Re: Get the URI of audio files(.mp3) stored in raw folder

2011-11-02 Thread Kartik Domadiya
Finally after searching a lot i found the solution.

If you want to get any resource URI then there are two ways :

Using Resource Name

Syntax : android.resource://[package]/[res type]/[res name]

Example : Uri.parse(android.resource://com.segf4ult.test/drawable/
icon);

Using Resource Id

Syntax : android.resource://[package]/[resource_id]

Example : Uri.parse(android.resource://com.segf4ult.test/ +
R.drawable.icon);

This were the examples to get the URI of any image file stored in
drawable folder.

Similarly you can get URIs of res/raw folder.

In my case i used 1st way ie. Using Resource Name


On Nov 1, 5:52 pm, Kartik Domadiya kartikdomad...@gmail.com wrote:
 I want to send .mp3 file via mail (using share intent).

 I have tried the following code :

 Intent share = new Intent(Intent.ACTION_SEND);
 share.setType(*/*);
 share.putExtra(Intent.EXTRA_STREAM,Uri.parse(android.resource://
 com.my.android.package/+resId));
 startActivity(Intent.createChooser(share, Share Sound));

 Log of Uri.parse(android.resource://com.my.android.package/+resId)
 shows the below string :

 android.resource://com.my.android.package/2130968609

 When i select any mail application, the audio file(.mp3)  gets
 attached with resourceId.mp3 file (2130968609). I dont want that.

 I want to get fileName.mp3. I want something like android.resource://
 com.my.android.package/fileName.mp3. So that user can recognize the
 file they wanted to share.

 How can i do that ?

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


[android-developers] Re: Get the URI of audio files(.mp3) stored in raw folder

2011-11-02 Thread Kartik Domadiya
Finally after searching a lot i found the solution.

If you want to get any resource URI then there are two ways :

Using Resource Name

Syntax : android.resource://[package]/[res type]/[res name]

Example : Uri.parse(android.resource://com.segf4ult.test/drawable/
icon);

Using Resource Id

Syntax : android.resource://[package]/[resource_id]

Example : Uri.parse(android.resource://com.segf4ult.test/ +
R.drawable.icon);

This were the examples to get the URI of any image file stored in
drawable folder.

Similarly you can get URIs of res/raw folder.

In my case i used 1st way ie. Using Resource Name


On Nov 1, 5:52 pm, Kartik Domadiya kartikdomad...@gmail.com wrote:
 I want to send .mp3 file via mail (using share intent).

 I have tried the following code :

 Intent share = new Intent(Intent.ACTION_SEND);
 share.setType(*/*);
 share.putExtra(Intent.EXTRA_STREAM,Uri.parse(android.resource://
 com.my.android.package/+resId));
 startActivity(Intent.createChooser(share, Share Sound));

 Log of Uri.parse(android.resource://com.my.android.package/+resId)
 shows the below string :

 android.resource://com.my.android.package/2130968609

 When i select any mail application, the audio file(.mp3)  gets
 attached with resourceId.mp3 file (2130968609). I dont want that.

 I want to get fileName.mp3. I want something like android.resource://
 com.my.android.package/fileName.mp3. So that user can recognize the
 file they wanted to share.

 How can i do that ?

-- 
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] Cannot install a release build

2011-11-02 Thread cipher_neo
I have built a really simple android app, that I can install on the S2 when 
I do a debug build (which is the default build when you select build in 
netbeans using the nbandroid plugin).

When I do a release build however, the app will not install.

I did a logcat and the following is the output during the attempt to 
install the release build:

I/InputDispatcher( 2701): Delivering touch to current input target: action: 
0, channel 'PointerDevice-22613 (server)'
I/InputReader( 2701): dispatchTouch::touch event's action is 1
I/InputDispatcher( 2701): Delivering touch to current input target: action: 
1, channel '40accc10 
com.android.packageinstaller/com.android.packageinstaller.PackageInstallerActivity
 
(server)'
I/InputDispatcher( 2701): Delivering touch to current input target: action: 
1, channel 'PointerDevice-22613 (server)'
I/ActivityManager( 2701): Starting: Intent { 
dat=file:///mnt/sdcard/download/cluey-mobile-1.apk 
cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } from 
pid 22866
W/ActivityManager( 2701): Trying to launch 
com.android.packageinstaller/.InstallAppProgress
D/dalvikvm(22892): GC_EXPLICIT freed 8K, 53% free 2532K/5379K, external 
0K/0K, paused 69ms
D/VoldCmdListener( 2574): volume aseced /mnt/sdcard/external_sd
D/MountService( 2701): getAsecVolumeState :: result = mounted
I/DmAppInfo( 2701): getApplicationsList found row counts : 0 For Pkg : 
com.cluey.main
D/dalvikvm(22892): GC_EXPLICIT freed 3K, 53% free 2531K/5379K, external 
0K/0K, paused 19ms
D/VoldCmdListener( 2574): volume aseced /mnt/sdcard/external_sd
D/MountService( 2701): getAsecVolumeState :: result = mounted
W/ActivityManager( 2701): No content provider found for: 
W/ActivityManager( 2701): No content provider found for: 


I am lost as to what is actually going on. Any help 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

Re: [android-developers] Re: date and time

2011-11-02 Thread Robert Slama
try add follow line before format to string :
date.setTime(System.currentTimeMillis());

r^

On 2 November 2011 10:44, leigh8347 leigh8...@aol.com wrote:

 The peice of code im using to disply the date and time is as follows

 datetime.toString()

 but like i said this does not update
 regards


 On Nov 2, 12:02 am, Lew lewbl...@gmail.com wrote:
  leigh8347 wrote:
 
   im [sic] making an app that writes to a .txt file and at the end of
 each
   save i want to put the date and time.
 
   this is my code that turns the time/date into a string. which works
   fine.
 
   SimpleDateFormat dateFormat = new SimpleDateFormat(dd/MM/
   hh:mm:ss);
   java.util.Date date = new java.util.Date();
   final String datetime = dateFormat.format(date);
 
   The problem im [sic] having is every time i save the time does not
 update.
   each row has the same time and date?
 
  Sounds like you are using the same 'datetime' reference for each save,
  perhaps by doing the save at the end of a longer process?
 
  It's impossible to say since the problem is in the code you have not
 shown.
 
  http://sscce.org/
  please
 
  --
  Lew

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


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

Re: [android-developers] Parsing JSON data using JSONTokener shows nothing ...

2011-11-02 Thread Ashish Tiwari
Tried JSONObject object = new JSONObject(json);
but result is same ...

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

Re: [android-developers] bypass android Error dialogs

2011-11-02 Thread Mark Murphy
If you have the default uncaught exception handler, and do not
re-raise the exception, no error dialogs should appear except your
own.

On Wed, Nov 2, 2011 at 6:21 AM, Jey jp9894562...@gmail.com wrote:
 Hi all,

            can we show our custom dialog's when any exception occurs?
 i can catch the exception with help of UncaughtExceptionHandler but i
 need to disable error dialogs

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Re: Zooming Polygons: Can i know if the polygon borders are reaching the borders of the screen?

2011-11-02 Thread TreKing
On Wed, Nov 2, 2011 at 3:35 AM, saex elpablos...@gmail.com wrote:

 Please, can you explain how to do it?


Nope, sorry, haven't needed to do this kind of stuff for quite some time.
This is really not Android specific. Some math or game development sites
might suit you better.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] About Quick Action Dialog

2011-11-02 Thread Mark Murphy
Quick action dialogs like the ones you link to are not designed for
displaying information, but rather to give the user rapid access to an
array of actions to take against something. Please use some other UI
model for displaying a list of output.

On Wed, Nov 2, 2011 at 6:53 AM, Bishan tvbis...@gmail.com wrote:
 I have created a Quick Action Dialog after reading article
 on http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/.
 Now i'm trying to display data on this Quick Action Dialog which retrieved
 from sqlite database as a list.
 how can i do this? how could implement list on Quick Action Dialog with
 data retrieved from sqlite database ?

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



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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] How to dynamic Plug-in JAR in Android system

2011-11-02 Thread Mark Murphy
Please visit http://source.android.com, click on the Community tab,
find a Google Group relevant for your firmware questions, and ask
there. This list is for developing with the Android SDK.

On Wed, Nov 2, 2011 at 5:43 AM, xiaodong mao nicefut...@126.com wrote:
 I meet a problem for JAR in android.

 1.      I create a new folder and add some java file and .mk file to
 compile the JAR file, it can successfully compiled and output into /
 system/frameworks.
 2.      Then, in my Client apk, I just import the package name, and found
 it compiled failed, cannot found the package, then, I add
 LOCAL_JAVA_LIBRARIES := jar name in my Client apk’s mk file. Now it
 can compiled successfully.
 3.      BUT, in runtime, VM still occurred exception that can not found the
 Class, and the JAR file already in system/framework/
 4.      Then, I create a xml file, contain below info to register jar, and
 add it into system/etc/permissions.  BUT, in run time, still VM said
 class not found.

 permissions
    library name=
            file=/system/framework/xxx.jar /
 /permissions


 5. at last, i found i must add use-libary in my androidmanifest.xml,
 then it can work.

 What is the matter, per my opinion, in runtime, the xml in etc/
 permissions and the jar in /system/frameworks already declare the
 JAR's exist in the system, Why must i add use libary in my apk's
 manifest file??

 meanwhile, is it possible to make my Client can compile successfully
 without add the LOCAL_JAVA_LIBRARIES := jar name in my mk file??
 just like i import the SDK API, i never need add the
 LOCAL_JAVA_LIBRARIES :=  in my mk file.

 Thx a lot

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] How to Add OMA Download support in Browser by OEMs

2011-11-02 Thread Mark Murphy
Please visit http://source.android.com, click on the Community tab,
find a Google Group relevant for your firmware questions, and ask
there. This list is for developing with the Android SDK.

On Wed, Nov 2, 2011 at 5:37 AM, xiaodong mao nicefut...@126.com wrote:
 When I use originally android browser to download Oma dd file, seems
 it did not support, and moto, htc' phone' browser can recognize the
 Oma dd file, and process based on oma download rule.

 My question is does android originally support Oma download engine in
 framework and public the API? when OEM add OMA Download in the
 Browser, should them only need focus on the UI, or they also need
 implement the OMA Download protocol by theirself?

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] How to support WAP PUSH SI/SL/CO by OEMs

2011-11-02 Thread Mark Murphy
Please visit http://source.android.com, click on the Community tab,
find a Google Group relevant for your firmware questions, and ask
there. This list is for developing with the Android SDK.

On Wed, Nov 2, 2011 at 5:35 AM, xiaodong mao nicefut...@126.com wrote:
 By default, Mms apk in Original Android did not support SI/SL/CO Wap
 push receive/display/management. if OEM want to support it, what
 should they do??

 I found for SI/SL/CO Wap push, seems the broadcasting intent only
 contain the Raw Push content, Does Android framework provide some
 publich API to decoding the SI/SL/CO Raw Push content to quickly
 retrieve the useful string based SI/SL/CO information?

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] AIDL with Map generating broken Java

2011-11-02 Thread Mark Murphy
Try switching to:

Map success();

It may be that Map does not support out properly. I have never used
the out keyword in AIDL, as it leads to scary programming (relying on
side-effects applied to parameters).

On Mon, Oct 31, 2011 at 9:52 PM, randyv2 randythech...@gmail.com wrote:
 I have an AIDL written as follows:

 interface IGameInterfaceResult {
        void success(out Map result);
 }

 In the generated .java file, I see this being generated:

 _arg0 = new java.util.Map();

 This leads to my project having errors because Map can't be
 instantiated.  This seems like a bug in the AIDL tool, but my googling
 hasn't resulted in anything useful regarding this error.  Does anybody
 have suggestions on what I should try doing to resolve this problem?

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


[android-developers] Error in window format

2011-11-02 Thread cipher_neo
I have a strange error in my app with regards to setting a window format.
It only happens on a samsung galaxy s, but it doesn't happen on the S2.

I/dalvikvm(24119): DexOpt: illegal method access (call 
Landroid/view/Window;.setDefaultWindowFormat (I)V from Landroid/view/c;)
I/dalvikvm(24119): Could not find method 
android.view.Window.setDefaultWindowFormat, referenced from method 
android.view.c.a
W/dalvikvm(24119): VFY: unable to resolve virtual method 1880: 
Landroid/view/Window;.setDefaultWindowFormat (I)V

I have hit google for some answers but couldn't find anything...

anyone know what might be going on here?

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

Re: [android-developers] how to register the JAR into Android system and make it work?

2011-11-02 Thread Mark Murphy
Please visit http://source.android.com, click on the Community tab,
find a Google Group relevant for your firmware questions, and ask
there. This list is for developing with the Android SDK.

On Tue, Nov 1, 2011 at 10:39 AM, Nicefuture nicefut...@126.com wrote:
 I meet a problem for JAR in android.



 1.   I create a new folder and add some java file and .mk file to
 compile the JAR file, it can successfully compiled and output into
 /system/frameworks.

 2.   Then, in my Client apk, I just import the package name, and found
 it compiled failed, cannot found the package, then, I add
 LOCAL_JAVA_LIBRARIES := jar name in my Client apk’s mk file. Now it can
 compiled successfully.

 3.   BUT, in runtime, VM still occurred exception that can not found the
 Class, and the JAR file already in system/framework/

 4.   Then, I create a xml file, contain below info to register jar, and
 add it into system/etc/permissions.  BUT, in run time, still VM said class
 not found.



 permissions

     library name=

     file=/system/framework/xxx.jar /

 /permissions





 What is the matter??

 Since I want to add the jar as plug in, so I did not want to add it into
 bootclasspath in initial.rc

 Thx a lot.


 Send from my IPad

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



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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Does Gmail used C2DM?

2011-11-02 Thread Mark Murphy
I suspect that the answer is yes, at least for Gmail. As you indicate,
we do not know for certain.

On Tue, Nov 1, 2011 at 1:45 AM, Quiel quieldeguz...@gmail.com wrote:
 Does Gmail, Contacts and Calendar uses C2DM to do push?
 The above is not open source app, but some one may know the answer.

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Does android originally support Oma download?

2011-11-02 Thread Mark Murphy
Please visit http://source.android.com, click on the Community tab,
find a Google Group relevant for your firmware questions, and ask
there. This list is for developing with the Android SDK.

On Tue, Nov 1, 2011 at 10:46 PM, nicefuture nicefut...@126.com wrote:
 Hi, all



 When I use originally android browser to download Oma dd file, seems it did
 not support, and moto, htc' phone' browser can recognize the Oma dd file,
 and process based on oma download rule.



 My question is does android originally support Oma download? Or must oem
 develop it by self?




 
 nicefuture

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



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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Starting Google Analytics session when application goes to background

2011-11-02 Thread TreKing
On Wed, Nov 2, 2011 at 2:51 AM, Aki arnab...@gmail.com wrote:

 Apparently iOS provides some way to detect the
 application-going-to-background state (not sure though, never used iOS, but
 read something related to it in StackOverflow) . I think it is a good
 feature. Any reason why Android doesn't provide us a way to do this?


There is technically no such things as application-going-to-background,
it's more like another Activity has come to foreground. Even when you
press the home key, you're not really putting you application in the
background - you're bringing the Home activity to the foreground. So this
concept doesn't really make sense in Android. If you want to do what you
describe, you will have to use the track each Activity method, painful as
it may be with your numerous activities.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] passing values from service to activity

2011-11-02 Thread Mark Murphy
Use a Messenger passed over via an Intent extra to the service. Or a
PendingIntent passed over via an Intent extra to the service, such as
the one returned by createPendingResult(). Or broadcast an Intent that
is picked up by a BroadcastReceiver registered by your activity.

On Tue, Nov 1, 2011 at 4:24 AM, Firzan Gulam
firzan.itechnolo...@gmail.com wrote:
 hi friends...!!!
 my application consist a A activity[activity consist a one ListView]
 and S service, the working of service is to get the data from a remote
 server database in a String format.

 now my problem is how i retrieve String from Service to Activity???
 plz plz help me ...!!!


 :sad:

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Re: need help

2011-11-02 Thread TreKing
On Wed, Nov 2, 2011 at 1:03 AM, Divyata Panchal panchal.divyat...@gmail.com
 wrote:

 i want to add an option to contact inflate when long pressing any contact
 number from contact list...


What have you tried thus far?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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: Showing notification dialog over a incoming call

2011-11-02 Thread Sunil Mishra
Hi Vinay,

I tried the same application that is given in that link, but i am
unable to produce the results. Can u please cross check whether it is
working or not.

On Nov 2, 3:18 pm, vinay kumar mj vinay.andr...@gmail.com wrote:
 Hi Sunil,

 I think you should use BroadcastReceiver API for this.Below link may
 helpfull.

 http://thinkandroid.wordpress.com/2010/02/02/custom-intents-and-broad...

 Hi Sunil,









  I think you should use BroadcastReceiver API for this.

  2011/11/2 Sunil Mishra suniljmis...@gmail.com

  Thanks Francisco for the explanation. Is there any possibility of
  doing so? any work around?

  On Nov 2, 11:18 am, Francisco Dalla Rosa soares soa...@argo.bz
  wrote:
   when a call comes, your activity goes to background and the phone app's
   activity becomes active.
   You're trying to show a dialog that is tied to a activity that's not
   running at the moment, thus the error.
   Toasts don't have these strong ties to the activity showing them.
  that's
   why it works.

   2011/11/2 Sunil Mishra suniljmis...@gmail.com

Hi,

The log -

11-02 11:25:57.706: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
11-02 11:25:57.706: ERROR/AndroidRuntime(339):
android.view.WindowManager$BadTokenException: Unable to add window --
token android.os.BinderProxy@44e7d968 is not valid; is your activity
running?
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.ViewRoot.setView(ViewRoot.java:505)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.view.Window$LocalWindowManager.addView(Window.java:424)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.app.Dialog.show(Dialog.java:241)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
com.motorola.EzeeTransferActivity
$1.onCallStateChanged(EzeeTransferActivity.java:63)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.telephony.PhoneStateListener
$2.handleMessage(PhoneStateListener.java:319)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.os.Looper.loop(Looper.java:123)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
android.app.ActivityThread.main(ActivityThread.java:4627)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
java.lang.reflect.Method.invokeNative(Native Method)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
java.lang.reflect.Method.invoke(Method.java:521)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-02 11:25:57.706: ERROR/AndroidRuntime(339): at
dalvik.system.NativeStart.main(Native Method)

On Oct 26, 7:36 am, gjs garyjamessi...@gmail.com wrote:
 Hi,

 Examine or post console log showing the error.

 Regards

 On Oct 25, 8:10 pm,SunilMishrasuniljmis...@gmail.com wrote:

  Hi,

  I have written a code to display a dialog box when a incoming call
  arrives, but it crashes.
  It is working fine when done by only displaying message using
  Toast.

  Please 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

   --
   株式会社アルゴ ARGO Inc.
   〒130-0012
   東京都墨田区太平3-11-10
   NTKオオノビル8階

   ソアレス フランシスコ ( Soares Francisco )
   Mail : soa...@argo.bz HP :http://www.argo.bz/
   TEL:03-5619-4511 FAX:03-5619-4512

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

-- 
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] Issue while using android.support.v4.jar compatibility library

2011-11-02 Thread pop
I am trying to modify an app (core app) using the android provided
library: android.support.v4.jar. Have included the jar and set the
build path. Still while I compile it throws me the above error. Seems
to be like the app uses proguard to obfuscate and It actually excludes
some of the library classes while building.
Please help.

Logs:
Reading library jar [/home/m/GingerBread/android/out/target/common/obj/
JAVA_LIBRARIES/framework_intermediates/classes.jar] Warning:
android.support.v4.os.ParcelableCompatCreatorHoneycombMR2: can't find
superclass or interface android.os.Parcelable$ClassLoaderCreator
Warning: android.support.v4.os.ParcelableCompatCreatorHoneycombMR2:
can't find referenced class android.os.Parcelable$ClassLoaderCreator
Warning: android.support.v4.os.ParcelableCompatCreatorHoneycombMR2:
can't find referenced class android.os.Parcelable$ClassLoaderCreator
Warning: android.support.v4.app.ActivityCompatHoneycomb: can't find
referenced method 'void invalidateOptionsMenu()' in class
android.app.Activity Warning:
android.support.v4.app.ActivityCompatHoneycomb: can't find referenced
method 'void
dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])'
in class android.app.Activity Reading library jar [/home/m/GingerBread/
android/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/
classes.jar] Reading library jar [/home/m/GingerBread/android/out/
target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar]
Warning: android.support.v4.view.MenuCompatHoneycomb: can't find
referenced method 'void setShowAsAction(int)' in class
android.view.MenuItem Reading library jar [/home/m/GingerBread/android/
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
classes.jar] Note: com.android.common.SharedPreferencesCompat accesses
a method 'apply()' dynamically Maybe this is library method
'android.app.ContextImpl$SharedPreferencesImpl$EditorImpl { void
apply(); }' Maybe this is library method
'android.content.SharedPreferences$Editor { void apply(); }' Note: the
configuration refers to the unknown class
'com.android.email.mail.MessageRetrievalListener' Note: there were 1
references to unknown classes. You should check your configuration for
typos. Note: there were 1 accesses to class members by means of
introspection. You should consider explicitly keeping the mentioned
class members (using '-keep' or '-keepclassmembers'). Warning: there
were 3 unresolved references to classes or interfaces. You may need to
specify additional library jars (using '-libraryjars'), or perhaps the
'-dontskipnonpubliclibraryclasses' option. Warning: there were 3
unresolved references to program class members. Your input classes
appear to be inconsistent. You may need to recompile them and try
again. Alternatively, you may have to specify the options '-
dontskipnonpubliclibraryclasses' and/or '-
dontskipnonpubliclibraryclassmembers'. Error: Please correct the above
warnings first. make: * [out/target/common/obj/APPS/
Email_intermediates/proguard.classes.jar] Error 1

-- 
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] Back key handling with ActivityGroup in TabView

2011-11-02 Thread piyu
Hi,
  In my application I am adding activity group in my Tab content to
open new activities in same tab. And in onKey handling inside tab
child activity calling popView() method of activity group witch is
having track of all child activities of that tab. This case is working
fine if tab child activity having focus but in case if child activity
doesn't have focus its calling finish of tab activity instead of tab
child activity.

Lets say 'T'  is Tab activity which is having 2 tabs 'T1' and 'T2'.
and 'T1' having 'A1' activity group which is starting activity  'Ac1' -
 'Ac2' for setContentView(). If 'Ac2' doesn't have any focus and
press back key then its finishing Tab activity 'T' instead of giving
call back to 'Ac1' finishFromChildActivity() method. It should call
finish of 'Ac2' instead of finish of Tab 'T' as calling if activity
'Ac2' having focus on any view component.

-- 
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: Back key handling with ActivityGroup in TabView

2011-11-02 Thread arnouf
You must set a tag to know which view / tab is displayed.
You could use onBackPressed() method and check which tags is active and 
display or not your popView.

-- 
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: speech recording

2011-11-02 Thread ktuluceng
hi,

 Again me :) ı correct my  code and new code is here ;
package Uygulamalarim.Sesdeneme;

import java.io.IOException;
import android.app.Activity;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.Button;

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


Button kaydet = (Button) findViewById(R.id.button1);
kaydet.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
try {
MRX = new MediaRecorder();


MRX.setAudioSource(MediaRecorder.AudioSource.MIC);

MRX.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);

MRX.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

MRX.setOutputFile(Environment.getExternalStorageDirectory()

.getAbsolutePath()+/gpp/record1.3gp);

MRX.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
MRX.start();
}
});

Button dur = (Button) findViewById(R.id.button2);
dur.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
MRX.stop();
MRX.release();
}
});
}
}


 but this is have an error. ı debug this project. and ı take

11-02 11:42:43.677: W/System.err(486): java.io.FileNotFoundException: /
mnt/sdcard (Is a directory)
11-02 09:53:34.088: W/KeyCharacterMap(338): Using default keymap: /
system/usr/keychars/qwerty.kcm.bin
11-02 09:53:43.647: D/dalvikvm(338): GC_EXPLICIT freed 53K, 53% free
2572K/5379K, external 1625K/2137K, paused 2992ms
11-02 09:53:59.960: D/AndroidRuntime(371): Shutting down VM
11-02 09:53:59.960: W/dalvikvm(371): threadid=1: thread exiting with
uncaught exception (group=0x40015560)
11-02 09:54:00.108: E/AndroidRuntime(371): FATAL EXCEPTION: main
11-02 09:54:00.108: E/AndroidRuntime(371): java.lang.RuntimeException:
Unable to start activity ComponentInfo{uygulamalarim.sesal/
uygulamalarim.sesal.SesalActivity}: java.lang.ClassCastException:
uygulamalarim.sesal.SesalActivity
11-02 11:42:43.727: W/System.err(486):  at
Uygulamalarim.Sesdeneme.SesdenemeActivity
$1.onClick(SesdenemeActivity.java:33)
11-02 11:42:43.737: W/System.err(486):  at
android.view.View.performClick(View.java:2485)
11-02 11:42:43.747: W/System.err(486):  at android.view.View
$PerformClick.run(View.java:9080)
11-02 11:42:43.747: W/System.err(486):  at
android.os.Handler.handleCallback(Handler.java:587)
11-02 11:42:43.747: W/System.err(486):  at
android.os.Handler.dispatchMessage(Handler.java:92)
11-02 11:42:43.767: W/System.err(486):  at
android.os.Looper.loop(Looper.java:123)
11-02 11:42:43.767: W/System.err(486):  at
android.app.ActivityThread.main(ActivityThread.java:3683)
11-02 11:42:43.787: W/System.err(486):  at
java.lang.reflect.Method.invokeNative(Native Method)
11-02 11:42:43.787: W/System.err(486):  at
java.lang.reflect.Method.invoke(Method.java:507)
11-02 11:42:43.787: W/System.err(486):  at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-02 11:42:43.807: W/System.err(486):  at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-02 11:42:43.807: W/System.err(486):  at
dalvik.system.NativeStart.main(Native Method)
11-02 11:42:43.807: E/MediaRecorder(486): start called in an invalid
state: 4
11-02 11:42:43.827: D/AndroidRuntime(486): Shutting down VM
11-02 11:42:43.827: W/dalvikvm(486): threadid=1: thread exiting with
uncaught exception (group=0x40015560)
11-02 11:42:43.867: E/AndroidRuntime(486): FATAL EXCEPTION: main
11-02 11:42:43.867: E/AndroidRuntime(486):
java.lang.IllegalStateException
11-02 11:42:43.867: E/AndroidRuntime(486):  at
android.media.MediaRecorder.start(Native Method)
11-02 11:42:43.867: 

[android-developers] Re: Showing notification dialog over a incoming call

2011-11-02 Thread arnouf
When you say that you're unable to produce the results...what happens 
exactly. 
Did you set good permission and action to catch in your AndroidManifest xml 
file ?

-- 
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] Application in memory card

2011-11-02 Thread kalandar
hi friends,
  Is there a way to install app in android external memory?
  or all application will only install in internal memory?
  please give me some idea about it...

regards,
kalandar

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


[android-developers] Re: Get the URI of audio files(.mp3) stored in raw folder

2011-11-02 Thread arnouf
I don't know why you add in /res/raw, but maybe it could more interesting 
to put these files in assets. 
Maybe you can set a specific name building your shareintent.

-- 
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: Install apk file

2011-11-02 Thread arnouf
When you generate the file the FB ressources files will be added in your 
apk.

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

Re: [android-developers] Application in memory card

2011-11-02 Thread Mark Murphy
http://developer.android.com/guide/appendix/install-location.html

On Wed, Nov 2, 2011 at 8:11 AM, kalandar kasimk...@gmail.com wrote:
 hi friends,
      Is there a way to install app in android external memory?
      or all application will only install in internal memory?
      please give me some idea about it...

 regards,
 kalandar

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




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

_Android Programming Tutorials_ Version 4.0 Available!

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


[android-developers] Re: how to install my apk file into android mobile with eclipses?

2011-11-02 Thread arnouf
first, check your phone in Application parameters if you accept : debug 
connectio (in developers section) and if you set your phone to accepte 
unknown source.
If your device is known by eclipse you can see it in DDMS perspective, you 
must install drivers (windows) or change your udev file (Linux).
Look here for more information :
http://developer.android.com/guide/developing/device.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] Changing the icon for the All Apps Button

2011-11-02 Thread erik wagner
Hi,
I am looking to actually replace the 'All Apps' button on the Android
home screen.  I know there is the Home sample app, as near as I can
tell (and please correct me if I'm wrong) it overlays a separate home
button on top of the existing one - instead of actually replacing it.
Is there a way to actually replace the All Apps icon on the Android
home screen?
Sorry if this is a duplicate question, searching for 'all apps button'
returns a dizzying array of non-pertinent results.
Thanks,
Erik Wagner

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


Re: [android-developers] Changing the icon for the All Apps Button

2011-11-02 Thread Mark Murphy
On Wed, Nov 2, 2011 at 8:28 AM, erik wagner erik.j.wag...@gmail.com wrote:
 I am looking to actually replace the 'All Apps' button on the Android
 home screen.  I know there is the Home sample app, as near as I can
 tell (and please correct me if I'm wrong) it overlays a separate home
 button on top of the existing one - instead of actually replacing it.
 Is there a way to actually replace the All Apps icon on the Android
 home screen?

No, short of hacking the app on a rooted phone. Bear in mind that
there is no single Android home screen -- there are probably a few
dozen in use on production hardware and uncounted home screens you can
download from the Android Market.

You can create your own home screen app (see the sample app you
mention). Users will then have a choice of running your app or the
built-in one when they press HOME. If they make your app the default,
they will go to your app exclusively when the press HOME, until they
remove your app or launch in safe mode.

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

_Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Parsing JSON data using JSONTokener shows nothing ...

2011-11-02 Thread Ashish Tiwari
I fixed that problem,
by using this,

   String json = {+
name:\ashish\,  +
 message:\hey see this\,  +
 place:\gurgaon\,  +
 date:\aaj ka date hai \  +
 };

Thanks for your suggestion.

-- 
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] Printing From Android Device

2011-11-02 Thread Andriod Developer
Hello Friends,

Thanks in advance,

I want print doc from my android device/emulator

This apps should be generic i.e. Any kind of printer device will be
able ti print from
mobile apps.

Please tell me How i can ?


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


[android-developers] How does the gluProject function work? I can't understand it

2011-11-02 Thread saex
I need to show a square polygon with the 100% of the width of the
screen, then, i supose that i must zoom it (with Z axis) until the
polygon borders are tounching the screen borders.

I'm trying to achieve this using gluProject to project a coordinate in
3D into a 2D screen coordinate. If the screen coordinate is either 0
or matches the width or height, then it is touching a screen border.

The problem is that something is going wrong, the `outputCoords` array
returned with gluProject is giving me these values: 0,0,0.5,  but my
square is centered on the sreen, and with Z=-5.0f

I dont understand these values...

This is the code i'm using to obtain the 2D Projection of my square
poligon on the screen:


/// NEW CODE FOR SCALING THE AR IMAGE TO THE DESIRED
WIDTH /

mg.getCurrentModelView(gl);
mg.getCurrentProjection(gl);

float [] modelMatrix = new float[16];
float [] projMatrix = new float[16];
modelMatrix=mg.mModelView;
projMatrix=mg.mProjection;
int [] mView = new int[4];
// Fill this with your window width and height
mView[0] = 0;
mView[1] = 0;
mView[2] = 800; //width
mView[3] = 480; //height
// Make sure you have 3 components in this array even if the
screen only needs 2
float [] outputCoords = new float[3];
// objX, objY, objZ are the coordinates of one of the borders
GLU.gluProject(-1.0f, -1.0f, 0.0f, modelMatrix, 0,
projMatrix, 0, mView, 0, outputCoords, 0);


This is my square class:

public class Square {
//Buffer de vertices
private FloatBuffer vertexBuffer;
//Buffer de coordenadas de texturas
private FloatBuffer textureBuffer;
//Puntero de texturas
private int[] textures = new int[3];
//El item a representar
private Bitmap image;
//Definición de vertices

private float vertices[] =
{
-1.0f, -1.0f, 0.0f, //Bottom Left
1.0f, -1.0f, 0.0f,  //Bottom Right
-1.0f, 1.0f, 0.0f,  //Top Left
1.0f, 1.0f, 0.0f//Top Right
};

private float texture[] =
{
//Mapping coordinates for the vertices
0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f
};
//Inicializamos los buffers
public Square(Bitmap image) {
ByteBuffer byteBuf = ByteBuffer.allocateDirect(vertices.length 
* 4);
byteBuf.order(ByteOrder.nativeOrder());
vertexBuffer = byteBuf.asFloatBuffer();
vertexBuffer.put(vertices);
vertexBuffer.position(0);

byteBuf = ByteBuffer.allocateDirect(texture.length * 4);
byteBuf.order(ByteOrder.nativeOrder());
textureBuffer = byteBuf.asFloatBuffer();
textureBuffer.put(texture);
textureBuffer.position(0);

this.image=image;
}
//Funcion de dibujado
public void draw(GL10 gl) {
gl.glFrontFace(GL10.GL_CCW);
//gl.glEnable(GL10.GL_BLEND);
//Bind our only previously generated texture in this case
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
//Point to our vertex buffer
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
//Enable vertex buffer
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
//Draw the vertices as triangle strip
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 3);
//Disable the client state before leaving
gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
//gl.glDisable(GL10.GL_BLEND);
}
//Carga de texturas
public void loadGLTexture(GL10 gl, Context context) {
//Generamos un puntero de texturas
gl.glGenTextures(1, textures, 0);
//y se lo asignamos a nuestro array
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
//Creamos filtros de texturas
gl.glTexParameterf(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);
//Diferentes parametros de textura posibles 
GL10.GL_CLAMP_TO_EDGE
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_REPEAT);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, 

Re: [android-developers] Printing From Android Device

2011-11-02 Thread Summers Pittman ℝ
Did you look at the Google Cloud Print API?
http://code.google.com/apis/cloudprint/

If you have a 3.1 device you may be able to do something with the new USB
Host mode support and plug into a printer directly.

Summers Pittman
Phone:912 293 2314
Java is my crack.




On Wed, Nov 2, 2011 at 8:40 AM, Andriod Developer
sandip.ghar...@gmail.comwrote:

 Hello Friends,

 Thanks in advance,

 I want print doc from my android device/emulator

 This apps should be generic i.e. Any kind of printer device will be
 able ti print from
 mobile apps.

 Please tell me How i can ?


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

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

Re: [android-developers] Play content of phone on PC browser

2011-11-02 Thread Summers Pittman ℝ
Why is it urgent?

When you ask about the web browser, are you referring to the phone's web
browser or the web browser on a PC playing content off the phone?

Why can't you play media from the application listing files?

Summers Pittman
Phone:912 293 2314
Java is my crack.




On Wed, Nov 2, 2011 at 6:11 AM, Sunil Mishra suniljmis...@gmail.com wrote:

 Hi,

 I have developed a app that lists all the available media files on the
 phone.

 But i am unable to play that content on web browser. Any way to do
 this?

 Please help, its urgent.

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

-- 
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: Changing the icon for the All Apps Button

2011-11-02 Thread erik wagner
Gotcha.  Thanks Mark.  That was both what I expected and what I
feared.

On Nov 2, 7:33 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Nov 2, 2011 at 8:28 AM, erik wagner erik.j.wag...@gmail.com wrote:
  I am looking to actually replace the 'All Apps' button on the Android
  home screen.  I know there is the Home sample app, as near as I can
  tell (and please correct me if I'm wrong) it overlays a separate home
  button on top of the existing one - instead of actually replacing it.
  Is there a way to actually replace the All Apps icon on the Android
  home screen?

 No, short of hacking the app on a rooted phone. Bear in mind that
 there is no single Android home screen -- there are probably a few
 dozen in use on production hardware and uncounted home screens you can
 download from the Android Market.

 You can create your own home screen app (see the sample app you
 mention). Users will then have a choice of running your app or the
 built-in one when they press HOME. If they make your app the default,
 they will go to your app exclusively when the press HOME, until they
 remove your app or launch in safe mode.

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

 _Android Programming Tutorials_ Version 4.0 Available!

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


Re: [android-developers] Starting Google Analytics session when application goes to background

2011-11-02 Thread Aki
I know. I just hoped that there would be something to make my life easier.

Thanks for the 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: How does the gluProject function work? I can't understand it

2011-11-02 Thread Oli Wright
You may be better off asking this question on an OpenGL list / forum.  Have 
you tried the forums at opengl.org?

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

[android-developers] ltl doubt

2011-11-02 Thread bhanu prasad
Is it possible to develop an application with two manifest xml
files
Thanks in advance!!!

could u had done ever??


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


Re: [android-developers] ltl doubt

2011-11-02 Thread Robert Slama
no way u can have just one manifest in apk

On 2 November 2011 13:22, bhanu prasad bhanu4ug...@gmail.com wrote:

 Is it possible to develop an application with two manifest xml
 files
 Thanks in advance!!!

 could u had done ever??


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

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

Re: [android-developers] Best way to communicate between two applications (on the same device)?

2011-11-02 Thread Kristopher Micinski
I guess I should have asked before, but why do you need two applications.
 I think the answer when people ask this is typically that if they think
they need two separate apps, they're going down the wrong road.

Kris

On Tue, Nov 1, 2011 at 4:28 PM, Boozel boozelcl...@gmail.com wrote:

 Thanks for your reply. The two apps would only need to communicate a
 little. what are the major differences (pros and cons) between messenger
 and firing intents? what does the market use to ache email 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


-- 
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: Change PPI (pixel per inches) of PNG file in Android

2011-11-02 Thread Streets Of Boston
What is the problem?
The PNG is still the same size (in pixels).Only some piece of meta-data 
(the PPI) has changed.

Why must the PPI of the image stay the same?

-- 
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: AIDL with Map generating broken Java

2011-11-02 Thread Streets Of Boston
What if you use *Bundle *instead (which is basically a Map implementation 
that implements Parcelable as well).

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

Re: [android-developers] How does the gluProject function work? I can't understand it

2011-11-02 Thread Latimerius
If all you need is to zoom a quad why don't you just glScale() it?

Moving the quad along the z axis will sure work but it seems like the
hard way to achieve this.  Sure, scaling and moving along z will not
get you the *exactly* same result, however I doubt anybody could
appreciate the slight differences between a bilinear filter and
(generally) tiny perspective distortion, given your geometry is not
quite hi-res. :-)

On Wed, Nov 2, 2011 at 1:42 PM, saex elpablos...@gmail.com wrote:
 I need to show a square polygon with the 100% of the width of the
 screen, then, i supose that i must zoom it (with Z axis) until the
 polygon borders are tounching the screen borders.

 I'm trying to achieve this using gluProject to project a coordinate in
 3D into a 2D screen coordinate. If the screen coordinate is either 0
 or matches the width or height, then it is touching a screen border.

 The problem is that something is going wrong, the `outputCoords` array
 returned with gluProject is giving me these values: 0,0,0.5,  but my
 square is centered on the sreen, and with Z=-5.0f

 I dont understand these values...

 This is the code i'm using to obtain the 2D Projection of my square
 poligon on the screen:


    /// NEW CODE FOR SCALING THE AR IMAGE TO THE DESIRED
 WIDTH /

            mg.getCurrentModelView(gl);
            mg.getCurrentProjection(gl);

            float [] modelMatrix = new float[16];
            float [] projMatrix = new float[16];
            modelMatrix=mg.mModelView;
            projMatrix=mg.mProjection;
            int [] mView = new int[4];
            // Fill this with your window width and height
            mView[0] = 0;
            mView[1] = 0;
            mView[2] = 800; //width
            mView[3] = 480; //height
            // Make sure you have 3 components in this array even if the
 screen only needs 2
            float [] outputCoords = new float[3];
            // objX, objY, objZ are the coordinates of one of the borders
            GLU.gluProject(-1.0f, -1.0f, 0.0f, modelMatrix, 0,
 projMatrix, 0, mView, 0, outputCoords, 0);


 This is my square class:

    public class Square {
        //Buffer de vertices
        private FloatBuffer vertexBuffer;
        //Buffer de coordenadas de texturas
        private FloatBuffer textureBuffer;
        //Puntero de texturas
        private int[] textures = new int[3];
        //El item a representar
        private Bitmap image;
        //Definición de vertices

        private float vertices[] =
        {
                -1.0f, -1.0f, 0.0f,     //Bottom Left
                1.0f, -1.0f, 0.0f,              //Bottom Right
                -1.0f, 1.0f, 0.0f,              //Top Left
                1.0f, 1.0f, 0.0f                //Top Right
        };

        private float texture[] =
        {
        //Mapping coordinates for the vertices
        0.0f, 1.0f,
        1.0f, 1.0f,
                0.0f, 0.0f,
        1.0f, 0.0f
    };
        //Inicializamos los buffers
        public Square(Bitmap image) {
                ByteBuffer byteBuf = ByteBuffer.allocateDirect(vertices.length 
 * 4);
                byteBuf.order(ByteOrder.nativeOrder());
                vertexBuffer = byteBuf.asFloatBuffer();
                vertexBuffer.put(vertices);
                vertexBuffer.position(0);

                byteBuf = ByteBuffer.allocateDirect(texture.length * 4);
                byteBuf.order(ByteOrder.nativeOrder());
                textureBuffer = byteBuf.asFloatBuffer();
                textureBuffer.put(texture);
                textureBuffer.position(0);

                this.image=image;
        }
        //Funcion de dibujado
        public void draw(GL10 gl) {
                gl.glFrontFace(GL10.GL_CCW);
                //gl.glEnable(GL10.GL_BLEND);
                //Bind our only previously generated texture in this case
                gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
                //Point to our vertex buffer
                gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
                gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
                //Enable vertex buffer
                gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
                gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
                //Draw the vertices as triangle strip
                gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 
 3);
                //Disable the client state before leaving
                gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
                gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
                //gl.glDisable(GL10.GL_BLEND);
        }
        //Carga de texturas
        public void loadGLTexture(GL10 gl, Context context) {
                //Generamos un puntero de texturas
                gl.glGenTextures(1, textures, 0);
                //y se lo asignamos a nuestro array
                gl.glBindTexture(GL10.GL_TEXTURE_2D, 

[android-developers] Re: Best way to communicate between two applications (on the same device)?

2011-11-02 Thread Streets Of Boston

   
   - If you want just to send a message to another app, *without expecting *a 
   result, use Intents on one app (and a BroadcastReciever on the other app).
   - If you want to send a message to another app, while *expecting *a 
   result, but this result could be sent back later (*asynchronously*), use 
   an Intent with a ResultReceiver in one of its 'extras', and use a 
   BroadcastReceiver in the other app that calls 'send' on the received 
   Intent's 'extra' (ResultReceiver) when it needs to send back a result.
   - If you want to send a message to another app, while expecting a result 
   *synchronously*, you can do the same as the previous point, but you have 
   to write some synchronization code yourself. Or you could use AIDL where 
   the methods you define have a return value.

 

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