How to handle and use the default application of android programatically - android

Can anyone explain me, how can I handle and use the default applications of my Android device programatically.
Also how can I get all the app information installed on my device and also unistalling them progromatically.
If possible kindly give me fews links to understand and using these things properly.

By "default app" I assume you mean a Home replacement. There is a Google sample here as well as ADW Launcher and also the source for the Android launcher

Related

Is it possible to open native android clock app from web application?

I am looking for a way to open the native android alarm clock app when a user clicks on the link or button on a web browser of the android. So basically need to open the native android app from web application. I tried using intent://#Intent;package=com.android.deskclock;end' and it is not working. I am wondering if I am using the wrong package name or it is not even possible in android.
Thank you much for help!
According to this documentation, this is not possible. In particular, this footnote is the limiting factor:
Only activities that have the category filter, android.intent.category.BROWSABLE are able to be invoked using this method as it indicates that the application is safe to open from the Browser.
If you look at the AndroidManifest.xml for the DeskClock app, none of the activities contain the android.intent.category.BROWSABLE category filter, meaning none of them can be opened from the browser.
I have a suspicion that the problem is that you are not providing a URI path in your URL. It might need to be a path declared in the app's manifest. See: https://developer.chrome.com/multidevice/android/intents
This could change it to ie intent://path/#Intent;package=com.android.deskclock;end'
It might be helpful if you were to look at the javascript console when you try to click on that link in Chrome, there might be details of what went wrong.
Keep in mind that the alarm clock app is not necessarily consistent. Manufacturers can remove the default alarm clock app to replace it with a different one, or just modify the source code so that it has the same package name but different source code. You could try opening multiple package names from javascript depending on what happens when the intent can't be opened.
Welcome to code party
You can get a android device IFrame from appetize site.
This is the easiest way for show android apps in web applications.
Update me in comments ;)

add another app inside my app?

my goal is to get a video from a usb connected device (an easycap video grabber) displayed. There is already an android app that does exactly that. However i need to add some buttons and some extra functions to it. So i came to the idea of displaying the app that already exists inside my app. Is that possible in any way?
I already tried to decompile the existing app to edit the code a bit but i didn't get anything to work with.
Do you have any other idea? If you know how to program that please let me know what i need to achieve that.
Thank you!
This cannot be done due to security reasons in the Android OS itself.
Android provides a security layer called the Sandbox in which the OS assigns a User ID for each app, so that an app will not have permission to access resources from another app.

Is there any way to run others apps in my Android app's layout?

I know it may sound weird but i was wondering for few days that can i launch any android app in my android app's layout? I searched in the google but couldn't find any answer.I know that app's have ability to send the user to another app based on an "action" it would like to perform.But i would like to know can i run the app in my app's layout??Suppose i have an app that has a layout called activity_main and now i want to replace the activity_main's layout with the app i want to call so that the called app is running inside my app.Thanks in advance to anyone who can clear my doubt??
can i launch any android app in my android app's layout?
No.
You cannot run any Android App inside your App.
But, you can run a WebApp [thats adaptive designed] inside your Android App.

Is it possible to switch APN programatically in android?

I am trying to develop an app in which I need to connect to a specific APN programatically for network testing purposes.
As a user, I can do this by going to "Settings" -> "Wireless & networks" -> "Mobile Networks" (long press) -> "Access Point Names". It will even let me add a new one manually.
I want to know, is there a way an app can do that automatically? I have root permissions and everything you might need.
If anyone knows the android source, can you point me on where to look to study the behavior of this screen? I've tried to take a dive there but I'm kinda lost.
I'm answering my own question in addition to what was pointed by 7383. Hope this helps someone.
Similar to ApnEditor, I was actually looking for ApnSettings (link to cyanogen). I supposed this screen was provided by android and didn't suspect that "Settings" was actually an app.
The apps can't be used with an IDE as we usually do, it should be either compiled with makefiles like android or edit it's source so it's "ide-compatible" as suggested here
Now, to add or edit APNs you can't just put that code in any app. You need android.permission.WRITE_APN_SETTINGS which is a permission only available to system apps. The app won't be portable, but it appears this can be done using a rooted phone or a custom rom. More info here and here
I hope you are looking for this. The following links are from Android settings app source code.
add new apn
Set as default

Getting App/Widget on Homescreen?

I was wondering if it's possible to get the icon (shortcut) of your app on the home screen during installation instead of inside the standard apps folder ?
And I did find out that Android has AppWidgets but I was wondering if it supports "standard" widgets as well (javascript/html/css) ?
At the moment it doesn't support "standard" widgets (javascript/html/css), but you should take a look at the Titanium Project
And there is no way to automatically put a shortcut on the homescreen when the application is installed. Not sure if most users would like that either.

Categories

Resources