Generally, for our Android SDK, you would want to connect to get feature layers through ArcServer, not PostGRES or Microsoft SQL Server via a database connection. You may want to view this StackOverflow post as it explains different ways to make a direct connection. (Pure Android)
Can i use PostgreSQL or mySQL in android App development - Stack Overflow
If I have misunderstood your question, please let me know.