Call another java program when an android app makes a request [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
In my android project, whenever a user asks to see a specific #hashtag, i want to check if any tweet had changed in twitter database about this hashtag and update my database according to that changes. The problem here is, i need to run another java project in my server to get updates from twitter and change my database. But, i don't know how to call another java program when a request made from an android app.
I don't know where to start or which path i should follow. I would be appreciated if anyone show me some way.Thanks..

Hi hello_stackoverflow,
visit this page: https://dev.twitter.com/docs/api and have a look at the twitter webservice api, especially this https://dev.twitter.com/docs/api/1.1/get/search/tweets, this would provide you with the search option the API provides you. With this you can search for a custom query within tweets on twitter.
So you'll not need to call an external java application, just call the RESTful Webserive from twitter and send a query with user input hashtag.
Patrick

Related

how to implement In-app purchase Android [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to implement inapp purchase in my app which is a free app, It will ask to buy, after purchase the new apk replace the old apk.
Thanks
Err, I think you'll need to take a different approach.
According to the Google Play Rules, "An app downloaded from Google Play may not modify, replace or update its own APK binary code using any method other than Google Play's update mechanism." So you cannot change your apk.
But you have some options:
Create a 'pro' version on the Play Store
Have a app wide setting which changes the activity behaviour, or have 2 sets of activities, as you seem to already have made... This can be triggered by an in-app purchase. The docs for that are here: http://developer.android.com/google/play/billing/api.html

What will I need in order to create an Android App that has users connecting with each other? (Registration & Log in) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to build an app that allows users to register and then log in. I understand how to build the visual UI but I don't understand how I can get the code to work. I know I need to have a database that does authentication but how do I implement that with the Android SDK? Do I use MYSQL or some other database? Does anyone know any books that would help? Could someone please guide me? How about logging in with Facebook, how do I implement that? Any help would be greatly appreciated. Thank you!
What you need is an app back-end. Look at this Building app back-end article on registration and login users to your application. Or if you have a web server, you can build your own back-end using MySQL and any language of your choice.

What is the best method to add a chat feature to a website using Java? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am currently a relatively new in the field of programming, and I am helping with a friend of mine on building a social network. It is already live picxter.com. However we are looking on implementing a chat feature for our users and the owner told me I should use a Java applet as it would be best suited for our needs. However is this possible? We are not trying to make a chat site type of chat. We are trying to build a chat like Facebook.
Don't use Java for these sorts of applications! Using Java in your browser is not a very good idea in general. You could try to do it in JavaScript using AJAX (which is syntactically very similar to Java and by far not as slow, doesn't require a runtime environment and isn't as risky [you can argue about that, to be honest] in terms of security).

Can I run java code in html textbox? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
I am writing one web page in which I am putting one html input type="textarea" in which user will write their java code and on submit it will return output of that java code. Can I do this using jsp? if not then what are the other ways.
I would think very carefully before allowing people to do that.
At the very least, to read and run the user's input, you will need a JDK to compile it, and a JVM to run it. Since you're talking about over the web, presumably the user's machine will not have those (otherwise they'd just use theirs), so you'd have to use the ones on your server - that is, take the user's text, upload it as a .java file to your server, compile and run it (for an anonymous user on your server!), and send the result back to the browser session.
As you can see, there are a couple of pretty big, bad security problems here. Not recommended !

How is the Muslim Prayer time is calculated in an android application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am doing my uni project to develop an android application. I have decided to develop an application that tells the user the daily times to pray for Muslims. But as I am new to android(and also programming in general) I don't know how to implement this. I have done some research myself and found that some web services provide JSON or XML files to fetch the data or there supposed to be Java Tools/Libs to use. Is there anyone who has developed or has experience in these topics.
please give some advices.
thank you
The Xhanch API returns the data to you in JSON/XML format.
If you want XML,
http://api.xhanch.com/islamic-get-prayer-time.php?lng=30&lat=30&yy=2013&mm=9&gmt=4
If you want JSON,
http://api.xhanch.com/islamic-get-prayer-time.php?lng=30&lat=30&yy=2013&mm=9&gmt=4&m=json
Check the documentation for the significance of each of the request parameters.
You can make a call to the API using KSOAP 2 library.
This is how the JSON response looks like
{"1":{"fajr":"05:16","sunrise":"06:36","zuhr":"13:00","asr":"16:34","maghrib":"19:23","isha":"20:40"},"2":{"fajr":"05:16","sunrise":"06:37","zuhr":"13:00","asr":"16:34","maghrib":"19:22","isha":"20:39"},"3":{"fajr":"05:17","sunrise":"06:38","zuhr":"13:00","asr":"16:33","maghrib":"19:21","isha":"20:38"},....
}
Once you get the data in JSON format, all you need to do is parse the information and display it in your application.

Categories

Resources