top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Andorid Sync Data format

0 votes
50 views

I am trying to find the Data Format used by the Android contact sync services for a sync service system to be developed for a similar service. Any leads?

posted Jun 19, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I have an Open-MAX component which can decoder AVC/H264 streams. The component works fine for .MP4 clips and I am able to play without issues. Now when I switch to .ts clips (which are .h264/AVC with AAC audio (because android only support that)), I see that the input buffer size is never sufficient to push the data in to the hardware.

By default I have a buffer size of 32kb which is later increased to 64kb (by SetParameter Call). I see the failure in this case.

Then I change the buffer size to 256 kb then this size is retained and not changed by setParameter call. I see the above issue with 256kb input buffer size. Even in this case I see the failure (attached log below).

I get the following error :

I/ATSParser( 2000): resizing buffer to 262144 bytes 
I/ATSParser( 2000): resizing buffer to 327680 bytes 
E/OMXCodec( 2000): [OMX.BCM.Video.decoder] Codec's input buffers are too small to accomodate buffer read from source (info->mSize = 262144, srcLength = 269076) 
E/MediaPlayer( 3598): error (1, -**********) 
E/MediaPlayer( 3598): Error (1,-**********) 
D/VideoView( 3598): Error: 1,-********** 

Any input -

+1 vote

I'm trying to random access some bytes in a Huge File(>4GB) in Android platform in a C code. However, fseek & ftell have the int limitations. Googling gave the options of fseeko & ftello with the compiler flag -D_FILE_OFFSET_BITS=64, but that it doesnt seem to work. So is it possible and is there a solution for the problem.

0 votes

I have applied the pagination as per the below code but the new data is not added to the Recyclerview. it loading previous data again and again. In this, I have applied the filter in the recycler view to filter the list according to the category. But I am unable to apply the pagination to the filterable recyclerview. Please assist.

I am using Firestore database in Android Application. If any more information is required, Please let me know

CODE

public void onFilter(Filters filters) {
        // Construct query basic query
        Query query = mFirestore.collection("posts").orderBy("timestamp", Query.Direction.DESCENDING);

        // Category (equality filter)
        if (filters.hasCategory()) {
            query = query.whereEqualTo("postcategory", filters.getCategory());
        }


        // Limit items
        query = query.limit(5);


        Query finalQuery = query;
        finalQuery.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
            @Override
            public void onComplete(@NonNull Task<QuerySnapshot> task) {
                if (task.isSuccessful()) {
                    for (DocumentSnapshot document : task.getResult()) {
                        PostsModel productModel = document.toObject(PostsModel.class);

                        mQuery = finalQuery;

                        adapter.setQuery(mQuery);
                       // list.add(productModel);
                    }

                    adapter.notifyDataSetChanged();
                    lastVisible = task.getResult().getDocuments().get(task.getResult().size() - 1);

                    RecyclerView.OnScrollListener onScrollListener = new RecyclerView.OnScrollListener() {
                        @Override
                        public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
                            super.onScrollStateChanged(recyclerView, newState);
                            if (newState == AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
                                isScrolling = true;
                            }
                        }

                        @Override
                        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                            super.onScrolled(recyclerView, dx, dy);

                            LinearLayoutManager linearLayoutManager = ((LinearLayoutManager) recyclerView.getLayoutManager());
                            int firstVisibleItemPosition = linearLayoutManager.findFirstVisibleItemPosition();
                            int visibleItemCount = linearLayoutManager.getChildCount();
                            int totalItemCount = linearLayoutManager.getItemCount();

                            if (isScrolling && (firstVisibleItemPosition + visibleItemCount == totalItemCount) && !isLastItemReached) {
                                isScrolling = false;
                                Query nextQuery = PostsRef.orderBy("timestamp", Query.Direction.DESCENDING).startAfter(lastVisible).limit(5);
                                nextQuery.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
                                    @Override
                                    public void onComplete(@NonNull Task<QuerySnapshot> t) {
                                        if (t.isSuccessful()) {
                                            for (DocumentSnapshot d : t.getResult()) {
                                                PostsModel productModel = d.toObject(PostsModel.class);

                                                mQuery = finalQuery;

                                                adapter.setQuery(mQuery);
                                               // list.add(productModel);
                                            }
                                            adapter.notifyDataSetChanged();
                                            lastVisible = t.getResult().getDocuments().get(t.getResult().size() - 1);

                                            if (t.getResult().size() < 5) {
                                                isLastItemReached = true;
                                            }
                                        }
                                    }
                                });
                            }
                        }
                    };

                    recyclerView.addOnScrollListener(onScrollListener);
                }
            }
        });


        // Update the query


        // Set header
        mCurrentSearchView.setText(Html.fromHtml(filters.getSearchDescription(getActivity().getApplicationContext())));

        // Save filters
        mViewModel.setFilters(filters);
    }
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...