[android-developers] Binding to MarketBillingService incorrectly returning success

2012-05-11 Thread Haze
I've got a bit of a strange issue which seems to be affecting not only
the app I'm developing but also most published apps that use IAP.

For some reason, on some 3.x tablets I have tested on, Google Play
does not install correctly.  Cutting it short the end result is that
the tab has both the Google Play app AND the old Android Market app,
both working, both able to launch.  What this leads to is that any app
that tries to connect to the Market Billing Service crashes, all with
more or less the same output.

So this is what happens (code as listed on the android dev guid):

You try to bind the market service:
boolean bindResult = mContext.bindService(
   new
Intent("com.android.vending.billing.MarketBillingService.BIND"), this,
   Context.BIND_AUTO_CREATE);

This returns true and our onServiceConnected is called:
public void onServiceConnected(ComponentName name, IBinder service) {
   mService = IMarketBillingService.Stub.asInterface(service);
 }

So as far as we know we are now successfully connected and can send
purchase requests as normal, except when we do it crashes because we
haven't actually connected correctly.  There is this little line
appearing in the logcat:
Finsky(5112): [1] InAppBillingProxyService.bindService: Failed to bind
to MarketBillingService

Except I have no idea where this is coming from or how to actually
test if we did bind successfully or not.  Does anybody have any idea
please?

I'd like to note again that this only happens when we end up in the
case of both the old Android Market and the new Google Play on the
same device and that this is happening on published apps.  Also I have
tried doing factory resets and the devices themselves but they just
refuse to update the market correctly.  The two in question are the
Samsung Galaxy Tab 10.1 and the Motorola Xoom 2, for those interested.

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] Binding to MarketBillingService incorrectly returning success

2012-05-11 Thread Haze
I've got a bit of a strange issue which seems to be affecting not only
the app I'm developing but also most published apps that use IAP.

For some reason, on some 3.x tablets I have tested on, Google Play
does not install correctly.  Cutting it short the end result is that
the tab has both the Google Play app AND the old Android Market app,
both working, both able to launch.  What this leads to is that any app
that tries to connect to the Market Billing Service crashes, all with
more or less the same output.

So this is what happens (as listed on the android dev guid):

You try to bind the market service:
boolean bindResult = mContext.bindService(
new
Intent("com.android.vending.billing.MarketBillingService.BIND"), this,
Context.BIND_AUTO_CREATE);

This returns true and our onServiceConnected is called:
public void onServiceConnected(ComponentName name, IBinder service) {
mService = IMarketBillingService.Stub.asInterface(service);
  }

So as far as we know we are now successfully connected and can send
purchase requests as normal, except when we do it crashes because we
haven't actually connected correctly.  There is this little line
appearing in the logcat:
Finsky(5112): [1] InAppBillingProxyService.bindService: Failed to bind
to MarketBillingService

Except I have no idea where this is coming from or how to actually
test if we did bind successfully or not.  Does anybody have any idea
please?

I'd like to note again that this only happens when we end up in the
case of both the old Android Market and the new Google Play on the
same device and that this is happening on published apps.  Also I have
tried doing factory resets and the devices themselves but they just
refuse to update the market correctly.  The two in question are the
Samsung Galaxy Tab 10.1 and the Motorola Xoom 2, for those interested.

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] Problem with audio recording

2009-01-23 Thread haze...@gmail.com

I'm a student and currently doing my senior capstone project. I have
problem with my codes on audio recording. whenever i clicked the
record button in the emulator, it shows me an error alert, "The
application Audiorecording (process) has stopped unexpectedly.
Please try again." can anyone help me? thanks



public class AudioRecording extends Activity {
/** Called when the activity is first created. */

private Button buttonRecording, buttonStopRecording;
private EditText textRecording, textStopRecording;
public String Path_Name = "/sdcard/test.3gpp";

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

textRecording = (EditText) findViewById(R.id.text1);
textStopRecording = (EditText) findViewById(R.id.text2);
buttonRecording = (Button) findViewById(R.id.buttonRecording);
buttonStopRecording = (Button) findViewById
(R.id.buttonStopRecording);
buttonRecording.setOnClickListener(new clicker());
buttonStopRecording.setOnClickListener(new clicker());
}

class  clicker implements Button.OnClickListener {
public void onClick(View v)

{
MediaRecorder audioRecorder = new MediaRecorder();

if(v==buttonRecording){

textRecording.setText("Recording");
textStopRecording.setText("");


audioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
audioRecorder.setOutputFormat
(MediaRecorder.OutputFormat.THREE_GPP);
audioRecorder.setAudioEncoder
(MediaRecorder.AudioEncoder.AMR_NB);
audioRecorder.setOutputFile(Path_Name);
audioRecorder.prepare();
audioRecorder.start();   // Recording is now started
}

if(v==buttonStopRecording){
textStopRecording.setText("Stop Recording");
textRecording.setText("");
audioRecorder.stop();
//audioRecorder.reset();   // You can reuse the object 
by going
back to setAudioSource() step
//audioRecorder.release(); // Now the object cannot be 
reused

//String tag, label;
//TimingLogger timeRecord = new TimingLogger(tag, 
label);


}

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

2009-01-19 Thread haze...@gmail.com

hey hi,
i'm doing a similar program for my school too, but i cant make it to
work. do you think you can help me? i think i have the code written
correctly, and i have added the permission too. please help. thanks



package capstoneProject.AudioRecording;

import android.app.Activity;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class AudioRecording extends Activity {
/** Called when the activity is first created. */

private Button buttonRecording, buttonStopRecording;
private EditText textRecording, textStopRecording;
private String Path_Name = "sdcard/audio4";

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

textRecording = (EditText) findViewById(R.id.text1);
textStopRecording = (EditText) findViewById(R.id.text2);
buttonRecording = (Button) findViewById(R.id.buttonRecording);
buttonStopRecording = (Button) findViewById
(R.id.buttonStopRecording);
buttonRecording.setOnClickListener(new clicker());
buttonStopRecording.setOnClickListener(new clicker());
}

class  clicker implements Button.OnClickListener {
public void onClick(View v)

{
MediaRecorder audioRecorder = new MediaRecorder();

if(v==buttonRecording){

//textRecording.setText("Recording");
//textStopRecording.setText("");


audioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
audioRecorder.setOutputFormat
(MediaRecorder.OutputFormat.THREE_GPP);
audioRecorder.setAudioEncoder
(MediaRecorder.AudioEncoder.AMR_NB);
audioRecorder.setOutputFile(Path_Name);
audioRecorder.prepare();
audioRecorder.start();   // Recording is now started
}

if(v==buttonStopRecording){
textStopRecording.setText("Stop Recording");
textRecording.setText("");
audioRecorder.stop();
audioRecorder.reset();   // You can reuse the object by 
going
back to setAudioSource() step
audioRecorder.release(); // Now the object cannot be 
reused

//String tag, label;
//TimingLogger timeRecord = new TimingLogger(tag, 
label);


}

}

}

}

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