Android :: Determining LocalSocket Read Size
Jul 19, 2010
I'm using a UNIX socket to facilitate communication on and Android device between a system level daemon I've got running in C and an application I've got running in Java. I'm much more of a C coder than a Java coder, so I'm having some issues when trying to read in data from the socket on the Java side. Currently, my code is as follows:
try{//Prepare to write the command and read the ACK
InputStream is = receiver.getInputStream();
OutputStream os = receiver.getOutputStream();
BufferedReader in = new BufferedReader(new InputStreamReader(is));..............................
View 1 Replies
Dec 26, 2009
This is my first post. I've had a Moto Droid since day one, and I just love it. It is without a doubt better than any phone that I've had over the years, and that includes the iPhone, BB, etc.
However, there are 2 things that I don't understand - Font size and a spell checker. It is imposiible to read the small font size in emails or text messages.
1. Why has there not been an app to either change the font size or be able to zoom in? Picasy has incorporated multi-touch for zooming, so I've to assume that its doable! Why not have the same in an email client.
2. Why is there not an email client out there that allows for spell checking? There are many such apps for the BB! I am a terrible speller.
I am not complaining, I just want to understand the limitations from a developers prospective, as I am sure these isuues will eventually be addressed.
View 12 Replies
View Related
Aug 25, 2010
How can I tell if a device is using HTC's SenseUI? I thought about using android.os.Build information, but they seem inconsistent. Is there a more definitive way? I need to be able to tell if I can launch the calendar by using com.android.calendar or com.htc.calendar.
View 1 Replies
View Related
Jun 28, 2010
My question is- with the telephony manager, is there a way to determine what number the phone is off hook with? I thought getLine1Number() might return that phone number that is being dialed, but it is not what I expect. I am working with 2 emulators, and added a log line so that I could see what that method is doing. When dialing another emulator, I expected getLine1Number() to return 5554, but it was 15555218135. Perhaps there is another method I should be using instead? Do I need to be into the source code to get the information I want?
View 1 Replies
View Related
Aug 18, 2009
I was wondering if there is a way to determine who passed an intent to my application. For example, I have a service, that I want to act differently depending on who passed the intent (for security reasons). I'm trying to sandbox each calling application, so they only have access to their data stored in my application.
For it to be secure, I cannot trust any application to be truthful about the identifying data it is passing into my service. Therefore, I need some system way of identifying who sent the intent in a way that the calling application cannot change that information. I don't know if it is possible, but I can't find anything in the Intent class, and I was wondering if there may be another structure which does what I want it to. If it is not possible, I would like to get some type of mechanism to do this in the roadmap.
View 13 Replies
View Related
May 11, 2010
I looked over SensorManager and was still unsure, how do I detect if the phone is looking at true north (or any other direction for that matter).
View 1 Replies
View Related
Aug 6, 2010
How do you determine (programatically) if an Android device is: rooted Running a cracked copy of your software or rom. I have some sensitive information in my database, and I would like to encrypt it when the phone is rooted aka the user has access to the database. How do I detect that?
View 2 Replies
View Related
Nov 15, 2010
Is it possible to determine the unique bluetooth MAC address for an iPhone and an Android (and to a lesser extent, other smartphones) from within an app on said device? Is my assumption that the MAC address is universally unique correct? A general yes or no would be helpful. Example code in the case of an iPhone or an Android would be extremely helpful.
View 2 Replies
View Related
Nov 14, 2010
I have created multiple bitmaps - one for each folder (mdpi, hdpi, ldpi). Can someone show me some code or point me to the appropriate method that will allow me to detect which resource Android decided to load.
View 4 Replies
View Related
Jun 9, 2010
Question: How do you programmatically distinguish between directories and regular files in the assets folder?
When using AssetManager to access files in the assets folder, it seems impossible to determine if a file is in fact a file or a directory. You get the list of files from the list method and then open the file using the open method. I thought perhaps using the openFd method to get the asset file descriptor (and then subsequently requesting the normal file descriptor) would provide me some information. But requesting the file descriptor for a directory results in an IOException (which makes sense since what would it mean for a directory to have a file descriptor...?).
Currently I'm relying on that IOException (resulting from attemptng to open a directory in the assets folder) in order to determine if a file is in fact a directory. (Opening a regular file works just fine). This seems like a bad idea. Any other suggestions to distinguish between a file and a directory?
View 1 Replies
View Related
Apr 21, 2009
I am calling the ZXing scanner from Screen-A using intents. Once the scan is done control of course returns to the code behind Screen-A and I do some other work before calling Screen-B. Problem is the screen is black during this work period and I cannot determine the proper context to use to display a "working..." Toast/msgbox.
View 2 Replies
View Related
Jun 23, 2010
I'm working on an Android App where the user has different options for sorting the displayed data that comes from the database. Currently my orderBy string that I pass to Androids query() method looks like this:
"LOWER("+columnName+") ASC"
The problem with this is that if the data type in the column specified by columnName is integer, calling LOWER() on it will cause it to be sorted alphabetically, i.e. based only on the leftmost digit, which of course doesn't make any sense for numeric data. Hence I only want to apply LOWER() if the data type of the column is not integer. What I have in mind is a statement like this:
"CASE WHEN [data type of columnName is integer] THEN "+columnName+" ASC ELSE LOWER("+columName+") ASC END"
The part in the brackets is what I don't know how to do. Does SQLite provide a function to determine a column's data type?
View 3 Replies
View Related
Apr 4, 2010
I thought I'd share a script that I've been working on: http://www.anddev.org/viewtopic.php?p=30732
It lets you generate parameterizable histograms of Android Market sales by automatically downloading data from Google Checkout.
View 6 Replies
View Related
Jan 30, 2010
I wish to have one application that runs in the background, which knows when any of the built-in applications (messaging, contacts, etc) is running. So my questions are: How I should run my application in the background. How my background application can know what the application currently running in the foreground is.
View 4 Replies
View Related
Dec 9, 2012
I am trying to build AOSP for my Huawei U8836D, so I am making my own device tree. How do I determine which files in the stock ROM are proprietary, so I can define them in extract-files.sh?
View 1 Replies
View Related
Sep 23, 2010
So I'm loading images from a web service, but the size of the images are sometimes smaller or bigger than other images and the visualization looks silly when I put them in a ListView in android. I'd like to fix the size of my ImageView so that it only shows a portion of the image if it's larger than a preset amount. I've tried everything I can think of setting the setMaxWidth/setMaxHeight, setting the scale type to centerCrop, using ClipableDrawable wrapping my BitmapDrawable, setting using Drawable.setBounds(). I've tried setting in the XML and programmatically, but neither worked. I'm very surprised setting max width/height didn't do anything. Below is the XML I'm using ImageView definition in my layout file
View 1 Replies
View Related
Oct 2, 2009
I am currently developing a dictionary application with voice database. I would like to know about the current Android limitation on the file size. I am using a self-provided sqlite database ( > 50mb ) . I tested that once the built .apk size exceeds ~30mb the app will not be installed onto the simulator (INSTALL_FAILED_ INSUFFICIENT _STORAGE). Could anyone confirm me that if up until now there is no way to embed such large size files in a single apk ( Aimed to sell at Google Market without requiring user to download datafile afterwards). Also, is there a limitation of 1,048,576 bytes for a single file in the assets folder ?
View 3 Replies
View Related
Jan 22, 2009
if size of image is larger than or smaller than specified display size (on screen), then it is automatically, compressed and stretched resp by android run time or require to handle by explicitly.
View 2 Replies
View Related
May 7, 2009
Hi,
I would like to see how my app works on a 800x600 android netbook. how can i setup an emulator with this size?
thanks chris
View 4 Replies
View Related
Jun 30, 2010
I manage a cache of bitmap. Do you have an advise to fix the maximum size of it?
View 2 Replies
View Related
Jul 8, 2010
Can somebody explain to me what makes up the installed application size? I have an apk that is about 8 MB, and often when I install I get the INSUFFICIENT_STORAGE error. I have around 25-30 MB free space on the phone. I'm doing debugging so I have to upload lots of new versions. If I uninstall the previous version then I can install the new version. The application manager claims that the app is taking up 22 MB. So back to the original question, how come the app is taking up 22 MB when it really only is 8 MB?
View 7 Replies
View Related
Sep 14, 2010
I would like to know why the size of my shared library .so is bigger than my .apk file generated with Eclipse? Approximatly the so size is twice the apk one. What is strange is after having installed it in the device (2.1 firmware) I checked the size of the apk when I uninstalled it from the device and surprisingly the apk size indicated is bigger even than the .so one. Is there any explaination of that?
View 2 Replies
View Related
Oct 6, 2010
I know this has most likely been discussed many times. But I am looking for a decent email widget.
At the moment I am using the default htc email widget, however when ever I read an email from my gmail account it doesnt update the read status so it still shows as unread.
I would like one that would update the read status and possible the support for unified inbox so I can see new mail from hotmail account and gmail.
View 2 Replies
View Related
May 8, 2010
Is there a way to determine the audio format of an audio file in Android? On normal java I do it like this:
File file= new File(...);
AudioInputStream stream = AudioSystem.getAudioInputStream(file);
AudioFormat format= stream.getFormat();
View 2 Replies
View Related
Oct 7, 2010
My app downloads .png files to the sd card for later use. I kept getting OutOfMemoryErrors (if anyone could explain this too, that'd be great!) and so I took a look at the sizes of the images saved to the sd card, and they seem to be roughly double what they are on the server. Why is this, and how can I make them smaller?
public void onCreate(Bundle saved)
setContentView(R.layout.namedrxnscreen);
TextView t1 = (TextView)findViewById(R.id.rxn_text1);
TextView t2 = (TextView)findViewById(R.id.rxn_text2);
TextView t3 = (TextView)findViewById(R.id.rxn_text3);
TextView t4 = (TextView)findViewById(R.id.rxn_text4);
iv = (ImageView) findViewById(R.id.rxn_image);
pb = (ProgressBar) findViewById(R.id.rxn_loading);
vs = (ViewSwitcher) findViewById(R.id.rxn_switch);
View 1 Replies
View Related
Apr 22, 2010
I've been reviewing the Supporting Multiple Screens documentation on the Android and I just need some additional clarification...
It's my understanding that designing three unique interfaces (ldpi, mdpi, and hdpi) would be the best way to go about supporting all the potential android screens with minimal scaling/distortion.
Yes, I know there are similar questions posted, however... If I create an image for the benchmark mdpi (let's say my image is 300x210, just for example) how to I determine what size I will need to recreate that image at ldpi & hdpi? This post as well as a google search leads me to believe that ldpi is just 75% of the mdpi image, and the hdpi is 150% of the mdpi image. Is this accurate?
View 1 Replies
View Related
Dec 19, 2012
I am programming an app using an absolute layout (@ eclipse). How to fit the button size with the screen size? (I have four buttons per row).
View 1 Replies
View Related
Nov 16, 2010
I have an ImageView which I want to always be the same size. If the image is smaller than the view, I'd like it to be centred in the view. If the Image is larger than the view then I'd like it scaled down - with aspect ratio preserved.I've had several attempts at this myself
View 2 Replies
View Related
Feb 10, 2009
I have created a custom icon bar in Android using the XML layout creator, using a RadioGroup within a LinearLayout (XML included below). Each RadioButton within the RadioGroup has a custom drawable (with checked and unchecked states) as its android:button attribute. The Linear layout is itself within a RelativeLayout so that it can appear at an arbitrary position on the screen (as a side bar, in this instance).The drawables are 55 pixels wide, and the android:layout_width attribute of all these views is "wrap_content".When I make this component visible, aligned to the bottom-left of the screen, only about three-quarters of the RadioButton image widths are visible. Setting the layout_width of the RelativeLayout to "fill_parent" rectifies this and causes the full button to appear.However this means that the button group consumes click events across the entire width of the screen. How can I make the entire button appear, and have only the area of the button respond to clicks? Hard-coding the width of the drawable is not a particularly desirable solution.<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width ="wrap_content" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/LinearLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_below ="@+id/LinearLayout01" android:visibility="invisible"><RadioGroup android :id ="@+id/ RadioGroup01" android:layout_height="wrap_content" android:checkedButton="@+id/RB01" android:layout_width="fill_parent">
<RadioButton android:id="@+id/RB01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR01"/><RadioButton android:id="@+id/RB02" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR02"/>
<RadioButton android:id="@+id/RB03" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR03"/> <RadioButton android:id="@+id/RB04" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR04"/> </RadioGroup></LinearLayout>
View 2 Replies
View Related
Sep 30, 2010
I want to read a PDF file in android. I placed my PDF files in the assets folder.
How can i read the PDF file from there?
PDF Reader Link
I have checked the above link but it does not work for me. It gives me an error saying that the Activity was not found.
And I also want to open a PDF file in WebView. So is it possible to read PDF in WebView?
View 1 Replies
View Related