Re: [android-developers] Re: How to get and post JSON with Android?

2012-08-30 Thread ashok chakravarthy
Android has Json classes by using that you can create jsonobject, jsonarry.
after you construct full jsonobject convert that in to string and post that
to server and while retrieving convert the string you received from server
in to Json object and parse it.

On Fri, Aug 17, 2012 at 5:47 PM, GANESH KUMAR ganeshkumar...@gmail.comwrote:

 I need to know , how to post and retrieve data a single JSON.Pls help with
 code

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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: How do I keep corporate app (not in any store) updated?

2012-08-30 Thread ashok chakravarthy
you can also use GCM(Google cloud messaging) to push the message to
application when ever update is available and application will get the
latest apk from your server

On Fri, Aug 17, 2012 at 11:04 PM, gt8887b gt88...@gmail.com wrote:

 The most straightforward way is to periodically poll the server to see if
 a new update is available.  Then just point the browser to the location of
 your apk file

 Intent i = new Intent(Intent.ACTION_VIEW);

 i.setData(Uri.parse(http://your.site.com/yourAppFile.apk;));



 startActivity(i);





 On Thursday, August 16, 2012 4:56:30 PM UTC-4, Jon Helms wrote:

 I have done some searching and haven't found anything, so I must be
 searching wrong, but since I didn't find anything I'm at a loss of what to
 do other than post here and ask.

 I am developing a corporate application that once released our employees
 will be able to install from our portal.  Aside from final testing and such
 the only thing left is figuring out how we keep it up to date without using
 Google Play or Amazon AppStore.  I'm sure others have done this and I have
 done it on desktop apps before, I'm just curious if there are some really
 straightforward ways of doing this for Android.

 We don't want it in the store because we don't want anyone to be able to
 find it that isn't an employee.

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Help!!!

2012-08-21 Thread ashok chakravarthy
what is viewtext? is it TextView or EditText? if you want to get text from
TextView/EditText
call viewtext.getText().toString().

On Wed, Aug 22, 2012 at 8:40 AM, TreKing treking...@gmail.com wrote:

 On Mon, Aug 20, 2012 at 1:30 PM, Androideed 
 nnamdi.anyamelu...@gmail.comwrote:

 its not working! what am I doing wrong?


 Not explaining what it's not working means.

 http://www.catb.org/~esr/faqs/smart-questions.html


 -
 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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Overlay item in ImageView

2012-07-30 Thread ashok chakravarthy
subclass the ImageView and draw overlay on onDraw and handle the touch
events on onTouch

On Wed, Jul 25, 2012 at 12:30 AM, Luiz Fernando Rodrigues 
emaild...@gmail.com wrote:

 Hi,

 In my application I need to show a custom popover over an ImageView.
 This tutorial (
 http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/)
 teaches how to do it over an MapView.
 I made an adaptation drawing the popover component in the ImageView since
 the ItemizedOverlay belongs to the maps API.

 So far so good, but now I need to capture events in the popover and I'm
 questioning myself if thats the right way implement an popover over an
 ImageView.
 Could anyone point me to a right API to build this feature?

 Thanks a lot,
 Luiz


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Timeout error when tryin to do REST

2012-07-28 Thread ashok chakravarthy
did you set internet permission in Manifest?

On Thu, Jul 26, 2012 at 6:30 PM, Larry Meadors larry.mead...@gmail.comwrote:

 Is the phone on your LAN or using the cell network?

 Larry


 On Mon, Jul 23, 2012 at 8:50 AM, Fernando Juarez 
 ferjuarez...@gmail.comwrote:

 Hi I need some help:

 I´m developing an Android app with Eclipse and ADT, It´s a very simple
 app. The app connects to a server via POST, it works fine when I set my IP
 o my localhost IP and execute on the emulator, but when I run the app in
 the Android Device (my cellphone) It can´t connect, throws an Timeout
 error, I tried with a different web service and the error it´s the same.
 This is  my code:

 public class MainActivity extends Activity {

 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);

 this.httpCall();

 }


 public void httpCall(){

 try{

 String name = null;
 String pass = null;
 String options = null;

 HttpParams httpParameters = new BasicHttpParams();
 HttpConnectionParams.setConnectionTimeout(httpParameters, 2);
 HttpConnectionParams.setSoTimeout(httpParameters, 2);
 ConnManagerParams.setTimeout(httpParameters, 2);

 DefaultHttpClient client = new DefaultHttpClient(httpParameters);

 UsernamePasswordCredentials creds = new
 UsernamePasswordCredentials(restuser, restbpm);
 client.getCredentialsProvider().setCredentials(new
 AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT), creds);
 HttpPost post = new HttpPost(
 http://10.36.0.141:8080/bonita-server-rest/API/runtimeAPI/instantiateProcess/holamundo--1.0
 );

 post.setHeader(content-type, application/x-www-form-urlencoded);

 List NameValuePair nameValuePairs = new ArrayListNameValuePair(1);
 nameValuePairs.add(new BasicNameValuePair(options, user:admin));

 post.setEntity(new UrlEncodedFormEntity(nameValuePairs));

 HttpResponse resp = client.execute(post);

 String respStr = EntityUtils.toString(resp.getEntity());


 TextView tv = new TextView(this);
 tv.setText(respStr);
 setContentView(tv);

 } catch(Exception ex){
 Log.e(ServicioRest,Error!, ex);
 }
 }

 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


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Activity on Service

2012-07-24 Thread ashok chakravarthy
or display a notification , so  user can start activity by selecting the
notification.

On Tue, Jul 24, 2012 at 6:32 PM, Rahul Kaushik rahulkaushi...@gmail.comwrote:

 Hi,

 I have started an activity on Reboot from service, it get started but it
 bring the activity in front of user
 but i dont want show the started activity to the user

 MyCode on Service

  public void onCreate()
 {
  super.onCreate();
  //Toast.makeText(this,StartAtBootService: onCreate,
 Toast.LENGTH_SHORT).show();
Intent i = new Intent(this, AndroidLogin.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
   this.startActivity(i);



 }


 Thanks
 RK

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] connectivity of android appliacation with sqllite

2012-07-12 Thread ashok chakravarthy
go through the content provider
http://developer.android.com/guide/topics/providers/content-providers.html

On Thu, Jul 12, 2012 at 1:18 PM, Francisco M. Marzoa Alonso 
fmmar...@gmail.com wrote:

 On 02/07/12 13:34, Ashu wrote:
  can we connect a android application to sqlite database just like a
  connectivity of mysql to java code,,
 No
  plz help me ,i am new to android
 


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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] connectivity of android appliacation with sqllite

2012-07-11 Thread ashok chakravarthy
go through content provider in android

http://developer.android.com/guide/topics/providers/content-provider-basics.html


On Mon, Jul 2, 2012 at 5:04 PM, Ashu ashutosh0...@gmail.com wrote:

 can we connect a android application to sqlite database just like a
 connectivity of mysql to java code,,plz help me ,i am new to android

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] C2DM Registration Issue

2012-07-09 Thread ashok chakravarthy
c2dm is deprecated. use GCM.
http://developer.android.com/guide/google/gcm/index.html


On Mon, Apr 23, 2012 at 11:40 PM, gaurang patel gapin...@gmail.com wrote:

 Hi All...

 I am developing an app to get notification using android c2dm. I have
 filled up the registration form with all required details to the following
 link:

 https://developers.google.com/android/c2dm/signup

 I got one email on my contact gmail id that ..Information on
 production-level quota will be sent to your 'Contact email' address when
 your registration has been processed

 four days are already passed but i did not get any confirmation from
 google.

 I tried to execute a c2dm client app to get registration id from c2dm but
 it gives null as registration_id. Although i configured and signed in gmail
 account on my device, when i run the application gives null registratin_id
 and AUTHENTICATION_FAILED  error.

 Please provide some guidance on this.

 Thanks in Advanced,





  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Transfering image file between two 2 emulators

2012-07-06 Thread ashok chakravarthy
open the fileInputStream on the file that is stored in the sdcard.

http://stackoverflow.com/questions/5298131/android-using-fileinputstream-for-reading-file-from-sdc-reporting-null-pointer

and write the bytes of the file in to the Output stream of the Socket. You
collect the bytes on the other emulator and store in a file.


On Sat, Jul 7, 2012 at 9:59 AM, Akki akshay.iitr@gmail.com wrote:

 I was trying to send an image file between 2 emulators using a TCP socket
 connection.The socket connection has been successfully made and the image
 file is stored on the SD-card of one of the emulators. I want to ask how
 can I convert the image file into byte stream and how on the other side can
 I convert back the bytestream to image format?? I tried to search a lot but
 couldn't find the right function in the API.

 Any other ideas for the same are welcomed

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] subject to device problem

2012-06-26 Thread ashok chakravarthy
Please explain clearly what you did and what did not work for you so that
others can help you. The details you provided is not sufficient.

On Tue, Jun 26, 2012 at 11:58 AM, Rahul Vijay rahul.vija...@gmail.comwrote:

 Hello sir,

 I have face few problem in a device to display a dynamic table. In a AVD
 display a table but in a device can not display a table. I used a Samsung
 device.

 Please help me.

 mys xml file here


 ?xml version=1.0 encoding=utf-8?
 LinearLayout
   xmlns:android=http://schemas.android.com/apk/res/android;
   android:orientation=vertical
   android:layout_width=match_parent
   android:layout_height=match_parent
   android:background=#FEE703

 TextView
 android:text=High Score
 android:textColor=#b3000d
 android:gravity=center_vertical|center_horizontal
 android:textSize=26dip
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:textStyle=bold
 android:background=#ffb0b6
 android:layout_marginBottom=5dip
 android:typeface=sans/
 RelativeLayout
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:id=@+id/relative
 TextView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=Name
 android:textColor=#b3000d
 android:textSize=20dip
 android:layout_marginLeft=20dip
 android:id=@+id/name/
 TextView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=Score
 android:textColor=#b3000d
 android:textSize=20dip
 android:layout_marginLeft=110dip/
 TextView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=Time
 android:textColor=#b3000d
 android:textSize=20dip
 android:layout_marginLeft=200dip/
 TableLayout
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@+id/name
 android:id=@+id/tablelayout/
 /RelativeLayout
 /LinearLayout

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: App closed but notification is visible

2011-09-23 Thread ashok chakravarthy
register receiver in Manifest file and given android:enabled=true

On Fri, Sep 23, 2011 at 1:12 AM, b_t bartata...@gmail.com wrote:

 Ok, so it is normal that when the system stops my app the notification
 is still visible
 but when I force close it then it disappears.

 Then my only problem is that my app isn't notified anymore about
 battery events.
 Maybe what I am doing is wrong:

 I register broadcast receivers in the onCreate method of my
 Application.
 And my app receive these events well for a long time, until my
 application stops somewhere.

 I don't know how to solve this problem: the updating (receiving event)
 should not be stopped until
 the user force closes my app.

 Is it not good to register receivers in the onCreate of my Application
 class? Should I use a
 service for it? A service is mandatory to receive these event
 always?

 Thanks,
 Tamás

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: plz help...!!!

2011-09-23 Thread ashok chakravarthy
when you call stopService(service). is it throwing any errors?

On Fri, Sep 23, 2011 at 8:08 AM, Spiral123 cumis...@gmail.com wrote:


 Easy.

 sevice.stop(plz);

 On Sep 22, 1:24 pm, Divyata Panchal panchal.divyat...@gmail.com
 wrote:
  Hie.. to al Android Developers...
 
  please tell me how to stop service in one class which is already
  started in other class.
  i need to start and stop service again n again according to my
  conditions.. pl give proper syntax to stop service..
  i am using::: Intent service= new Intent(this, myService.class);
 stopService(service);
 
  but this is not working...
  please guys reply as soon as possible..

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How can i start a service after installing my apk.

2011-09-23 Thread ashok chakravarthy
I think it is not possible for now. see below link
http://groups.google.com/group/android-developers/browse_thread/thread/97f9664f2919b411?pli=1

On Fri, Sep 23, 2011 at 12:14 PM, crajesh crajesh2...@gmail.com wrote:

 Hi,

 How can i start a service after installing application.??

 Thanks
 C.Rajesh

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Unable to show Image in ImageView

2011-09-22 Thread ashok chakravarthy
rather than using BitmapUtils.decodestream(). can you try different approcah
like read the bytes from stream in to file and decode the file using
bitmaputils

On Thu, Sep 22, 2011 at 1:55 PM, Anoop Singh anoop.singh.k...@gmail.comwrote:

 I am unable to decode Inputstream to convert it to Bitmap.The
 BitmapFactory.decodeStream() method fails to read a JPEG image (i.e.
 returns null).I have also tried solutions provided in
 http://code.google.com/p/android/issues/detail?id=6066.It works in few
 situation but fails most of the time. can anyone 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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: How to resolve outOfMemoryError - Bitmap size exceeds VM budget

2011-09-22 Thread ashok chakravarthy
You can  try the approach suggested by streets of bosten or you can try
something like below

i). create baseactivity and all remaing activities extends this activity
ii). override onKeydown in the base actiivty
iii).finish the previous activity when you move to next activity. and when
you press the back on the activity based on the index start the previous
activity.

Thanks,
Ashok.

On Fri, Sep 23, 2011 at 6:06 AM, lbendlin l...@bendlin.us wrote:

 http://code.google.com/p/android/issues/detail?id=8488

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How to connect android device with local network

2011-09-21 Thread ashok chakravarthy
run some webserver like tomcat on your local machine, then you can able to
connect to your machine provided both your machine and phone are in same
network

On Wed, Sep 21, 2011 at 5:48 PM, Gold thangadura...@gmail.com wrote:

 Hi all,

 I am using android 2.2 for application development..!

 Now I want to communicate with Webservice. The webservice running on
 My laptop and ip is 192.168.1.15..!

 But device not communicate.it..

 How to communicate with local network..!



 Thanks in advance,
 A. Thangadurai

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Media Player For Android

2010-12-06 Thread ashok chakravarthy
create local server(Server Socket) on the phone and open stream on the file
you want to play and write the buffers on to the server socket.

On Mon, Dec 6, 2010 at 11:11 AM, chamith weerasinghe e05ch...@gmail.comwrote:

 Thanks...
 but I need to do a different thing.How I down load a audio file while it
 playing.
 I'm very new to android and want to do this.

 chamith

 On Mon, Dec 6, 2010 at 11:02 AM, nithya nataraj nithyan...@gmail.comwrote:

 Refer to the samples in android sdk
 android sdk /samples/api demos/media

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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] Binding Service to Activity

2009-12-16 Thread ashok chakravarthy
Hi Sonic,
 Please go through the SDK sample applications on local
service.

Thanks
Ashok

On Wed, Dec 16, 2009 at 11:59 AM, Sonic.. abhishek.bansal1...@gmail.comwrote:

 Hello,

 I am working on an android application, where the activity binds to a
 local service to perform certain tasks.

 Now I am binding the service in the OnCreate method of the Activity,
 after which the activity has to use the service object to invoke the
 functionality defined in the servicein the OnStart method. The problem
 here is that once a call bindservice has been made, we might not get
 the serviceobject immediately, so my service object would be null till
 that time. So i cannot invoke the service functions.

 So is there a way to determine in the activity that the service has
 been bound and the service object is valid and could be used now. For
 reference i'm attaching a code snippet for the same.

 @Override
public void onCreate(Bundle savedInstanceState)
{
Intent mServiceIntent ;
super.onCreate(savedInstanceState);
setContentView(R.layout.retrieve_guide_data);
bindService(new Intent(UIMain.this,
  CxService.class),
 mConnection, Context.BIND_AUTO_CREATE);

}

 @Override
 protected void onStart()
 {
super.onStart();
System.out.println(In OnStart of Activity---);

if(mBoundService != null)
{
int status = mBoundService.authenticate(9876543210);
if(status == 200)
{
AuthFunc();
}
}
 }

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: Android Emulator - MediaPlayer

2009-12-07 Thread ashok chakravarthy
Hi Neeraj,
   plz go through the below link,it may help u,still if u r
unable to resolve issue,let me know what error exactly ur getting while u
try to play
http://groups.google.com/group/android-developers/browse_thread/thread/63692208da946ead

Thanks
Ashok


On Mon, Dec 7, 2009 at 10:40 PM, neer neerajv...@gmail.com wrote:

 Can you explain how does it work . I used the
 ApidDemo's applicaition and set the path to
 http://www.law.duke.edu/cspd/contest/finalists/entries/anarmyonebyone1.mp4
 buts it did not work .

 I even used the rtsp server set up on my system but it did not work .
 It gives a dialog not able to play the video.
 It would be better if you can provide any link for the steps.

 Regards,
 Neer
 On Dec 4, 9:22 am, ashok chakravarthy ashoki...@gmail.com wrote:
  Yes, it works!!!
 
 
 
  On Thu, Dec 3, 2009 at 10:32 PM, skcratch skcra...@gmail.com wrote:
   Hi there!
 
   Can anyone tell me if the MediaPlayer actually works on the Android
   emulator.
 
   Thanks in advance,
   Best regards!
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubs­cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en- Hide quoted
 text -
 
  - Show quoted text -

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Android Emulator - MediaPlayer

2009-12-03 Thread ashok chakravarthy
Yes, it works!!!

On Thu, Dec 3, 2009 at 10:32 PM, skcratch skcra...@gmail.com wrote:

 Hi there!

 Can anyone tell me if the MediaPlayer actually works on the Android
 emulator.

 Thanks in advance,
 Best regards!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Flashing Android 2.0 on G1

2009-11-19 Thread ashok chakravarthy
Hi srikanth,
 Look in the htc web site,there u can find images to
flash ur dev phone

On Thu, Nov 19, 2009 at 9:45 PM, Mark Murphy mmur...@commonsware.comwrote:

 Shrikant Agrawal wrote:
  Hi All
 
  I want to upgrade my G1, which is currently running on andriod 1.5, to
  andriod 2.0 but i cant find the system.img file in the andorid2.0 sdk.
 
  Do anybody know where I can the system.img file android 2.0 ???

 Android 2.0 has not been officially released for the G1 at this time,
 AFAIK.

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

 Android App Developer Books: http://commonsware.com/books

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: ImageButton and focus state...

2009-09-18 Thread ashok chakravarthy
create *item-selector*  xml and keep that xml in drawable folder and finally
use that as background of image button

On Fri, Sep 18, 2009 at 7:13 AM, sdphil phil.pellouch...@gmail.com wrote:


 I want to change the android:background value when an image button is
 selected (selected, not clicked).  What's the easiest way to do that?
 I think I could create a derived class and override onDraw, but isn't
 there something like onClickListener() where I can get notified when
 the focus for that button changes?  onFocusListener?

 tia.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: MediaPlayer playback is interrupted by user interface interaction

2009-09-08 Thread ashok chakravarthy
Hi,

try by creating media player in different thread

On Sun, Sep 6, 2009 at 3:29 PM, Ludvig Svenonius ludvig.svenon...@gmail.com
 wrote:


 I have a rather mysterious problem with the simple test application
 below...

 package com.example.helloandroid;

 import android.app.Activity;
 import android.media.MediaPlayer;
 import android.os.Bundle;
 import android.widget.ArrayAdapter;
 import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;

 public class HelloAndroid extends Activity {
static final String[] LIST_ITEMS = new String[] {
Item 1,
Item 2,
Item 3,
Item 4,
Item 5,
etc etc...
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

final LinearLayout root = new LinearLayout(this);
root.setOrientation(LinearLayout.VERTICAL);

final TextView tv = new TextView(this);

final ListView lv = new ListView(this);
lv.setAdapter(new ArrayAdapterString(this,
 android.R.layout.simple_list_item_1, LIST_ITEMS));

root.addView(tv);
root.addView(lv);

MediaPlayer mp = new MediaPlayer();
String msg = ;

try {
String path = /sdcard/MP3/an_mp3_track.MP3;

mp.setDataSource(path);
mp.prepare();
mp.start();
}
catch (Exception e) {
msg = e.getClass().getName();
}

tv.setText(msg);

setContentView(root);
}
 }


 As you might see from examining the code, it sets up a very simple
 layout, consisting of a TextView to display a text message above a
 ListView displaying a number of strings. The application also
 instantiates a MediaPlayer and begins playback of an mp3 track on the
 SD card. So far everything works; the interface will be displayed
 correctly and playback of the track will begin... and left on its own
 it will keep working. However, if you start fiddling with the ListView
 - scrolling it or tapping its items, for example - it may cause the
 mp3 playback to suddenly be interrupted, for no apparent reason
 whatsoever. The interruption doesn't seem to be caused by a standard
 MediaPlayer error, as I've tried registering an OnErrorListener to the
 media player and its methods don't seem to be called at the
 interruption. I'm running the application on my retail HTC Hero.

 I'm very new to Android development so it's entirely possible that I'm
 overlooking something many would consider obvious; however the
 symptoms of the problem seem to suggest otherwise: this behaviour is
 just weird. Why should user interface components interfere in any way
 with a media player, unless designed to do so?

 Thankful for any suggestions,

 Ludvig Svenonius

 


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