Tag Archives: android

Use Stanford NLP with Android

Steps:
1. Download the whole nlp from the site.
2. Copy stanford-postagger.jar file and paste it in the app>libs folder
3. Right click on it and click add to library.
4. Now write the example code available in the net with class tagText{} and in MainActivity.java
5. import library import import edu.stanford.nlp.tagger.maxent.MaxentTagger;

This video may help.

Update: It is giving errors with android.

php-gcm project for sending sms to any number through google cloud messaging

phpgcm

This is an opensource project by me and final release is version 1.0.1 till now.
Description:
First we have to create index.php for the options that will give the senders number and text box what to send to the sender and then at last the resgistration id from your mobile phone(It will be needed to use your mobile phone as messaging server.It will come from GCM app).

index.php

Now we have to create gcmtest.php it is the core part of our project.Here all the settings available that you can customize easily according to your needs.

gcmtest.php

Now when we run the script from our php backend server then it will show you the page where you will input sender number and message and click submit it will pass through your phone to google cloud messaging server and receiver will recieve a sms from your number.

You can download this whole project from my mirror server: php-gcm.zip

For testing this app you can go to:
http://pest-zakilive.rhcloud.com/phpgcm/
github address for source code: https://github.com/zakilive/phpgcm

References:
I took help from the opensource project to learn how they did the gcm passing:
https://gist.github.com/prime31/5675017#file-gistfile1-php-L16 (In PHP)
https://github.com/anjlab/android-sms-gateway (Android SMS gateway call in Ruby)

If you liked the tutorial or face any problem don’t forget to comment in the comment section.Thanx for reading 🙂

 

XML

XML is a language to describe the data

 

I have practiced here

Just like the example here:

Root element is a must have element…

Element vs Attribute:
The way can be followed

or like this

It’s better to avoid attributes in XML ..It’s better for HTML but in XML it better to use as elements or subchild what you say….It’s not stricted like html that where to use Attribute and where to use as element

Sometimes in XML we have to use attributes for metadata identify the xml

 

XML namespaces: Various method can be followed

Same Table name can conflict in XML:

like this

with this

two are diffent meaning but name is same so it can be conflict

solution is to using prefix before the name:

just like this

So it will never be conflict 🙂

XML Namespcaes – xmlns attribute

it can also write like this:

Default Namespaces:

xmlns=”zakiliveURL”

The XML that is carrying HTML table

The XML that is carrying egg white:

Namespcaes in real life uses: here XSLT used XSLT is stands for XML Transformaion which transform XML documents into other formats like XHTML

 

Android A to Z

Here i am going to describe all the basic to advanced android experience I have learned …I have nfolowed tutorialspoint.com and lynda.com mainly…Sharing is carin..By sharing here it will be clear to mine also 🙂

 

Application Component

Activities -Dictate the UI and handle the user interaction
Services-The background processing associated with application
Boradcast Receivers – They handle communication between android os and applications
Content Providers – The handle data and database management issues

Activiity can implemented as subclass of activity as follows:

public class MainActivity extends Activity{

}

Services can be implemented as follows:
A service is implemented as a subclass of service class as follows:

public class MyService extends Service{

}

Broadcast receiver is implemeted like this:
Broadcast receiver is implemented as Broadcast receiver class and each message is broadcasted as an intent object

public class MyReceiverNew extends BroadcastReceiver{
}

Content Providers requests is handled by the methods of ContentResolver class

public class MyContentProvider extends ContentProvider{

}

There are some additional components
Fragments-behaviour of UI in an activity
Views – UI elements that are drawn onscreen including buttons, lists, forms etc.
Layout – View hierarchies that control screen format and appearance of the views

Intents – Message wiring components together

Resources – External elements, such as strings, constants and drawable pictures.

Manifest – Configuration file for the application

Performed the Hello World named example with Android Studio….By File>New Project

Need to Finish this  Chapter from  -> Android Resource

-Need to complete the basic android chapters to Advanced topics
– then Need to read some tutorials like Android Navigation and SQL Database from tutorialspoint.
– But first of all need to clear all the basics of java OOP

করে করে এগোতে হবে…সেটা না পারলে দেখে দেখে বুঝে নিয়ে এগোতে হবে পরে সময় পেলে আবার করে করে এগোতে হবে কিন্তু বসে থাকা যাবে না কনফিডেন্স গ্রো করতে হলে অনুশীলন বা চর্চার কোনো বিকল্প নাই।