Android :: Common Code For Two Similar Applications?
May 7, 2010
I have a set of common code (including .java files and resources), which I have to use for two similar applications with different package names (for different vendors). How can I maintain two packages which share the common code without making two copies of the common source?
View 3 Replies
Apr 14, 2010
I am currently moving from Xcode and iPhone development to Android with Eclipse. I want to have a shared code project so that I can store all the code to be shared across apps in one common library. However it would appear that the only android project available is for applications and not for code libs how can i achieve this?
View 4 Replies
View Related
Jul 2, 2010
I have an Android application composed by several Activities. Most of them need to check whether an active network is available or not:
public boolean isNetworkAvailable() {
ConnectivityManager cm = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
TelephonyManager tm = (TelephonyManager)
getSystemService(Context.TELEPHONY_SERVICE);
...
}
I would like to move that code to a helper class in order to avoid the need to write that code in every Activity, but calls to getSystemService are only allowed from an Activity. The other alternative is to move that code to a parent activity use inheritance but:
Every activity already extends from android.app.Activity
Some of my activities already extend from a common my.package.BaseActivity
(Activity <- BaseActivity <- XXXActivity)
What do you recommend in this case? Is there any other alternative?
View 1 Replies
View Related
Aug 31, 2009
I have done some cusomtizations on general user interface behavior. I would put those features into my applications. Therefore, I package my source code as a jar and add this external library to my applications.
As my cusomtization include some inflation of xml files, I put those resource in my package. However, when I finished compiled my application and ran it, it reports error. It seems cannot locate the xml file in the jar. (My debugger stop while inflate the xml file). Do I miss any step to use my jar file?
View 2 Replies
View Related
Sep 14, 2010
I'd like to bring out an Android app in the near future, so I was wondering how to support a couple of funcitonalities I have got used whilstdeveloping for J2ME and iPhone
first the versioning. With J2ME (using NetBeans as IDE) I had the option to auto-increment the softwwares version every time I compiled it. I was wondering if something like this is available for Eclipse and if so how to use it ? secondly a common code base. Is it possible to have a common code base for several projects ? For example I might have a game which actually uses the same code but needs different graphic resources. I'd hate to have a different project for every game/app and have to manually edit every project's source every time I want to submit a new code-change.
View 1 Replies
View Related
May 25, 2010
The application I am developing is in large parts a background-only Service BUT requires some settings that the user must add. Is there a way to integrate applications with the common Settings application/view/activity?
View 1 Replies
View Related
Jun 2, 2009
I am working on developing several individual android applications. We had created common UI Layout View XMLs, classes and resources. I would like to share these common layout xml, classes and resources across all of my android applications. I dont want to duplicate them in my applications. Is there any easy way to do this?
View 5 Replies
View Related
Jul 9, 2010
I am planning to purchase a DroidX on launch day and am switching from a BB Storm2. There are a few apps that I love on my Storm2 that I would like to have on the new phone. Wondering if you guys (and gals) can point me towards similar apps for the Android platform. 1. BerryBuzz - Customizes LED light for different notifications (I.E. can set light to Orange for SMS, Disco light for missed calls, etc.) 2. BerryWeather - Awesome weather app 3. Later Dude - Can set a reminder (calendar, task, call, e-mail, etc.) based on an incoming message/phone call 4. Pocket Informant - Great PIM app.
View 1 Replies
View Related
Jul 13, 2010
What i like about nokia is the pc suite(the older version) it syncs automatically with bluetooth. (files, pictures etc) and can read sms messages.
What ive read so far, theres no alternative on android?
Bluetooth handsfree- The current n82 connects fine to the car stereo,- and can accpets calls etc.
This seems to be a problem on android,-dependent on phone and android version. Is this correct?
Regarding programs, i have a call manager with whitelack lists, answering machine and scheduler. And a program that can record conersations.
Are there any android programs that can do the same thing?
View 2 Replies
View Related
Jan 1, 2010
Does anyone know of some applications that have similar feature to the moto cliqs motoblur?
View 13 Replies
View Related
Jun 9, 2010
what applications are included with the phone similar to words or excel?
View 3 Replies
View Related
Oct 12, 2009
I am developing a launcher application. I want to display the installed applications in categories like Android Market. Say if i have installed an application from category Communication, I want to show that application under Communication category in my launcher. How do i get the category (Android Market category) information of an application?
View 4 Replies
View Related
Jul 2, 2009
I wan't to uninstall applications using my application... I can retrieve the list of packages installed but I don't know how to remove them... I used the PackageManager class, getInstalledApplications() method... I can't find any method like removeApplication() or uninstallApplication().
the only method I saw in this class is the removePackageFromPreferred (String packageName) method... It retrieves a list of preferred packages.. I don't exactly know what preferred packages means or somehow how to retrieve them... I tried to put a package name in the method "removePackageFromPreferred (com.dev5.fivegame)" but it gives an error...
View 11 Replies
View Related
Jul 24, 2010
I want to create a "main" service/application which will provide different functionalities to other applications. According to android docs I can use elements from an application/ service in other. "A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). ...". There is any examples/documentation on this direction? TicTacToeMain/TicTacToeLib example is not helping me because it seems "TicTacToeLib" will be embedded in final TicTacToeMain apk file. Also I want to ask if is possible to detect if "main" service/ application is missing (if is missing I want to tell user to install it, or to install it automatically).
View 2 Replies
View Related
Aug 26, 2010
I have ten, possibly more, apps I'm developing that all share logic. 50-75% of the logic is the same - perfect for some time of library or code sharing. However, after reading the posts here and trying to share code in Eclipse, I'm not sure that's going to work. I tried going to project -> properties -> build path -> link source and adding the src and gen folders of the project with the shared code and then importing the classes I need. That seems to work in the IDE, but gives an error during runtime: class not found. This seems to be a common error for people attempting this.
I am slowly deciding that shared code is not the best approach in this scenario. Android doesn't seem to work well with this type of code sharing. For one thing resources are not packed in libraries, but references (R.whatever) must exist so as not to create errors. This can be designed around, but the effort and headache is probably worse than simply creating multiple copies. My experience seems typical, based on what I've read. Is it? Have you experienced success or failure with sharing code and/or custom libraries? Am I off-base in thinking that multiple code copies will be smoother sailing than fighting the shared code approach?
View 5 Replies
View Related
Oct 7, 2010
How can I reuse code AND resources in several applications? I have a fairly large code base (including resources) that I want to reuse i several applications. How can I do that?
I did try to use the Android Library concept (http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject) but never got it to work in Android 1.x
I'm amazed by the lack of information on the subject. It seems like Google has aimed Android development at pet projects and not real development. Variant handling should have been solved ages ago.
View 1 Replies
View Related
Sep 29, 2010
We recently came to know that a lot of Mobile Carries in Asia/India have proxy enabled to get Internet access via mobile. It turns out our App does not work when the phone has internet via proxy setup (APN). Does the APP need to handle proxy individually?
View 4 Replies
View Related
Nov 25, 2010
OK maybe I'm being paranoid and behind the rest of the world who has already done this: I'm afraid of adding my credit card to my Google Checkout account! My main concern being a super intelligent user of my Android phone who will buy a million apps (potentially!) - my 5 year old son
I used to have a credit card on my account - but that's expired
Knowing that the card had expired, I thought I would test out the buying of an app
I was surprised that it only took a few pages of my clicking yes to buy the app
(The purchase didn't go through - I got an email saying this because my credit card couldn't be charged)
Question: is there a secure pass code system to buy applications?
Like needing to input a code at the last step of buying
(I think this is how iPhone works - I say this not having owned one)
I don't think there is a secure pass system - I've played around with my phone loads and have never come across anything. BUT, EVEN if there was such a pass system: there's still something wrong!
I've bought my phone. Not made any changes. Just started using. I would imagine that's what everyone does - as opposed to buying and then customising and making secure (and maybe optimizing the use of energy so that it doesn't die within a few hours of use)
Buying an application: you can cancel within 24 hours (I think that's the time limit) Over the weekend, I let go of business life and only pick up on Monday - so if my son purchased and installed an application on Friday evening, I wouldn't find out until some time later - because I don't look at my phone OR my emails over the weekend! (+ Say if an application was purchased that I then managed to cancel - I then lose the right to buy again and trial with the right to cancel - a small point, but valid regardless I think)
Would be interested to hear what others say - maybe I'm missing something and maybe I'm using incorrectly.
View 24 Replies
View Related
Aug 22, 2010
I want to release multiple applications to android marketplace which are all very slightly customized based on a code base. I can't just change the package indentifier in the AndroidManifest.xml file because several other things dependet on this like action identifiers and so on.
What is the best approach to release several apps based on one eclipse project with the same code base?
View 1 Replies
View Related
Mar 22, 2009
Is anybody download the PaPi games from market and played it?
I found when I played one of this series of PaPi game and I input my name,then all series PaPi games can read this name.
At beginning, I consider maybe the application saved some data which can be shared by other PaPi games, but when I "Factory data reset" and format the SD card, then I download these games and play them again, it's so crazy that these games can read my name which I inputed before all the same!!
next, I consider maybe the application read the only code of the phone (IMEI) to identify the phone,but I check the install information about all the PaPi games, I can't found any information about "READ PHONE STATE",so I think these applications didn't read the IMEI code. who can tell me how to achieve this function?!
View 6 Replies
View Related
Jan 8, 2010
I am a game developer and have developed a nice global high scores module. The source code is in two different games of mine and anytime I make changes I carefully copy and paste the java files from one project to the other. As I increase the sophistication of this module, the copying and pasting can take a day or two to make sure I get it right. Now I am finishing up my third game and want to add the high scores module, but copying and pasting this in three separate projects seems absurd and will take up much of my time! Is there any way to externalize this module?
Unfortunately, the module makes reference to R for strings, layouts and other resources. It also uses common Android functions and resources from the Android library. Almost anything would be easier than the method I am using now--so any and all suggestions are welcome!
View 2 Replies
View Related
Jun 20, 2010
I have Activity A and Activity B. I want to access a method in Activity A from Activity B. This is my method:
Activity A extends activity{
public void save(){
} }
View 5 Replies
View Related
Jan 30, 2010
I am Working on develop an application .In my application I want to Put application header as it look like "Android Market Application". I need help on following issues.
1)How to put all header same for all activities in the application.
2)How to put the common header like in android market application.
3)How to put a common footer for all activities in application.
If possible send source code for my understanding.
View 3 Replies
View Related
Apr 15, 2010
I'm trying to use some common formatting for a number of different labels, all with different text. From http://android-developers.blogspot.com/2009/02/android-layout-tricks-, it seems as though I should be able to do something like the following:
<include android:text="@string/description" layout="@layout/label"/>
Where, in label.xml, I have:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<!-- more detailed formatting to come later --> />
For some reason, the text of the label is showing up empty when I do this. But I can successfully add an ID in this fashion, and then change the text of the label in my application code. For example:
<include android:id="@+id/description_label" layout="@layout/label"/>
View 4 Replies
View Related
Oct 1, 2009
What are the most easy mistakes to make that can be performance sinks on Android?
The documentation mentions "some floating point operations" can be "on the order of milliseconds" - has someone tested this?
For the sake of discussion, let's assume its running on a G1/similar device.
View 5 Replies
View Related
May 24, 2010
I have a TabHost with 4-5 tabs. I want to have a similar bottom for all the tabs. Is there any way we can add a bottom to all the tabs? Or do I need to place the xml code in every layout file.
View 1 Replies
View Related
Apr 9, 2009
Is there a way to launch a viewer for common file types like TXT, DOC, XLS, PDF from within an app, like Gmail does. Maybe a Google Docs api to pass the file to GD and have it open in the browser?
View 2 Replies
View Related
Nov 6, 2010
I'm making out a few menus for my Android App and throughout there is a standard textview that is repeated 5 times, only changing the android:text tag each time, everything else is the same.There are a good number of properties on this and it feels very inefficient to be copy/pasting all these for each of the textviews.Is there a way I define the common properties just once and add them to each TextView element?
View 1 Replies
View Related
Jul 8, 2010
I find it amusing how many Senseless ROMS are popping up. The majority of all ROMS thus far are Senseless and I don't really get it. The main reason I sold my MotoDroid to get the HTC Incredible was for SenseUI and now everybody is wanting to ditch it. I need more Sense ROMs to play with and theres just nothing to choose from. SO I figured I would start a poll and see if I am the only one. So is it a Sense or Senseless ROM preference?
View 38 Replies
View Related
Nov 1, 2010
So my phone spontaneously rebooted today:
http://androidforums.com/captivate-all-things-root/210476-brand-new-captivate-rebooted-today.html
Is there a common app that may be causing this? Only thing I thought of was either the app Battery Booster, which selectively shuts down running processes to conserve battery, or Lookout, which is an antivirus and back up. Any thoughts?
View 2 Replies
View Related