Android :: Protocol Buffers (protobuf)
Jul 21, 2009
When using Protocol Buffers with Android (running in the Windows VM) I'm noticing that the first time I instantiate a protocol buffer based class Android lags for some time. When I step through it looks like it's spending a lot of time dynamically loading the protocol buffer classes. Is there something I can do to speed up this process? I haven't tested yet on a physical device, so the delay might not be as bad but in the VM it takes about 30 - 45 seconds to load all the classes and get past that first message instantiation. What I did was downloaded the Protocol Buffers source code. Compiled the.java files. Stuffed them into a .jar. Added the .jar as an external library to my Eclipse project. Generated the .java classes from the .proto files. Added the generated .java files to my project. Ran my project. I'm not sure if I'm doing something wrong it terms of how to reference external libraries with an Android project, but 30-45 seconds seems like a very long time to wait on a 2.6GHz machine. Also, I recently learned that android uses Protocol Buffers internally. Will this cause any sort of conflicts with my included .jar that could be the problem? I *think* the namespace is different but I'm not entirely sure. Lastly. Why did Google use Protocol Buffers internally and not make it available to SDK developers. This makes me very sad knowing that it's all right there and I can't use it.
View 20 Replies
Jun 16, 2009
In a process of switching from indirect to direct buffers for OpenGL geometry specification I've found a problem with the following function in java.nio.IntBuffer class: IntBuffer put(int[] src, int off, int len) this function is supposed to do a bulk transfer of int data from the given array starting at the specified offset. It should be an optimized version of the following code: for (int i = 0; i < len; i++) {buffer.put(src[off + i]);}
View 2 Replies
View Related
Aug 30, 2010
I'm using MediaRecorder.setOutputFile(FileDescriptor fd) over a UNIX socket, so that local code on the device can see the encoded stream in real time (for video streaming out).
What I observed is that the encoder doesn't write encoded frames continuously, when they are produced, but by "bursts", exactly one second apart. I tried both containers (THREE_GPP and MPEG_4) and all three available codecs (MPEG_4_SP, H263, H264), the behavior is always the same. This one-second period is notably unrelated to framerate or bitrate, so it is not flushing by size; rather, it seems to be flushing by time (possibly to mask SD card write overheads ? Bummer, I 'm not using the SD here !). Is it a known limitation ? Is there a known workaround ?
View 2 Replies
View Related
Dec 8, 2009
for all those gl*Pointer functions you need to create bytebuffers through ByteBuffer.allocatedirect. when you want to load a texture through glteximage2d you need to supply a bytebuffer, too. can this be a "normal" bytebuffer or do I have to create this one too via allocatedirect?
View 2 Replies
View Related
Apr 8, 2010
I can't seem to find the proper audio source for recording/analyzing/receiving the currently played music track (or just any playing media). I'm not talking about the Mic.
The spectrum live wallpaper does this on the Nexus One AFAIK.
How can I keep receiving wave buffers of the currently playing media?
(I would like to support everything from 1.5, but 2.1 specific solutions are also welcome)
View 1 Replies
View Related
Dec 27, 2013
We are new to Android development. We have written small code which reads /dev/graphics/fb0 and sends frames to other application through network. We are successful if /dev/graphics/fb0 is available. But some android devices have fb0 and fb1(ex - Samsung Galaxy Grand - GT- I9082, Android version 4.2.2). luckly sending fb0 frames is sufficient to get required frames. We are not able to understand why fb1 exist and what is significance of the fb1. We also found few mobiles have fb0, fb1, ... , fb13. How to find which is main framebuffer?
View 2 Replies
View Related
Oct 8, 2009
The following what written on the Android 1.6 Platform Highlights: Android 1.6 includes the updated OpenCore 2 media engine, which has: * Support for OpenMAX encoders * Support for additional audio codecs in AuthorEngine * Improved buffering model supports shared buffers allocated in the decoder Could someone explain to me how this affects us the developers? Does this mean now we can play other media types? What in reality is new to us on Android 1.6 in regards to OpenCore?
View 2 Replies
View Related
Nov 3, 2010
Im going to develop one android application which transfer music file, contact exchange, voice chat, text chat etc.through WiFi. Which protocol will suit my application UDP or TCP. Because both protocol having some merits and demerits. Can u give me some suggestion, it will helpful for me.
View 5 Replies
View Related
Oct 12, 2010
How can i implement SIP protocol in android.I want to make video conferencing application using SIP protocol.So is it feasible using SIP protocol and how to start.
View 1 Replies
View Related
Apr 27, 2010
Do you know any way on how to play a stream using mmsh protocol? It seems android at default cannot play mmsh streams. Any idea or inputs on how to start?-- 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+unsubscribe @googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 2 Replies
View Related
Nov 11, 2009
i want to do the following thing - when a user navigates to a web page, I want to have a link in there that looks like this: <p><a href="myprotocol://blah=42">Click here for fun.</a></p> Then when the user clicks on that from the phone browser, I want it to launch my intent with that full url. In my AndroidManifest.xml file, I have the following info: <activity android:name="com.test.MyActivity" style="@style/ MyStyle"> <!-- custom protocol association --><intent-filter><action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category><category android:name="android.intent. category. BROWSABLE"> </category><data android:scheme="myprotocol"/></intent-filter></activity>When I try this, when I click on the link on the web page from the phone browser, it says -- Web page not available The Web page at myprotocol://blah=42 might be temporarily down or it may have moved permanently to a new web address.
View 20 Replies
View Related
Jul 20, 2010
For some reason, my Desire won't access any internet pages this morning. When I select any of my favourites it tries hard, but then flicks to a page that says:ERROR The requested URL could not be retrieved.The following error was encountered while trying to retrieve the URL: www.bbc.co.uk ICAP Protocol error The system returned: [No error]This means that some aspect of the ICAP communication failed.Some possible problems are:The ICAP server is not reachable.An illegal response was received from the ICAP server.I've cleared the cache, cookies and history. I'm with Orange if that helps! I've checked a number of sites. I've tried going via favourites and typing URL directly into the address bar. I use the standard Android browser.
View 30 Replies
View Related
Mar 27, 2010
Using the Android SDK, is it possible to play a video stream using the MMS protocol I am streaming video from a PC using windows media. I can use Windows Media Player to play the stream by just inputting the following URL in Windows Media Player mms://192.168.223.194:8081. Is it possible to play the same stream using the Android SDK?
View 1 Replies
View Related
Apr 7, 2010
We are designing an internal system that will have a .NET PC base station and many Android mobiles, communicating over WiFi. Can't decide between SOAP or XML-RPC protocol. Primary concerns are maturity, compatibility, and the minimizing of coding/integration, in that order. Which is best?
View 1 Replies
View Related
Nov 1, 2011
which protocol Google Talk on Android uses? I know that for the Talk application on Gmail uses the Jabber/XMPP protocol. I need to know what protocol (or if it's the same protocol) that's the protocol being used on port 5228.
The reason being, my organization will open the port to the Android sync and push services but only for that specific protocol (for security purposes obviously).
View 4 Replies
View Related
Feb 11, 2010
I would like to explain me better. In android once you receive an email on gmail you would get notified almost in realtime. How does it work? Thinking about an answer i had 1 idea: Android is connected to a gmail server which does not send anything untill it has new mails This solution , which is the only one i can think about, is a little bit expensive, in term of battery consumption. Do you have further ideas? If not do you know some opensource server that will accomplish my idea?
View 2 Replies
View Related
Sep 21, 2010
Does Android Support OpenYmsg Api?
View 1 Replies
View Related
Oct 12, 2010
are there any docs covering the filtering of the protocol specifier? Something like the market application does with "market://", i'd like to make with my application.
View 3 Replies
View Related
Jan 21, 2010
I need to insert,update,delete events in google calendar using android. I tried using the protocol given at http://code.google.com /apis/calendar/data/2.0/developers_guide_protoc but I was unable to go beyond authenticating the user. I was able to authenticate the user and I extracted the Auth code using:- temp1 = EntityUtils.toString (response. getEntity ()); if(response.getStatusLine().getStatusCode()==200) auth = temp1. substring (temp1. indexOf ("Auth=")+5).trim (); After this I tried inserting an event which did not work. I was getting status code 200 in response and I am not sure even if I did get a proper response, how can I extract the cookie s and gsessionid for my next request. I tried creating a calendar instead and I received the same status code 200. I used the following code:- String messageBody="<entry xmlns= 'http://www. w3.org /2005/Atom'"+ " xmlns: gd='http:// schemas. google.com /g/2005'"+ " xmlns:gCal=' http://schemas.google.com /gCal/2005'>"+" <title type='text'>ABC Project Schedule</title>"+ " <summary type='text'>This calendar Type as otherwise I would get a ClientProtocol Exception (content- length was causing the exception, didn't put content-type since it is already mentioned in the entity not sure where it should be defined). I am sorry that I don't understand the basics correctly.
View 3 Replies
View Related
Feb 11, 2009
How does Android provide support for traditional TCP or UDP sockets? Is there a wireless IP protocol using just the cell phone? If so, how does this work? Or, do I need an 802.11 chipset in the handset (assuming this isn't standard)?
View 2 Replies
View Related
Dec 21, 2009
I was wondering if there is an app that allows you to name your phone. For example lets say i named my Droid. Optimus Prime And then i could use voice protocol after saying my phone's name For example Optimus Prime please text autobots (contact group), "Autobots Transform and roll out!" After saying its name the phone would automatically know that Autobots is a contact group and that the message i want texted is "Autobots Assemble!" Is there an app like this already? If there isn't it would be a great idea for one.
View 2 Replies
View Related
Nov 6, 2010
I am hoping to create my own protocol handler for urls in a webview. I have tried two approaches already. The first was to attempt something similar to the approach defined here to create a customer protocol handler. http://java.sun.com/developer /onlineTraining/ protocol handlers / This works in a command-line Java program if I correctly set the system property java.protocol.handler.pkgs, but it does not work in Android, probably because I cannot figure out where to define this system property. Defining the system property in the code does not work. I assume this is because it needs to be loaded when the application first starts. I have also attempted to use URL.setURLStreamHandlerFactory. This works for creating URL objects within the code, but it does not seem to be associated with the WebView. Any ideas on how to get this working?
View 6 Replies
View Related
Jul 8, 2010
i have a camera Activity after which i take a picture and saving it to gallery and uploading to the server My upload code is not working, i need help on this? // image capture
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 0);
//image Saving
if (requestCode == 0 && resultCode == RESULT_OK)
{ Bundle extras = data.getExtras();
Bitmap b = (Bitmap) extras.get("data");
ImageView mImg;
mImg = (ImageView) findViewById(R.id.head);
mImg.setImageBitmap(b);
// save image to gallery
Shot = "HeadShot"; //Long.toString(System.currentTimeMillis());
MediaStore.Images.Media.insertImage(getContentResolver(), b, Shot, NAME);
//Upload to the server public void Upload(String url, HttpEntity imgdata) throws Exception, Exception {
DefaultHttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
post.setHeader("Content-Type", "bitmap; charset=utf-8");
post.setURI(new URI(url));
post.setEntity(imgdata);
HttpUriRequest request = post;
HttpResponse response = client.execute(request);
HttpEntity entity = response.getEntity();
return entity.getContent();
View 1 Replies
View Related
Jul 15, 2010
I'm trying to implement some basic functionality for Google Spreadsheets,using the protocol specification with requests.The reason i'm doing this because it is for Android, and gdata-java library doesn't really work and the alpha android one doesn't really cut it.I managed to implement authentication, and get for lists, and delete, but for editing updating a row i can't really wrap my mind around it.For example i want to change the contents of a cell here is the specification for the protocol From my understanding of it, i have to send some sort of atom or xml formatted request to the edit URL. I never sent such type of requests. I also found this, which gives a clue on how it should be done (also an unanswered question on a forum), but didn't really managed it.Here is my authentication function if you need it, so you don't implement it again, if you want to try and code it.
/*** Logs in to the Google service using the ClientLogin HttpRequest API and returns an authentication token */ private String getAuthToken() {HttpClient httpclient = new DefaultHttpClient();HttpPost httppost = new HttpPost(CLIENT_LOGIN_ADDRESS);
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("accountType", "GOOGLE"));
nameValuePairs.add(new BasicNameValuePair("Email", "username@gmail.com"));
nameValuePairs.add(new BasicNameValuePair("Passwd", "password"));
nameValuePairs.add(new BasicNameValuePair("service", "wise"));
nameValuePairs.add(new BasicNameValuePair("source", SERVICE_NAME));
try {httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));This currently gives a 400 Bad request.Also I'm trying to achieve this using Apache HttpClient. Does anyone have any idea on how this might be achieved implemented how what request i should send?
View 2 Replies
View Related
Mar 22, 2010
I'm not sure on the status of routing audio to SCO based earphones. Does the 2.1 SDK support this already ? And if not, did anyone succeded in applying the work around with AudioManager.setBluetoothScoOn(true) ;
View 2 Replies
View Related
May 16, 2012
If exists a L2TP or PPTP or even OpenVPN protocol implementation (C or Java) which can be used in an Android application?
View 1 Replies
View Related
Jun 30, 2009
I'm looking for a protocol to secure a connection between a mobile device and a web service. I want to ensure that only the mobile device can perform actions on the web service and vice versa. Data doesn't need to be encrypted. I know Oauth, but it seems that it's more used to secure connections when you got 3 different entities (Server, Consumer and Auth). Here, the Consumer and the User would be the same person. Is there a simple protocol to do that (without requiring the user to login and then authorize the access token like it is the case for Oauth)? I need to use it on different plateforms, so the protocol needs to be available at least on iPhone and PHP.
View 3 Replies
View Related
Oct 1, 2009
please someone know wich APIs it's are responsable to transfer data on ftp ,download or upload. I want use this APIs to create application.
View 2 Replies
View Related
Oct 13, 2010
I'm developing an application on Android 2.2. This application have to read some h264 videos using HTTP protocol. To read a video, I'm using following methods :
// INIT PART mMediaPlayer = new MediaPlayer(); mMediaPlayer.reset();
mMediaPlayer.setOnErrorListener(this); mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnSeekCompleteListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
// SET DATASOURCE mMediaPlayer.reset(); mMediaPlayer.setDataSource(url);
mMediaPlayer.prepareAsync();
In prepareAsync callback : public void onPrepared(MediaPlayer mediaplayer) { mMediaPlayer.start();
}
View 2 Replies
View Related
Aug 24, 2010
I am using the Hessian web protocol[1] or rather more the Android port Hessdroid[2] to fetch and unserialize objects from a web server. It works quite well but unfortunately I get this message:
CODE:......
When actually unserializing an object. The code within the library that throws the warning is:
CODE:.......
I guess the problem is that the class NewsSetCategory resides in a package and so cannot be loaded without the whole package name by the ClassLoader but this is a bling guess.
Is there a way to adapt the class path or to easily create a new PathClassLoader that will load classes directly from the package? Or does anybody else have any experience with Hessian on Android?
View 8 Replies
View Related