Android :: DVM Instance Creation - Launch Installed Droid App At Runtime From Another?
Oct 14, 2009
I trying to understand how a new process is being created based on AndroidManifest.xml, also looking for the possibility of creating/ forking a new Java process/new DVM instance at runtime.
I could find that using Runtime.exec one can issue system commands or launch native applications, but this is not what I am looking for, I am looking for creating an equivalent java process just as the parent java process.
Can I launch an installed android application at runtime from another android application? Whats the way for doing this?
View 2 Replies
Nov 15, 2010
My question is how to launch the third-party android applications I installed through Intent directly?
View 2 Replies
View Related
Nov 5, 2010
I have a widget that contains 4 buttons to show 4 stock prices, each of them will launch into the same activity Quote.class to show stock details. In onUpdate(), it will set up the pendingIntent with extras with stock symbol. After I hit button A, it goes to Quote activity that shows stock A. Then I hit the BACK button to the homescreen, Quote activity calls onDestroy() and when I hit button B, stock B will show properly. However, when i hit HOME button after it shows stock A, the Quote activity only calls onStop without calling onDestroy(), then as i hit button B, it will call onStart() and it shows the same instance that shows stock A.
CODE:............
Originally I thought adding a flag in the Intent should solve this problem. But I have tried
i.setFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK or FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_NO_HISTORY), none of them makes any difference.
So is there any ways to make it work? How can i remove the history stack from HOME button? How can I call onCreate in Quote activity and get new extras when i hit button B?
View 4 Replies
View Related
Jul 20, 2010
My first application will just be a kind of launcher that I would like to improve. This launcher will launch a custom Home that the user has installed. That's like the application "Home Switcher, but I would like to do that myself.
So my first goal is to get all "Home" applications list: that's really easy and the code is there:
CODE:.......
Now I would like to do that in a listview. My first problem is to get the Icon: I failed, but that's not my main problem ( if you can help me I would be happy)
I succeed to make a listview with all the names of the installed Home:
CODE:........
And now when I click on a home, I would like to lauch the Home, so what I did is:
CODE:...............................
So, there is a box that that appear and ask me:
Complete action using:
LauncherPro - or Sense - or ADW
Wallaper Gallery
I think I am close to what I would like to do. what I miss or give me an example of a Launcher that would be a few linecode.
View 1 Replies
View Related
Oct 6, 2010
I want to launch an installed package from my Android application. I assume that it is possible using intents, but I didn't find a way of doing it. Does anyone have a link, where to find the information?
View 2 Replies
View Related
Jun 14, 2010
I would like to launch some applications, like the Calculator, the alarm clock, the notepad, the calendar, the camcorder, the camera, the dialer, etc, from my application. Is there an easy way to do that? Is there any place with a list of what are the intent names to launch them?
View 6 Replies
View Related
Jun 15, 2010
I installed a non-market .apk app on my new Evo using Astro File Manager, by clicking the install button in the file manager interface. But how do I actually launch the app to use it now that it is installed? I can't find an icon or a place to make a shortcut to.
View 5 Replies
View Related
Nov 1, 2009
Is there any free or opensource Eclipce plug in avaliable for UML diagram auto generation for Android?
View 2 Replies
View Related
Apr 21, 2010
I was wondering if it is possible to start a ListActivity and in real time decide how far down the list it should be focused on. (Example: When the activity is started it checks for certain conditions and then it may scroll down to a row partially through the list.)
View 1 Replies
View Related
Sep 27, 2010
As the title says, where can i find small application creation jobs for Android.
Please don't tell me 'freelancer' because I have already checked there.
View 3 Replies
View Related
Feb 8, 2010
Is there a simple way to change the contents of a dialog box in Android without having to re-create the dialog box? I know that Activity.onCreateDialog() is only called once when the dialog first needs to be created, and this is where you initially set the dialog's contents. I need to change the dialog's contents later, so I'm wondering what is the proper way to do this.
View 1 Replies
View Related
Jan 31, 2010
Say my app has a widget and I use a configuration screen to do initial app widget setup and set a few preferences.
I want the user to be able to change those settings by simply going into my app's settings screen and clicking an intent preference to open up the same options the user was given when the app was created.
Can I use the same activity as the configuration activity? Will I have to handle it differently? How does the existing widget get updated with the new settings?
How can I get this to work?
View 1 Replies
View Related
Mar 2, 2009
1) I am developing my app in Eclipse 3.4.1 with Android (ver 1.1_r1) plugin. My app compiles and executes without errors when using the Eclipse IDE.
However, when I export my app (unsigned) using Eclipse (via {select project} >right-click>Android tools>export unsigned application package), sign it, and try to run it on the Emulator, it throws a runtime error when I try to update my sqlite database, at which time the specific error created is: SQLite error#14, unable to open database. It is able to read from the database without problems. (I have also verified that the database is: open, is not readonly, is not locked by another thread, is not in the middle of a transaction.)
I have limited experience, but this seems more like a "system" problem given that the app works OK in Eclipse IDE but then fails as an exported/signed apk. Some googling of SQLite resources revealed a similar error on a non-Android platform which was fixed by: "Set your permissions correctly on /var/tmp, or whatever directory you are using to hold temporary files".
Does Android have temporary files, and if so how does it handle permissions on temporary files? Is there a way to check or set these permissions to see if this fixes my problem here?
2) Not sure if it is related, but after I have run the exported/signed app which causes the runtime error, if I reboot the Emulator, and try to run the program using the Eclipse IDE , the program fails with the same exact error. PLUS I also noticed the following error message while the program is installing/running: 03-01 22:22:29.282: ERROR/PackageManager(53): Package com.northwestradiology has mismatched uid: 0 on disk, 10019 in settings; read messages:
I can restore the Eclipse version of my program to be able to execute without runtime errors by utilizing the -wipe-data option for the emulator. But note that if I run my signed APK using an emulator created with the -wipe-data option, it still throws the runtime error listed above...
View 2 Replies
View Related
Dec 29, 2009
I'm from Argentina and this is mi 1st post, sorry for my poor English.
My doubt is if Adobe AIR runtime, for desktop apps, can be installed and run on Android.
Recently i get a smartphone (Droid phone) and i want to use the multi- touch API launch by Adobe, to mobile devices, and is ideal to test on the smartphnoe directly, only if Adobe AIR can be run on Android ..
View 3 Replies
View Related
Feb 19, 2010
I am trying to create an option in my code to change layouts using preferences. I already have the two layouts created in XML, but I can't figure out how to swap between the two during runtime. I would like to cause it to check during onResume() since it is called directly after returning from the Preferences screen and when starting up, however I can't figure out the code necessary. I tried just using setContentView() a second time, but it didn't seem to work. What can I do?
View 1 Replies
View Related
Feb 19, 2010
In Android, you need to implement the following Activity methods so your application can be restored to its previous state if the OS decides to destroy then recreate your activity:
public void onSaveInstanceState(Bundle savedInstanceState)
public void onRestoreInstanceState(Bundle savedInstanceState)
The examples I've seen of implementing these methods is to use put/getBoolean, put/getInt etc. on the Bundle object (i.e. primitive objects only) to save the application state. This seems hugely error prone way to save your state for a start and I cannot see how this scales to storing complex objects without writing lots of code.
What options do I have for storing/restoring state in a robust and easy to implement fashion?
In case it's important, my application (a game) needs to store about 50 objects, which each store maybe 5 float variables and some store references to other objects. I don't particularly want to have to write save/restore methods for every class and subclass (maybe about 15 of these) I use. It would be ideal if I could just stick all my state relevant objects in an object called "state" and then just call save/load on "state" to handle everything.
Is using Java serialization an option? I've heard it's very slow, but is that a problem for save/restoring? Could I just write my data to the SD card? To a database?
View 1 Replies
View Related
Feb 24, 2010
What is the best way to launch an app and calculate its launch time in android(if it can be done with some code,then its better)
View 2 Replies
View Related
Sep 23, 2009
I am writing an widget application for android.
I have a requirement where i need to disable the widget on some intent, i.e., I have the remove the widget from the android home screen and remove from menu options so that the user cannot add the widget further.
I have to enable the widget on some intent, so that, the framework automatically adds the widget to the home screen, by calculating the empty position available on the home screen, and the many option re-appears in order to add the widget further.
Please let me know if this can be possible..
View 3 Replies
View Related
Feb 15, 2010
I want to display Battery level stats in my app. How can we obtain such information like Battery Power, Battery Voltage, etc.?
View 2 Replies
View Related
Nov 20, 2010
My application requires 2 screens and for this I have created two different XML layout files using RelativeLayout. One layout file loads whenever I run my Activity. Now I want to load the second layout on to the same Activity , when user click on a button in OptionsMenu and also when user press Back button the first screen loads instead of exiting the application. So that i don't need to create another Intent in my application.
View 3 Replies
View Related
Mar 7, 2010
I've got some XML resources in my Android app. Each one has a different name like "bicycle.xml" and "car.xml". I'd like to know if there's a way to load resources based on conditions during run time.
As an example...
Say I had a text input in my app. When the user enters "bicycle", my app can look up an XML resource by that name, parse and load it. Whereas if they enter "car", they would end up with the data from the other XML file.
I've noticed so far that to load resources, you have to use the autogenerated "R" class, which restricts you to hard-coding resources at compile time.
View 1 Replies
View Related
Jan 27, 2010
Why when I look at a contact n go to edit, why is there many "google contact" instances all for the same contact. Like it has their name numbers n email then keeps scrolling and has multiple per contact. Why is that and can I do away with them..
View 3 Replies
View Related
Jun 14, 2010
I am getting a run time exception
java.lang.RuntimeException: Your content must have a ListView whose id
attribute is 'android.R.id.list'
I don't know what is wrong> code...
View 1 Replies
View Related
Jun 3, 2010
I have an Android application with a main activity that is the tabhost. I'm adding multiple tabs to the tabhost with an intent to several activities.
My problem is that these activities are not created (onCreate is not called) until I click on the tab. This is a problem because I need to register broadcastreceivers: there may be broadcasts that are sent -before- a particular tab is opened.
I tried to work around this by:
Setting my receivers as static and registering from somewhere else. This is not possible because I need to call into methods.
Calling into tabHost.setCurrentTabByTag(the_tag) and then switching back to my root tab. This only works sometimes and this is a very ugly solution imo.
Not using activities but just using views instead. Also not a very elegant solution because it turns my tabHost activity into one huge master class doing all kinds of unrelated things.
View 1 Replies
View Related
May 10, 2010
A question that might be a bit general/basic knowledge, but for me it has a quite direct background, so i'll form it as an example:
I have an activity "entry" showing something equivalent of a blogpost, that might have comments. You can click somewhere to open a "comments" activity. But in this activity there are links back to entries, creating a nice line of activities.
If I call the "entry" activity (with an intent) on a link to show this entry, am I re-using the old activity, or am I creating an endless string of entry, comment, entry, comment activities (pretty cost- ineffective that would be).
View 9 Replies
View Related
May 14, 2010
I have a TabActivity. Within this activity (in the onCreate method) I create a TabHost and a TabSpec and do a tabSpectSearch.setContent(intenSearch); The Indent is created using intentSearch = new Intent().setClass(this, MyActivity.class);
As far as I already found out the class MyActivity is instantiated when I select the tab, to which it is connected. Is there a way from my TabActivity to force the creation of all activities (all tabs) at once?
View 4 Replies
View Related
Apr 28, 2010
I use the following code to create a folder "mymir" and a file ".nomedia" (in the mymir-folder) on the sdcard of an android unit. However, somehow it fails with the exception that the folder the ".nomedia"-file is to be placed in dosn't exist.
Here's the code:
CODE:....................
View 1 Replies
View Related
Nov 17, 2010
I'm looking for apps which allow me to make music. Preferably something which does not just make crappy loops. Something with a staff or matrix would be nice.
View 5 Replies
View Related
Feb 3, 2010
I created a simple client socket from my Activity, but it fails. I am running this activity in emulator and server runs on PC(its a different application without Android stuff).
*clientSock = new Socket("127.0.0.1", 30001);*
logcat shows java.net.SocketException: permission denied <maybe missing INTERNET permission>
If I enable permission for my Activity(android.permission.INTERNET), my Activity constructor itself not called and logcat shows following info. Permission Denial: starting Intent < flg=0x10000000 cmp=com.example.client/.MyClientActivity > from null <pid=-1, uid=-1> requires android.permission.INTERNET.
Any suggestion on how to resolve this issue?
View 3 Replies
View Related
Feb 12, 2010
I am trying to write a code for an SMS widget. I wrote something that I can compil, and print on screen my first sms. When I click on next, nothing happend.
View 1 Replies
View Related