Basically I want to add my application to the application chooser list for files with the type .php, .java, .js, .html etc. so that users can browse for a file using any file browser and use my app to open it.
I've looked at tutorials for Broadcast Receivers but none of them have shown how to do this, they've just shown how to listen for the phone state changing and stuff.
Help! :(
Thanks,
Alex!
Although I never used it, I think this might help you: Intent-Filters.
And also this thread from anddev.org.
Related
I have an application with the following configurations: (let suppose)
1) App name <"ZPE Location Aware">
2) App icon <"given by the company">
3) App Web service url <"will be embeded in Application">
Note: this web service url is the url which will be used to make the web service call to perform different task.
Now we have this app , an Idea is that , when we are giving this app to our other customer then the App name should get change by web service to the other let say from "ZPE to MPE" and also the app icon gets change so also the url should be change
Now please tell me how can it be done ? I am reading about build flavor but it does not look like my case.
So how can this thing be done ? what is better approach to perform this task ?
App name and icon are written inside the manifest.xml file, and this file is encoded in the apk (you can open it as a zip file if needed).
So there are no real ways to change the app information runtime, the only way is to distribute a different apk.
Anyway, you can browse this answer, that suggests you how you can substitute an icon through a listener; this is not a real "icon change", and you will always have a standard icon that is visible before it is temporarily changed by a runtime program.
Update:
As soon as you have Android Studio installed and the source code of the app, you can:
change app_name inside strings.xml
change the url that you can put inside strings.xml too
change the icons inside mipmap_* directories.
make a new apk
It's rather a fast work that can be done in 2 minutes, so I don't see a big problem in it. You could even automize it with gradle, but I think it isn't worth the work.
I registered some file-extensions for my AIR-Android-App, so when a file is selected, my app receives an Invoke-Event in Flash/AS3 with the path to that file.This works fine for files/downloads/links.
However, some Applications provide a a content-uri instead of a direct file-path (e.g. eMail-attachments before they are downloaded).
e.g:
content://gmail-ls/houseatreides#gmail.com/messages/6/attachments/0.1/BEST/false
QUESTION:
How can i turn this into something i can load in AIR/AS3.
Or how can i order the other application to catch the file for ?
If its not possible in AIR, does anyone know of an ANE that gets the job done ?
I found a post how to do it native in JAVA:
How to create a file using content?
Confirmation that is not possible in AIR is also welcome.
Thank you.
verdave
In Android Live Wallpapers, the usual Android View classes cannot be used (as far as I know). Therefore, if you want to let a user select a file, you would have to write your own File Chooser interface pixel by pixel. This would be an extraordinary endeavor.
Is there any way for users to pass a parameter -- such as a file name or directory location -- to an Android application?
Live Wallpapers have a mechanism to have a settings UI associated with them that can be set when the user is selecting the wallpaper. This is android:settingsActivity described here: http://developer.android.com/reference/android/R.styleable.html#Wallpaper
You might consider using Open Intents. For example, apps like OI File Manager offer intents like PICK_FILE that let other app developers use their functionality. Installing may add several clicks the first time but it's otherwise fairly seamless (just like choosing an attachment from Gmail).
Check out:
Open Intents: Pick Folder
Open Intents: Pick File
Hi
I created an application (BookReader) that parses and displays a certain book (given as the default book).
But if I simply copy any other book on my device and attempt to open it, android displays a list of suggested installed applications that can open my book. Among these suggested applications is my app (BookReader) too and if selected it opens that book.
How can set my app so it won't appear in the suggested android apps list? Because I don't want my app to be used for opening other books. Just the default one.
Thanks
NOTE! I want it to appear in the application list. I just don't want to appear as a app suggestion for opening other books or files.
thanks guys!
I solved it by removing the mimeTypes in the manifest file which were inside the intent-filter that was a match for the action of opening those file formats.
Hope this helps others too
Your application is probably registering for an intent that matches the intent used by any book. You probably want to modify your IntentFilter to narrow the scope to only match your specific book somehow. What intent does your book generate?
You will need to modify the AndroidManifest.xml to remove the IntentFilter that listens for books. If you paste the contents of this file, I can provide more exact details.
Did you take an open source eBook reader and try to package individual books as their own applications?
I am wondering about new skinning mechanism for my app. However I don't want to make my application bigger.
Is it possible to create another app, which will be able add/change files of another my app in /data/data/com.myfirstapp directory ?
You could set up aContentProvider that other apps could use to transfer data to your app, which could then save it to its own data directory.
The answer is simply no, you can access other applications from your own application but you cannot edit or change them.