Adding new menu item to right-click (all platforms) - android

I have seen a lot of software and browser plugins do this. After installing them, they add some menu items to the system right click. Eg. On my PC, SVN added the item "SVN Checkout" to my right-click menu throughout.
On Android, you see Whatsapp adds itself to the Share menu across the entire system, so for every image you want to share, the option for Whatsapp also shows up. Similar stuff is done by Apps like Pocket, which adds the menu item "Save to Pocket"; so when you click on any article, you see "Save to Pocket" in the menu.
Question: How is this done? Is there a cross platform, generic way, or does this have to be done differently for every platform?
I need to provide this functionality to my users across Windows/Linux/Mac and Android/iOS. Any guidance on this is appreciated!
Update: Can this be done using only Java? That way, one solution will work on all platforms with Java
Thanks

No, there is no cross-platform way to do this.
In Windows, you edit the registry.
In Android, you can implement this in as number of different ways using the Android SDK.
Every platform has it's own APIs.
You also have a bit of a flawed mental model when you compare Android and Windows (or and mobile OS with any desktop OS). The features you mention for Android are built into an app running in the operating, while the contextual (right click) menu in Windows and OSX is a feature of the operating system itself.

Related

Re-add Cyanogenmod's CustomTile after it was manually removed

I'm toying with a very simple app that just adds a quick settings tile using Cyanogenmod CustomTile API.
Everything works (my app's code closely resembles the CM SDK sample app), except for a single scenario. The problem is, once I've manually removed the tile I can't find any way to add it back.
I've tapped "edit tiles" and deleted my app's tile. Now calls to CMStatusBarManager.publishTile don't seem to have any effect (I've surely tried to restart the app) and the only tiles listed for manual addition are the system ones. Uninstalling the app and re-installing it works, but I want to handle this scenario in somewhat more user-friendly fashion.
It would be best if I only could register the tile to be listed along the system ones in "edit tiles" mode, but I guess there's no API for this at the moment. Another acceptable solution is a way to re-add the tile (I'll just show a warning that tile was removed and a button to re-add it).
The question is specifically about CyanogenMod 12.1 and 13. Right now I don't care about any upcoming Android N stuff — I just want to make a user-level application specifically for CM-based ROMs of a certain phone have a feature and be on par with stock ROM.

is it possible to create an android 1.5.1 app using Android Studio?

is it possible to create an Android 1.5.1 app using Android Studio?
Yes it is old but still used...
It only has to read 3 different txt files which are located on local network, containing 1 line of text each and display it under each other in portrait view.
Refresh ones a minute should be ok.
And it has to have a dropdown menu so you can choose which number of device it is, so from 1-10 is ok and according that read the txt files which belongs to that device nr.
I can't use a webpage because i cannot create a local server for it. So i need a little app.
To create the txt files i use a windows program.
I use Livecode (since short) but it can't create apps below Android froyo 2.2.
Any help on this would be highly appreciated. As i don't know anything about java.
It's only for local use, nothing commercial or anything
Thanks for any help on this!
You should try using PhoneGap (Cordova) http://phonegap.com which is basically a HTML-Webview, wrapped up in an App, so you can code the whole thing using JavaScript, and it is still a real app.
With this it should be very easy to do that, even if you "don't speak Java".
But to answer your initial question, yes it should be possible to create an Android App for 1.5.1 with Android Studio. You just need to install the right SDK/Packages etc with the SDK Manager.
Have fun coding.

How to remove 'unremovable' consoles from eclipse

I don't work with android all the time, sometimes I am working with a server/client app and I need to check the console output of both. What I used to be able to do was pressing the little blue monitor button on the console view to toggle between the two. But now it also have other 3 irremovable consoles(DDMS, OpenGL Trace View, Android) that I don't use, not even when developing for android. What I want to know is how to permanently remove those 3 console views. I don't want to have separated eclipse installations nor having to install/uninstall plugins whenever I am not developing for android.
I am prepared to delete/modify plugin source files, however I don't even know what I would be looking for
You don't have to modify .
1)Go to "windows->open perspective" and choose it for yourself
2) Or go to windows->show perspective select as it suits you.

Eclipse Indigo "Shift+Alt+A" shortcut

I'm using Eclipse Indigo for Android development. Eclipse provides many useful keyboard shortcuts like Shift+Alt+A (block selection mode) or Shift+Alt+A R (run android app). The problem is these shortcuts doesn't work for me.
I've read a lot of topics here claiming that it is usually a problem with other programs installed on the computer. I am using Mint Nadia, Mint Maya (Cinnamon and MATE) on three different computers and none of them use the Shift+Alt+A shortcut nor any other installed program.
It seems to me there is a conflict in Eclipse with these shortcuts. If you simply type the Shift+Alt+A, IDE recognizes the shortcut but you're prompted with a pop-up to choose the additional key (D, S or R). No matter which one you choose it does nothing.
This is normal after installing the Android addon. Android adds three shortcuts that all begin that way.
Unfortunately, the only real option is to change the shortcut(either the block selection one, or all three Android ones).
Details on changing it can be found here, if you're not sure how.

Custom Android MMS/SMS application from source code?

Okay here's the deal:
I want to download the full source of the MMS/SMS application that ships with Android phones. I want to be able to modify it, and add a little custom functionality to it.
I am developing using Eclipse, and I'm on Windows 7. I have noticed that there is now a Git for Windows, but I am pretty lost in it and not sure how to integrate everything with Eclipse.
Basically, I want to just get it to the point where I have all the source code visible in Eclipse and be able to see the app run JUST like the built-in texting/MMS app that is already on my phone. Then I'll know that I can modify it and proceed.
Any ideas?
Thanks!
There's a mirror of the SMS/MMS app on GitHub here. Just import that to Eclipse and customise away.
Unless you want to customize and use it only on your own phone (without publishing), this is not a good idea. This is because it uses classes that are hidden from the sdk. By default you won't even be able to build the apk via eclipse, but there is a way. The reason why this is a bad idea is that the hidden apis are not guaranteed to remain the same through different api-levels and your app can stop working with the next android update, and might also not work on previous api-levels. In-fact your app might not even work on selected phones running the same api-level.

Categories

Resources