[android-developers] Re: How to integrate in app billing in android

2016-01-31 Thread jtoolsdev
There are some good blog articles online with concise information.  You can 
fill in the rest by reading Google's documentation though I wouldn't say 
that documentation is Google's strong point.

On Sunday, January 31, 2016 at 8:38:48 AM UTC-8, Jin Cheng wrote:
>
> Hello, everybody.
> I am making a android app with in-app billing function.
> If you have some experience about it, please help me.
> Thank you for your attention.
>
> Regards
> Jin
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1584e832-4d15-4c62-86e7-8405d7e58bf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Audio recording problem - fake sample rate

2016-01-31 Thread Julian Bunn
If you are only getting 8000 sps then even with interpolation to 44100 you 
would never see any signal above 4000Hz in an FFT, right? Are you windowing 
the FFT?

If there are truly problems like this with the audio firmware on the LG G3 
and Nexus 7, I haven't heard any reports from my users about them. That's 
not to say there can't be an issue, of course :-) If I were you, I would 
obtain a cheap used G3 on Ebay to test with.



On Saturday, January 30, 2016 at 6:13:08 PM UTC-8, RLScott wrote:
>
> But are you sure you are getting the sample rate you asked for?  How would 
> you know?  As you can see from my very first posting, all the checks you 
> are doing here work fine for me too, and I actually do get the number of 
> samples per second I ask for.  But they are not true samples.  They have 
> been faked by up-sampling. The system takes 8000 samples per second and 
> then duplicates each sample enough times to make up 44100 or 22050 or 
> whatever.  But I know those samples are not true samples because I see 
> aliasing around 4000 Hz in the frequency spectrum.  Unless you specifically 
> look for this problem by testing with a pure tone above 4000 Hz and analyze 
> with an FFT and look for aliasing below 4000 Hz, everything will appear 
> fine.  Again this only happens on a very few models - specifically the LG 
> G3 and the Asus Nexus 7.
>
> On Wednesday, January 27, 2016 at 10:57:45 AM UTC-6, Julian Bunn wrote:
>>
>> Yes, that looks fine to me ... In case it helps, here is a snippet of 
>> what I do to check a samplerate is going to work:
>>
>> minBuffer = AudioRecord
>>   .getMinBufferSize(rate, config, encoding);
>> if (minBuffer != AudioRecord.ERROR_BAD_VALUE
>>   && minBuffer != AudioRecord.ERROR) {
>>boolean bGood = true;
>>try {
>>   audio = new AudioRecord(audioSource, rate, config,
>> encoding, minBuffer);
>>   int istate = audio.getState();
>>   if (istate != AudioRecord.STATE_INITIALIZED)
>>  bGood = false;
>>} catch (Exception e) {
>>   bGood = false;
>>}
>>audio.release();
>>audio = null;
>>if (bGood)
>>   return rate;
>>
>>
>> On Tuesday, January 26, 2016 at 12:49:46 PM UTC-8, RLScott wrote:
>>>
>>> I am calling 
>>> AudioRecord.getMinBufferSize(44100,AudioFormat.CHANNEL_IN_MONO,AudioFormat.ENCODING_PCM_16BIT)
>>>  
>>> and using the returned minAudioRecordBufSize in  
>>>
>>>   new AudioRecord(MediaRecorder.AudioSource.MIC,
>>> 44100,AudioFormat.CHANNEL_IN_MONO,
>>>AudioFormat.ENCODING_PCM_16BIT, 
>>> minAudioRecordBufSize);
>>>
>>> Is that sizing the buffers correctly?
>>>
>>> Thanks for the offer for the enumeration app, but I do not have a 
>>> failing device at my disposal.  Only a few devices are failing, and they 
>>> are all owned by my customers.  I can't ask too much of them in the way of 
>>> debugging help.
>>>
>>>
>>> On Friday, January 15, 2016 at 1:34:15 AM UTC-6, Julian Bunn wrote:

 Make sure you are sizing the buffers correctly i.e. respecting the 
 minimum recording buffer size (in bytes) required. If you don't then I 
 believe the system will drop you down to 8kHz sample rate, which is what 
 you are seeing (I think?).


 On Wednesday, December 23, 2015 at 9:52:37 AM UTC-8, Robert Scott wrote:
>
> I first call *AudioRecord.getMinBufferSize(22050...*  If this returns 
> an error (<1) then I call *AudioRecord.getMinBufferSize(44100...*  
> Whichever one of these calls succeeds, I use that rate in my call to 
> "*new 
> AudioRecord(..,sampleRate..)*"
>
> I don't actually have one of these misbehaving devices, so my 
> experiments so far have been with the help of my customers.
>
> -Robert Scott
>  Hopkins, MN
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/006d2392-ebc3-449d-b632-278699e5c55f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] High speed camera capture

2016-01-31 Thread Joshua Parrish
Hello all,

I'm doing my best to develop an app for high-speed camera capture. 
Unfortunately, it's difficult to work with  
createConstrainedHighSpeedCaptureSession since there are no samples 
available anywhere. Would it be possible for this community to come up with 
a small set of sample code?

For instance, there is a 
https://github.com/googlesamples/android-Camera2Video, but changing it to 
contain a high speed request is a bit confusing. Where I'm having trouble 
is specifically calling the camera requests. One must create a list, 
instead of using the request builder due to the need to use 
setRepeatingBurst. That said I run into several issues. One being that the 
createConstrainedHighSpeedCapture is supposed to produce a 
CameraConstrainedHighSpeedCaptureSession 
; but I don't see how to do that since createConstrainedHighSpeedCaptureSession 
actually produces a CameraCaptureSession.

Basically, all I'm asking for is sample code for:

createConstrainedHighSpeedCaptureSession

 with an onConfigured callback

inside the onConfigured one needs to use createHighSpeedRequestList and 
setRepeatingBurst



If a sample for just that piece could be created I would be very 
appreciative. 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/494de736-263e-4702-bff3-c6dd9064d0f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Eye Blink detection

2016-01-31 Thread sarmad mueen abd al mushyb
Hi

I'm trying to do an app for blink detection , I'm a beginner in android . 
How this can de done in android ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c98cb0f7-d328-4ed3-bf8d-d1d33f4cf438%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] how to distinguish sandbox order

2016-01-31 Thread gupei89
Hi, all:
I am reviewing googlepay's in-app-billing, and find the desciption of 
purchase return  is not consistency with the reality. I create an sandbox 
order, but actrually it return me an orderid. According to the offical 
pay-document described like attachment, it will not return an orderid parms!
page url is 
http://developer.android.com/intl/zh-cn/google/play/billing/billing_reference.html
;
However, in a word: I want to distinguish our order is sandbox order or not?

Verify expecting yours help! thx!

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c9ce26a4-0089-4ede-80c8-1ff1f78c014e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Getting MAC address in Android 6.0

2016-01-31 Thread Haianhnc Haianhnc

up vote0down votefavorite 


I've refer 
https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id
 and Getting MAC address in Android 6.0 
.
 
It's seem unable to get MAC address in android 6. Without 
WifiInfo.getMacAddress() and the BluetoothAdapter.getAddress() can we have 
an other way to get MAC address programmatically of local device.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/949f7e3d-581e-4244-a7ee-4d37aaa1f3d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Help me get this code working!!

2016-01-31 Thread Chuck Crisler
The error says it all and is clear. The class ProcessRegister *MUST*
contain a method doinBackground. This is simple Java. Read about abstract
classes/interfaces and you will understand.

On Sat, Jan 30, 2016 at 4:11 PM, Jetlabb Service  wrote:

> I am still new to android development, as well as Java. I was following a
> tutorial on how to make a login, and I am using some of their code right
> now, but I can't get this to work at all. I am getting a lot of errors.
>
> The errors I am getting are:
>
> Method does not override method from its superclass
> Class "ProcessRegister" must either be declared abstract or implement
> abstract method 'doInBackground(params) in AsycTask
>  NOTE: THE SAME GOES FOR class NetCheck
>
> Hopefully someone can help me, because I have no clue what I am doing
> wrong here...
>
> import android.app.Activity;
> import android.app.PendingIntent;
> import android.app.ProgressDialog;
> import android.content.Context;
> import android.content.Intent;
> import android.drm.ProcessedData;
> import android.net.ConnectivityManager;
> import android.net.NetworkInfo;
> import android.os.AsyncTask;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.Button;
> import android.widget.EditText;
> import android.widget.TextView;
>
> import wishlist.com.gimme.library.UserFunctions;
>
> import org.json.JSONException;
> import org.json.JSONObject;
>
> import java.io.IOException;
> import java.net.HttpURLConnection;
> import java.net.MalformedURLException;
> import java.net.URL;
>
>
> public class PasswordReset extends Activity {
>
> private static String KEY_SUCCESS = "success";
> private static String KEY_ERROR = "error";
>
> EditText email;
> TextView alert;
> Button resetpass;
>
> /**
>  * Called when the activity is first created.
>  */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
>
> setContentView(R.layout.passwordreset);
>
> Button login = (Button) findViewById(R.id.bktolog);
> login.setOnClickListener(new View.OnClickListener() {
> public void onClick(View view) {
> Intent myIntent = new Intent(view.getContext(), Login.class);
> startActivityForResult(myIntent, 0);
> finish();
> }
>
> });
>
> email = (EditText) findViewById(R.id.forpas);
> alert = (TextView) findViewById(R.id.alert);
> resetpass = (Button) findViewById(R.id.respass);
> resetpass.setOnClickListener(new View.OnClickListener() {
> @Override
> public void onClick(View view) {
>
> NetAsync(view);
>
> }
>
> });}
>
> private class NetCheck extends AsyncTask
>
> {
> private ProgressDialog nDialog;
>
> @Override
> protected void onPreExecute(){
> super.onPreExecute();
> nDialog = new ProgressDialog(PasswordReset.this);
> nDialog.setMessage("Loading..");
> nDialog.setTitle("Checking Network");
> nDialog.setIndeterminate(false);
> nDialog.setCancelable(true);
> nDialog.show();
> }
>
> @Override
> protected Boolean doInBackground(String... args){
>
> ConnectivityManager cm = (ConnectivityManager) 
> getSystemService(Context.CONNECTIVITY_SERVICE);
> NetworkInfo netInfo = cm.getActiveNetworkInfo();
> if (netInfo != null && netInfo.isConnected()) {
> try {
> URL url = new URL("http://www.google.com;);
> HttpURLConnection urlc = (HttpURLConnection) 
> url.openConnection();
> urlc.setConnectTimeout(3000);
> urlc.connect();
> if (urlc.getResponseCode() == 200) {
> return true;
> }
> } catch (MalformedURLException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
> return false;
>
> }
> @Override
> protected void onPostExecute(Boolean th){
>
> if(th == true){
> nDialog.dismiss();
> new ProcessRegister().execute();
> }
> else{
> nDialog.dismiss();
> alert.setText("Error in Network Connection");
> }
> }
> }
>
> private class ProcessRegister extends AsyncTask {
>
> private ProgressDialog pDialog;
>
> String forgotpassword;
> @Override
> protected void onPreExecute() {
> super.onPreExecute();
> forgotpassword 

Re: [android-developers] RelativeLayout as a child of CoordinatorLayout

2016-01-31 Thread Angel Todorov
hey,

Thanks for the feedback. I'm setting the scroll flags and scroll behaviors, 
here's my code (below). The issue with AppBarLayout as a first child is 
that whenever I set it inside of a relative layout, which is a child of the 
CoordinatorLayout, the scrolling behavior doesn't work. I guess I wasn't 
clear enough - it should be somewhere in the direct children of the 
CoordinatorLayout, if it's a child of a child, the coordinator layout 
doesn't pick it up.

My issue is not with the scrolling behavior - that works perfectly fine. my 
issue is that the content is overlapped by the app bar. The only way to fix 
this is to use a relative layout and set layout_below, but then the 
scrolling behavior stops working.


http://schemas.android.com/apk/res/android;
xmlns:app="http://schemas.android.com/apk/res-auto;
xmlns:tools="http://schemas.android.com/tools;
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/coordinator"
android:fitsSystemWindows="true"
tools:context="com.example.todorov.myapplication.MainActivity">















Here is content_matches.xml:


http://schemas.android.com/apk/res-auto;
xmlns:android="http://schemas.android.com/apk/res/android;
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:direction="both">

http://schemas.android.com/apk/res/android;
android:id="@android:id/list"
android:layout_width="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:cacheColorHint="#"
android:layout_height="wrap_content"/>



I've also tried moving the list view outside of the SwipyRefreshLayout - 
didn't change anything. Also want to clarify that i am setting the 
following in code, so that I don't have to use a RecyclerView or another 
view that supports nested scrolling - because the ListView on its own 
doesn't support nested scrolling, and coordinator layout's scrolling 
behavior expects a content view which supports nested scrolling:


listview.setNestedScrollingEnabled(true);

ViewCompat.setNestedScrollingEnabled(listview, true);



Thanks again,
Angel



On Sunday, January 31, 2016 at 7:02:27 AM UTC+2, TreKing wrote:
>
>
> On Fri, Jan 29, 2016 at 10:53 AM, Angel Todorov  > wrote:
>
>> The problem is that the coordinator layout always expects an AppBarLayout 
>> as its first child
>
>
> That's not true ...
>  
>
>> , therefore i cannot put a relative layout in order to adjust the 
>> positions of my content view relative to the toolbar.
>
>
> You shouldn't have to use a RelativeLayout. Putting a views in a 
> coordinator with the right scroll flags and scrolling behaviors set should 
> lay them out correctly.
>  
>
>> What happens is that the content view starts from the beginning of the 
>> screen, and the toolbar overlaps it.
>
>
> Without more to go on, I'm guessing you're missing scroll flags or a 
> scroll behavior.
>
> You should post your layout and screenshot of what it looks like.
>
>
> -
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c8bc86dd-5105-495b-b10b-0c0bbecab356%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] RelativeLayout as a child of CoordinatorLayout

2016-01-31 Thread Angel Todorov
Found the issue,

app:layout_behavior="@string/appbar_scrolling_view_behavior"


should be set on the SwipyRefreshLayout, not on the ListView.


Thanks,
Angel



On Sun, Jan 31, 2016 at 1:14 PM, Angel Todorov  wrote:

> hey,
>
> Thanks for the feedback. I'm setting the scroll flags and scroll
> behaviors, here's my code (below). The issue with AppBarLayout as a first
> child is that whenever I set it inside of a relative layout, which is a
> child of the CoordinatorLayout, the scrolling behavior doesn't work. I
> guess I wasn't clear enough - it should be somewhere in the direct children
> of the CoordinatorLayout, if it's a child of a child, the coordinator
> layout doesn't pick it up.
>
> My issue is not with the scrolling behavior - that works perfectly fine.
> my issue is that the content is overlapped by the app bar. The only way to
> fix this is to use a relative layout and set layout_below, but then the
> scrolling behavior stops working.
>
> 
>  xmlns:android="http://schemas.android.com/apk/res/android;
> xmlns:app="http://schemas.android.com/apk/res-auto;
> xmlns:tools="http://schemas.android.com/tools;
> android:layout_width="match_parent"
> android:layout_height="wrap_content"
> android:id="@+id/coordinator"
> android:fitsSystemWindows="true"
> tools:context="com.example.todorov.myapplication.MainActivity">
>  android:id="@+id/appbar"
> android:layout_width="match_parent"
> android:layout_height="wrap_content"
> android:theme="@style/AppTheme.AppBarOverlay">
>
>  android:id="@+id/toolbar"
> android:layout_width="match_parent"
> android:gravity="center"
> android:backgroundTint="#0288D1"
> android:layout_gravity="center"
> android:layout_height="?attr/actionBarSize"
> android:background="?attr/colorPrimary"
> app:popupTheme="@style/AppTheme.PopupOverlay"
> app:layout_scrollFlags="scroll|enterAlways">
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:text="Toolbar Title"
> android:textSize="25dp"
> android:textColor="#ff"
> android:layout_gravity="center"
> android:id="@+id/toolbar_title" />
> 
>
> 
>
>  android:layout_width="match_parent"
> android:layout_height="match_parent"
> />
>
> 
>
> 
>
>
> Here is content_matches.xml:
>
> 
>  xmlns:app="http://schemas.android.com/apk/res-auto;
> xmlns:android="http://schemas.android.com/apk/res/android;
> android:id="@+id/swipe_container"
> android:layout_width="match_parent"
> android:layout_height="wrap_content"
> app:direction="both">
>
> http://schemas.android.com/apk/res/android;
> android:id="@android:id/list"
> android:layout_width="wrap_content"
> app:layout_behavior="@string/appbar_scrolling_view_behavior"
> android:cacheColorHint="#"
> android:layout_height="wrap_content"/>
> 
>
>
> I've also tried moving the list view outside of the SwipyRefreshLayout -
> didn't change anything. Also want to clarify that i am setting the
> following in code, so that I don't have to use a RecyclerView or another
> view that supports nested scrolling - because the ListView on its own
> doesn't support nested scrolling, and coordinator layout's scrolling
> behavior expects a content view which supports nested scrolling:
>
>
> listview.setNestedScrollingEnabled(true);
>
> ViewCompat.setNestedScrollingEnabled(listview, true);
>
>
>
> Thanks again,
> Angel
>
>
>
> On Sunday, January 31, 2016 at 7:02:27 AM UTC+2, TreKing wrote:
>>
>>
>> On Fri, Jan 29, 2016 at 10:53 AM, Angel Todorov 
>> wrote:
>>
>>> The problem is that the coordinator layout always expects an
>>> AppBarLayout as its first child
>>
>>
>> That's not true ...
>>
>>
>>> , therefore i cannot put a relative layout in order to adjust the
>>> positions of my content view relative to the toolbar.
>>
>>
>> You shouldn't have to use a RelativeLayout. Putting a views in a
>> coordinator with the right scroll flags and scrolling behaviors set should
>> lay them out correctly.
>>
>>
>>> What happens is that the content view starts from the beginning of the
>>> screen, and the toolbar overlaps it.
>>
>>
>> Without more to go on, I'm guessing you're missing scroll flags or a
>> scroll behavior.
>>
>> You should post your layout and screenshot of what it looks like.
>>
>>
>> -
>> TreKing  - Chicago
>> transit tracking app for Android-powered devices
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from 

[android-developers] Android permission revoking

2016-01-31 Thread Dushyant Bhatt
Hi Team,
I am working on my research project on android security.
where i need to revoke some permissions of  installed application.

so please help me about HOW TO REVOKE PERMISSION OF INSTALLED APPLICATION 
ONE BY ONE.

Thank You

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/9dd67045-656d-4993-b9f9-5fb27d4be29f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to integrate in app billing in android

2016-01-31 Thread Jin Cheng
Hello, everybody.
I am making a android app with in-app billing function.
If you have some experience about it, please help me.
Thank you for your attention.

Regards
Jin

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/cc112b1f-35b9-47ce-be99-063404393f97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.