I am building an Android application for a Capstone class at my university with some other students. Our task is to implement open source games that run inside the application when they are selected.
I have done a lot of research looking around after having lots of trouble with it, and I have discovered that there is apparently no way to launch another app as a view in an already running app (you can only launch the outside app which will run on its own).
I saw some suggestions about fragments, but after looking into them, I don't think that fragments is possible either, since I'm trying to run a full application and not just a single class or two.
So am I correct in thinking that there is no way to do this without the already mentioned method of launching the app from inside the already running application, or would fragments be what I need to use to accomplish this?
Related
I want to take this open-source project, which is a build calculator for the online game Path of Exile, and port it to an android app. The project, called Path of Building (PoB), is written fully in Lua, and is released as a windows application. I'm not sure to what extent it's possible to simply wrap their lua code and just show it in an activity, but, since the project gets updated often (just as much as the game, which is once every three months), I'd like to touch as little of their code as possible and hopefully just have to set it up in Android. Any help or input is appreciated.
You can run Lua code on Android using a library called luaj.
Take a look at luaj site: http://www.luaj.org/luaj/3.0/README.html
I am developing several song book apps with basically the same functionality. I have developed "Evening Light Songs" and "Wahrheits Lieder". The main things that change between the two apps are the images and the database.
Right now I have them in separate projects. When I find a bug or make an update, I have to go to each project and change my code. Is there a way to bundle the code that is the same in both apps into one place so I only have to change it once? Then I could have other classes specific to each app that I would change separately.
Thanks!
I'm working on a game which would work both on the web, as an applet, and on the Android phone, as an app.
Is that possible to do, and if so, what do I need to be aware of to make that work (i.e if there are any settings that I shouldn't hard code and instead determine them based on the user's device when the game is run, or any java libraries that I shouldn't use?).
Also, the game needs to accept touchscreen as input for the Android app. Is that possible to build into the same game which will also be run as an applet? May be so at run time, the applet decides whether to use Mouse or Touchscreen for the input when it is run?
Although Android apps are written in Java, the framework around the app is extremely different of the framework wrapped around an applet. You won't be able to have one .jar file that you can include as an applet and throw at an Android device because that's just not how it works.
You will however probably be able to create all the game logic and objects and have them in be shared with the applet code and android app. You can probably even get away with having them in one repository and project (although it's probably going to have to be an Android project that you then wedge in your app build scripts).
In order to tackle the different controls for your game you are probably going to have to abstract away the input, and have your game/level object have a call back like userHasPoked(int x, int y) and then have the applet call that method on click of the mouse and the android app calls it on touch (which is oddly still called onClick).
I think it'll be a long road, but much easier than rewriting the whole thing. It'll probably seem like a lot more work up front, but once you are done wedging your code into an applet and an Android app, you'll probably "never" have to touch that code again and can just keep adding to the game.
I wouldn't underestimate the task, but that sounds like a very fun programming exercise. Good luck!
What kind of game do you develop? It may be the better approach to develop an Javascript game.
That can be installed with phonegap (cordova) onto an android device.
Let me break this for you....
Model - The Business Logic and Data
View - The Display of the Output of the Model
Controller - On which the action is done.
The advantage of using this MVC architecture is that, you can keep the same model and keep changing the Views.
So keeping this idea in mind, you can have the same model for both the Web App and the Android App, and then implement each others Views to it respectively.
I'm creating an app that is required to be used on older devices, I used the included source at https://developer.android.com/training/backward-compatible-ui/index.html to create the tabs but I would like to be able to switch between them using swipes.
Now I guess I probably messed everything up by using the java files in that training article and adapting it for my app, but I've got my app working exactly how I want it albeit without swiping.
So, start anew? or any other suggestions?
This is an Android noob question.
I am trying to start an activity of another apk through my own application. Now I know I can launch any other application and invoke its main activity. In many cases I'm also able to start subactivities, for example display it's settings dialogue.
However with some applications, for example Facebook or Endomondo I would get a FC everytime I try to launch some specific activity of their application.
Now I suspect that this is a permission issue and that the Facebook or Endomondo devs just don't want other applications to get access to their activities. But do I have to find out which activities I can use and which ones I can't use by trial and error every single time?
Plus: Is there any way around this dilemma? Maybe on a rooted device?
Cheers for any pointers.
As you already said you can only use activities of other apps which are designed to be used by others applications. Normally the developer of the other app define a set of intents and actions their app will be able to understand and process.
Using any other app's activity is by default not possible, this is by design of Android as every app runs in it own sandboxed process (there are some exceptions where apps can share a process).
So to use another app's activities you must know the intents it listen on. Normally this can be found in the applications website or documentation or on OpenIntents a dictionary for intents.