java - How to send information between two Android Aplications -
i made app funcion send arraylist server , recieve.
so far have 2 activities 1 send , in recieve, works fine.
was thinking easy make 2 aplications same función seems not easy. created new aplication exacly same 1 of activities(in working app).but new aplication dosnt resieve nothing.
server @ eclipse @tomcat7. using servlet dopost method . @androidstudio - asyncktask , gson.
can explane me? manny in advance!
you can use content provider , resolver.
the android.content package
the android.content package contains classes accessing , publishing data. android framework enforces robust , secure data sharing model. applications not allowed direct access other application’s internal data. 2 classes in package enforce requirement: contentresolver , contentprovider.
what content resolver?
the content resolver single, global instance in application provides access (and other applications’) content providers. content resolver behaves name implies: accepts requests clients, , resolves these requests directing them content provider distinct authority. this, content resolver stores mapping authorities content providers. design important, allows simple , secure means of accessing other applications’ content providers.
the content resolver includes crud (create, read, update, delete) methods corresponding abstract methods (insert, query, update, delete) in content provider class. content resolver not know implementation of content providers interacting (nor need know); each method passed uri specifies content provider interact with.
what content provider?
whereas content resolver provides abstraction application’s content providers, content providers provide abstraction underlying data source (i.e. sqlite database). provide mechanisms defining data security (i.e. enforcing read/write permissions) , offer standard interface connects data in 1 process code running in process.
content providers provide interface publishing , consuming data, based around simple uri addressing model using content:// schema. enable decouple application layers underlying data layers, making application data-source agnostic abstracting underlying data source.
Comments
Post a Comment