How do you convert an existing project into an Android project in Eclipse?
In particular, I want to convert a plain old Java project into an Android Library project.
Thanks.
In Android developers I've seen that testPreconditions() method is supposed to be launch before all tests. But in my app test, it's acting like a normal test. It does not run before all tests. Is there something wrong ?
Here is the description about testPreconditions() from android developer :
"A preconditions test checks the initial application conditions prior to executing other tests. It's similar to setUp(), but with less overhead, since it only runs once."
Is it possible to implement the Model-View-Controller pattern in Java for Android? Or is it already implemented through Activities? Or is there a better way to implement the MVC pattern for Android?
Simple enough question. I need to know the best way to get the same list of contacts that show up when a user presses the Contacts button.
You would think something like this would work:
//For Contacts
Intent pickIntent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
this.startActivityForResult(pickIntent, RESULT);
//For Phones
Intent pickIntent = new Intent(Intent.ACTION_PICK, Phones.CONTENT_URI);
this.startActivityForResult(pickIntent, RESULT);
The problem is that does not include secondary google accounts or Exchange contacts. By secondary accounts, in Android you can add additional gmail accounts to have the mail/contacts synced. The above intent will not list those additional contacts.
I am also told that on the HTC Desire you can add contacts to the phone that do not get synced up to Google. These contacts also do not show up.
So how do I get a real list of contacts so I can create my own list activity that works properly where the Google intent does not.
Hello -
I am utilizing a version of the "Grid View" example from the Android Developers site:
http://developer.android.com/resources/tutorials/views/hello-gridview.html
And I would like to display a small text caption below each of the images.
Can someone please give an example of how this might be accomplished (i.e. what needs to be edited)?
Thanks!
Is it possible to download a folder and its contents using air for android? I would like to also use the same code on iPhone.
I need it to be stored in the application storage so we can reference the content once downloaded.
I know it's possible to download content as referenced in this question: Download Content using Air For Android
but can a person download the entire folder and again store it in the application directory?
Thanks
@lukevain? :)
Does anyone know a good step by step tutorial for using sqlite on Android?
I've found this: http://developer.android.com/guide/topics/data/data-storage.html#db and it ok to start with, but then it wants me to jump into other source code then its difficult to follow.
I've tried others on the web, one from screaming penguin and that just kept causing errors with JVM.
Advice greatly appreciated.
I need to:
Create database, with several tables (auto id, declare type)
update
get
Hello Developers
Thanks to every on to support android development forum.
I want to make a application where when I click a button in my application then open android
built-in Calculator application.
That means I want to call calculator apk file from my application.
Is it possible?
Advanced thanks to reply
Duplicate: Is there any form designer available for Google Android?
I would like to move a CheckBox, so it displays in a different location than the top-left corner under Absolute Layout inside main.xml, for 'Android'. I'm using Eclipse to edit my views. How would I do this?
On an iPhone they have a tool called Interface builder that allows you to move things in a WYIWYG fashion.
Does Eclipse have similar functionality?
Regards
ShotSimon
Hi, I made an android application with googlemap api, and draw some 16x16 png (about 200 count) on overlay. When I move or zoom on/in mapview, "out of memory" error occurs very often.
I also used the googlemap appication in my htc itself. Seams that it uses about 14+MB memmory, and never happens "out of memory".
How to save memmory usage in a googlemap api, or how to enlarge android api memmory limit.
Thanks a lot!
Hi,
Tried posting this at android dev, wanted to go here too in case anyone knows. I'm trying to supply a custom background drawable for a dialog. I've created the following in my styles.xml file:
<style name="CustomDlg" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@drawable/my_background</item>
</style>
This works fine on 1.6+. On my g1 running 1.5 (and the 1.5 emulator) the drawable is used, but the area around the dialog is opaque black instead of being translucent.
Is there something I'm missing here, or is this a bug with 1.5? Any work arounds? Is 1.5 just the ie6 of Android?
Thanks
I know iPhone development fairly well. From personal experience, how hard would it be for me to get into Android. I am concerned less about code than I am about distribution of my software, given the fragmentation of the Android OS on compatible devices.
I've seen others discussing printing labels with a dedicated label printer using Java.
Is there any way to print labels using a regular printer with label paper using (optimally) Android libraries/API? If not, is there any way to do this in a non-mobile context using Java?
Searching for "Java Label Printing" is only turning up the aforementioned dedicated label printing bits, which aren't quite what I'm looking for.
dear friends,
referring to the code example of mine
http://stackoverflow.com/questions/2997703/android-remote-image-getting-problem
how can i accommodate bigger resolution images in android.
when i try to display bigger resolution image from internet it give me null bitmap.
any one guide me whats the solution?
any help would be appreciated.
Hello , everyone
Some pre-define variant, for example:attribute value, layout
view .etc. (e.g.android:galleryItemBackground), where i can find the
source code(exactly implementation or definition) in site:
android.git.kernel.org,
Hi,
I'm looking at jumping on the band-wagon and knock out a couple iPhone and Android apps.
I'm not a complete beginner as I have programmed in quite a few languages, with my current focus on PHP and Drupal development, but I have not developed for either the iPhone or Android before.
I have downloaded the respective SDKs, but I was hoping to find some good quality tutorials that with step-by-step guides getting your development environment up and building your first app.
I am generating file names that contain a timestamp in the following format:
"base_name (yyyy-mm-dd hhmmss).ext"
This seems to cause a problem on Android. Here's my log:
/storage/sdcard0/anMoney/transfer/Net worth over time _ Forecast (2012-11-19 110550).pdf
E/Gmail (11802): java.io.FileNotFoundException: /storage/sdcard0/myapp/transfer/Net worth over time _ Forecast (2012-11-19 110550).pdf: open failed: ENOENT (No such file or directory)
E/Gmail (11802): at libcore.io.IoBridge.open(IoBridge.java:416)
E/Gmail (11802): at java.io.FileInputStream.<init>(FileInputStream.java:78)
E/Gmail (11802): at java.io.FileInputStream.<init>(FileInputStream.java:105)
E/Gmail (11802): at android.content.ContentResolver.openInputStream(ContentResolver.java:445)
E/Gmail (11802): at com.google.android.gm.provider.MailEngine.cacheAttachment(MailEngine.java:3054)
E/Gmail (11802): at com.google.android.gm.provider.MailEngine.sendOrSaveDraft(MailEngine.java:2746)
E/Gmail (11802): at com.google.android.gm.provider.MailProvider.sendOrSaveDraft(MailProvider.java:477)
E/Gmail (11802): at com.google.android.gm.provider.MailProvider.insert(MailProvider.java:534)
E/Gmail (11802): at android.content.ContentProvider$Transport.insert(ContentProvider.java:201)
E/Gmail (11802): at android.content.ContentResolver.insert(ContentResolver.java:864)
E/Gmail (11802): at com.google.android.gm.provider.Gmail$MessageModification.sendOrSaveNewMessage(Gmail.java:3576)
E/Gmail (11802): at com.google.android.gm.ComposeActivity$SendOrSaveTask$1.onInitializationComplete(ComposeActivity.java:1765)
E/Gmail (11802): at com.google.android.gm.provider.MailEngine$5.run(MailEngine.java:1006)
E/Gmail (11802): at android.os.Handler.handleCallback(Handler.java:615)
E/Gmail (11802): at android.os.Handler.dispatchMessage(Handler.java:92)
E/Gmail (11802): at android.os.Looper.loop(Looper.java:137)
E/Gmail (11802): at android.os.HandlerThread.run(HandlerThread.java:60)
E/Gmail (11802): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
Now, if I trim the file name to have only 16 characters within the parentheses, everything is working as expected. I am able to send the file as a GMail attachment.
The following file name is working fine:
/storage/sdcard0/myapp/transfer/Net worth over time _ Forecast (2012-11-19 11070).pdf
I tried the following troubleshooting:
It's not the overall length of the file name, as if I shorten the base name, the same behavior remains
It's not GMail, uploading the file to Google Drive fails similarly
16 characters inside the parentheses work, but not 17
It's not the space character inside the parentheses that causes the issue, as I replaced it with a dash and it's the same problem.
Anybody has any ideas on what's going on here?
Forget screenshots, is it posible to capture a video of the running application in android?
Rooted or non-rooted, I don't care, I want atleast 15fps.
Update: I don't want any external hardware. The intent is to make it perfectly portable and every frame is captured within Android OS. If it crosses the boundaries of the app sdk, I'm willing to go to OS level modifications but I would need a starting point.
Are there any requirements/guidelines for an Android device? like numbers of buttons or minimum buttons required.
Also are there any android devices which do not have the menu and back buttons?
( I am aware that no menu/back buttons will kill most of the apps in terms of usability , I just wanted to know more on the topic :-) )
(I am coming from an iPhone experience)
When we create an iPhone app, Apple gives us a http URL that we can put on web pages that when clicked will open iTunes and give the user a chance to buy on their desktop.
As Android has no "iTunes" Windows/Mac application on the desktop, what do I link to on my Web pages/email marketing so that users can go and buy the Android apps we are writing?
Ian
I'm doing some initial research on smart phone development, and I noticed that Android and Windows Mobile both support c++ for application development. I was curious if anyone had any experience trying to manage shared files between both Android and Windows Mobile, and to what extent that code can be shared? e.g. no user interface can be shared, but web service and business logic classes can be shared, etc.
Hi,
In android, is it recommend to use static variable?
E.g, implement a Singleton pattern in Java, I usually do:
private static A the_instance;
public static A getInstance() {
if (the_instance == null) {
the_instance = new A();
}
return the_instance;
}
My question is when do that get free by android JVM?
Thank you.
I will be releasing two applications soon, one for my company and one for me. Publishing app on my own is straightforward, but I'm not sure which account to use for the company.
What practice do you use in your company?
I only see one solution, creating a special google account like [email protected] shared by the company Android devs.