Monday, January 24, 2011

ColorDict Intent API for 3rd party developers

-------------- SEARCH API ---------------------
- You can use PopUp dialog style ColorDict result on your app.
- You can specify FrameLayout LayoutParams for dialog.

public static final String SEARCH_ACTION   = "colordict.intent.action.SEARCH";
public static final String EXTRA_QUERY    = "EXTRA_QUERY";
public static final String EXTRA_FULLSCREEN = "EXTRA_FULLSCREEN";
public static final String EXTRA_HEIGHT   = "EXTRA_HEIGHT";
public static final String EXTRA_WIDTH    = "EXTRA_WIDTH";
public static final String EXTRA_GRAVITY   = "EXTRA_GRAVITY";
public static final String EXTRA_MARGIN_LEFT  = "EXTRA_MARGIN_LEFT";
public static final String EXTRA_MARGIN_TOP   = "EXTRA_MARGIN_TOP";
public static final String EXTRA_MARGIN_BOTTOM  = "EXTRA_MARGIN_BOTTOM";
public static final String EXTRA_MARGIN_RIGHT  = "EXTRA_MARGIN_RIGHT";


Intent intent = new Intent(SEARCH_ACTION);
intent.putExtra(EXTRA_QUERY, "hello"); //Search Query
intent.putExtra(EXTRA_FULLSCREEN, false); //
intent.putExtra(EXTRA_HEIGHT, 400); //400pixel, if you don't specify, fill_parent"
intent.putExtra(EXTRA_GRAVITY, Gravity.BOTTOM);
intent.putExtra(EXTRA_MARGIN_LEFT, 100);
startActivity(intent);


- Check intent before using it

public static boolean isIntentAvailable(Context context, Intent intent) {
 final PackageManager packageManager = context.getPackageManager();
 List list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
 return list.size() > 0; 
}


-------------- PICK API ---------------------

[Constant]
public static final String PICK_RESULT_ACTION  = "colordict.intent.action.PICK_RESULT";

[Code]
Intent intent = new Intent(PICK_RESULT_ACTION);
intent.putExtra(EXTRA_QUERY, "hello"); //Search Query
intent.putExtra(EXTRA_FULLSCREEN, false); //
intent.putExtra(EXTRA_HEIGHT, 400); //400pixel, if you don't specify, fill_parent"
intent.putExtra(EXTRA_GRAVITY, Gravity.BOTTOM);
intent.putExtra(EXTRA_MARGIN_LEFT, 100);
startActivityForResult(intent, 5);


[RESULT]
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
 super.onActivityResult(requestCode, resultCode, data);
 if(resultCode == RESULT_OK) {
   Log.d("test", data.getStringExtra(Intent.EXTRA_SUBJECT));
   Log.d("test", data.getStringExtra(Intent.EXTRA_TEXT));
 }
}




52 comments:

  1. Hello,
    thank you for the great work you have done.
    Concerning Colordict 2.4.0, I want to raise that it's not working with some dicts (russian, LDaF.pdb.tab.utf.dict, bulgarian). I use 1.67.405.6 android in french.

    ReplyDelete
    Replies
    1. I really love the quality writing as offered on this post, cheers to the writer. graavaa

      Delete
    2. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work.www.luxuryescapes.in

      Delete
    3. This is also a very good post which I really enjoy reading. It is not everyday that I have the possibility to see something like this.Startup investment in India

      Delete
  2. Social & Mobile, please check your email and the comments on your post about ColorNote! A lot of us are having probs accessing our backup data.

    ReplyDelete
    Replies
    1. Someone ask me about the private blog network building service for their projects so I guide them proper info about this and sort out their queries. I give a suggestion about the other thing to take the info about it it's good for themselves.

      Delete
  3. WONDERFUL application! Thank you! I had to reinstall ColorNote. When I open the app and go to "Backup" in the menu, the only option I have is to "Backup Notes. The menu on this screen give me the option to "clear saved data" but nothing else. There is a bar that says "Saved backup data" but will not allow me to select it. I can see the backup data I want on my computer in the files list when I mount the phone. How do I restore the notes to my phone givin these parameters???

    ReplyDelete
  4. I like ColorDict very much! Thank you for this exciting application!

    The only thing, which is some kind of disturb for me is that dictionaries are saved unpacked. It will be much more convenient to use original compressed .dict.dz files. And it's not so difficult! I've found all libraries needed in jdictserver project (http://code.google.com/p/jdictserver/). I've even created a little demo application to demonstrate possibility of using this classes for random access of compressed dictionaries. This application could be downloaded from http://ul.to/eks66v

    It will be great if you could integrate this into ColorDict! This improvement should save up to 80% of space needed for dictionaries.

    If you prefer, I could integrate this improvements by myself just let me know where to find ColorDict source code and I'll send you a patch.

    You can contact me via e-mail: mr_july@mail.ru

    Best regards,
    Igor

    ReplyDelete
  5. Does anyone know how to reach the developer of this application? I have been trying to contact the developer but I can't seem to find an email link anywhere.

    ReplyDelete
  6. Is it possible to have ColorDict install to the phone instead of transferring all the data to the SD card?

    (Sorry, I relaise it's an unusual request.)

    Yours faithfully

    Ben

    ReplyDelete
  7. Simple but fantastically useful app!

    But is there any way to select a different notification tone for reminders, instead of only the phone's default notification tone?

    If this isn't possible, could it be added as a future enhancement please?

    Thanks,
    Si

    (HTC Desire, 2.2 Froyo)

    ReplyDelete
  8. fantastic thank you for your app been using it for a year so i can tell you a lot about it I have some improvements/ideas to give!
    1. First i think you should reinvent the dictionary organization, i am a dictionary maniac and it it is very hard to organize the dictionaries with up and down when you have more than a hundread of them..
    To do so you should/can implemente Dictionary Groups, group name set by the user of course
    for example creates group for "English Language" will let colordict search only in the dictionaries in the english language and you can do that also for the other langauges French or any as user like Spanish Chinese Indian Russian and so on..
    2. Then you could add some switch button in the home of colordict to switch easily between groups of dict! or some checks (Search in Selected group only (Checkbox))
    3.Plus you could use the volume buttons to move from dictionary to dictionary in the home search ...the screen indeed might be small while the dictionary many and the entry large! if you want to move to next dictionary in search results you have to scroll manually and it takes a loooot of time!
    4.than you could decrease the dimension of "Search" "History" and "Dicts" to save screen space
    5.You could also add something to Hide/Unhide the small window of a dictionary in the Search results like a minimize that will remain in the screen... Right now when you click the dictionary you can keep pressed to "Select a word" "Copy to clipboard" etc.. you could say that a double click hides/unhides your choice!
    6. Text To speech functionalities using various TTS available in android a small icon and then calling android system would be easy wouldn't be?
    7. A bit more annoying... WebKit support? You use online dictionaries such as Wikipedia, what if there is an online dictionary www.somewebsite.com/search?=%ColorDictWord% :)
    8. Could you add history by date? and make it last longer (set up by user) never delete history etc.. keep in sd card
    9. Option to disable dictionary from the search results when keep pressed(Yellow highlighting)
    10. just to reach ten :))

    take a look at fora dictionary http://ng-comp.com/fora/android.htm to understand more of what i said before ;)

    ReplyDelete
  9. Please include a font that supports IPA-characters! Droid-Fonts are so damn bad. I would love such a feature :)

    ReplyDelete
  10. My favorite dict app on android. Here I would like to ask for some enhancements:

    1. While exporting data by "share", can we have a check box for "making this choice default"? It would be great to have one, so that I won't choose the same app from time to time.

    2. TTS. I see that we have a loudspeaker icon when using google translate, how can I integrate this function to my homebrew dict file?

    ReplyDelete
  11. Thanks for the app! Its so usefull while reading books with FBreader :P

    Could you please provide public API and knowledge how to create Addons/external directories for ColorDict? just like google translate and wikipedia

    Thx bye

    ReplyDelete
  12. I noticed the ColorNote application on the Android Market. We would like to make your application available on our upcoming Android device. Will you provide us permission to do so?

    Thanks,
    Mark Hollingsworth
    mhollingsworth@esi-estech.com

    ReplyDelete
  13. Hi there. I must say that I really enjoy having this program. I teach English in Japan and it really helps me with my students. There is one request I have. I own a tablet Android device that has a 1280x768 resolution. Even on the largest font setting, the text is TINY. Would it be possible to add something to the next version that would allow for even larger font sizes? REALLY big ones? Thank you for all that you have done. I appreciate it.

    ReplyDelete
  14. ColorDict is great but....

    It uses over 5% of my phone's CPU in the background when it's doing nothing.

    ZTE Blade, Froyo.
    Please address this quite serious issue.

    ReplyDelete
  15. I use this fantastic app with fbreader... thank you.
    ¿Is there a way to export the history to a txt file, with: original=translation?

    ReplyDelete
  16. I use WordNet english dictionary, and usually I see two little speakers images (american and british), that i assume that is for listening the sound of the word, but when i push over them, it shows an error alert.
    What do I need to do for this works properly and hear the sound?
    (offline option preferably)

    ReplyDelete
  17. (for the previous comment about sound, I use android 2.2 froyo)

    ReplyDelete
  18. Hello, Great app. Any plans to add moving to SD card?
    Also could you kindly give more info on the password lock such as how is the data locked/encrypted or??

    Thanks,

    Michael...

    ReplyDelete
  19. Is there a website where I can access the notes I have synced using the online sync via google utility? The ColorNote app says I have synced data online when I press the right button - but where does it go to?!

    ReplyDelete
  20. This is one of the well defined post.Your blog is creating a good blog posting Environment.
    Android app developers

    ReplyDelete
  21. Hi, ive noted some infos using the app but i formated the cel phone and installed a new ROM. Now i have the ROM backup and id like to find the notes with the infos, where can i find it in the cel? Is it in the sd card?

    ReplyDelete
  22. Dear ColorDict and 3rd developers,

    we are trying to get the result from a query by means of the code above (the part with "colordict.intent.action.PICK_RESULT"). However, we have not been able to get the result in the onActivityResult function. Instead, the variable data is always set to null, so if we try to invoke method getStringExtra(Intent.EXTRA_SUBJECT), we get an exception.

    Should we use a different code?
    Thank you.

    ReplyDelete
  23. great work has done thanks for sharing and keep it up Online GED Courses

    ReplyDelete
  24. Hi admin
    I read your blog.much informative. I dont know how i get this,also dont know about the coding. If you have some more then you must have to share here funny videos when you have spare time then you must have to click here,and get amazing images clips relate to the fun. Thanks for it.

    ReplyDelete
  25. this is a site to good here site :
    Wordpress SMS Marketing
    all any plugins here site so in this site ,,,

    ReplyDelete
  26. For ones who are searching for team of developers to design an mobile app for business project the good option will be http://www.nixsolutions.com/services/custom-software-development/mobile-development-services/. They provides high-quality services and cares a lot about their customers.

    ReplyDelete
  27. This is also a very good post which I really enjoy reading. It is not everyday that I have the possibility to see something like this.

    ReplyDelete
  28. It may seem like an easy decision however having a careful comprehension of your application improvement prerequisites can unquestionably help you in sifting the versatile application advancement organizations. Custom Software Development Company

    ReplyDelete
  29. Customary bank advances require a settled arrangement of installments consistently, regardless of whether the business has made a deal or not. Visit here Cash Advances Chicago

    ReplyDelete
  30. Merely a smiling visitant here to share the love (:, btw outstanding style. jobs for blockchain engineers

    ReplyDelete
  31. The reason people look out for an app developer is that app development process involves a complex coding framework which cannot be executed by someone who doesn't have any knowledge of programming.https://www.dbdesigner.net

    ReplyDelete
  32. Obviously the mobile telephone has a wide assortment of employments, with banking being far down on the rundown. It has been noticed that notwithstanding making telephone calls is far less basic on Smartphones than checking the time, perusing the web and messing around.소액결제현금화

    ReplyDelete
  33. That's a such nice annd helpful website for the developer i am also can do work in this website Desirulez i can use your suggestion in this website

    ReplyDelete
  34. I’m definitely going to look into your other post. Really very useful tips are provided here. Thank you so much and please keep up the good job. 온라인카지노

    ReplyDelete
  35. Thank you for your kindness by providing valuable information to us. It really helped me to enhance my knowledge and skills. 온라인바둑이

    ReplyDelete
  36. I would like to thank you for the efforts you have made in writing this post.
    카지노사이트

    ReplyDelete
  37. Hello! The bounding box annotation service is a useful and important thing, but like everything else it needs fine work to work properly. How to find a true bounding box annotation specialist? Contact our outsourcing company and we will help you solve this issue quickly and efficiently!

    ReplyDelete
  38. Practically any Magento designer for employ has significant experience working with Online business stages in different ventures. This information can essentially assist with fostering your business no matter what the specialty in which you work.

    Such software engineers additionally have the fundamental range of abilities in Magento improvement and, subsequently, can carry out any singular arrangements and cutting edge innovations for your site>> affordable magento developer

    ReplyDelete
  39. Hello! Model BOT it staffing via build operate transfer bot as well as the latest technology that allows you to automate routine processes and increase business efficiency. Our outsourcing company is ready to help you implement this model in your projects. Contact us to find out more!

    ReplyDelete
  40. By hiring remote Angular developers, businesses can access a wider pool of talent and stay ahead of the curve. Remote developers offer cost-effectiveness, flexibility, and can work around the clock to meet project deadlines. They can also bring fresh perspectives and ideas to projects, which can lead to more innovative solutions. Check custom angularjs development services

    ReplyDelete
  41. Hello! The requirements for an ERP developer are always high and it is important to consider every detail when hiring a developer. We will help you find the best specialist who meets all standards. Contact us to find the best developer Hire Microsoft Dynamics Developers.

    ReplyDelete
  42. Thank you for your kindness by providing valuable information to us. It really helped me to enhance my knowledge and skillsNew York State Retirement Divorce

    ReplyDelete
  43. For Plastic surgery credit card processing is essential to streamline financial transactions. Dedicated merchant services tailored to the healthcare industry ensure secure and compliant payment processing. These services integrate seamlessly with electronic health records (EHR) systems, offering a holistic solution for managing patient payments. Features like online payment portals and recurring billing enhance patient convenience, while robust security measures protect sensitive financial information.

    Additionally, transparent fee structures and competitive rates contribute to a positive financial experience for both the practice and its clientele. Choosing a reliable credit card processing solution tailored to the unique needs of plastic surgery practices is crucial for fostering trust and financial efficiency.

    ReplyDelete