Publicis Sapient
TEKNIKFORCE Interview Questions and Answers
Q1. Is live data is life cycle aware. If it's aware what does ViewModel do?
Yes
LiveData is lifecycle aware and can be used to observe changes in data.
ViewModel provides a way to store and manage UI-related data across configuration changes.
ViewModel can hold LiveData objects to provide data to the UI.
LiveData and ViewModel work together to ensure data consistency and prevent memory leaks.
Q2. How does viewmodel survive when activity is destroyed on configuration?
The ViewModel survives configuration changes by being retained by the system.
ViewModels are designed to survive configuration changes like screen rotations or language changes.
When an activity is destroyed and recreated, the ViewModel is not destroyed and retains its data.
The ViewModel is associated with the activity's lifecycle and is retained until the activity is finished.
The retained ViewModel instance can be accessed by the newly created activity to restore its state.
Q3. how do you achieve data security when saving data persistanly.
Data security can be achieved through encryption, access controls, backups, and regular security audits.
Encrypt sensitive data using strong encryption algorithms.
Implement access controls to restrict unauthorized access to the data.
Regularly backup the data to prevent data loss.
Conduct regular security audits to identify and fix vulnerabilities.
Use secure protocols and communication channels for data transfer.
Implement secure coding practices to prevent common security vulner...read more
Q4. How does SSL pinning works?
SSL pinning is a security technique that ensures a client only communicates with a server using a pre-defined public key.
SSL pinning involves hardcoding the server's public key in the client's code or configuration.
During the SSL handshake, the client checks if the server's public key matches the pinned key.
If the keys match, the connection is established; otherwise, it is rejected.
Pinning prevents man-in-the-middle attacks by verifying the server's identity.
Q5. Where to save encription key?
Encryption keys should be securely stored in a separate key management system.
Encryption keys should not be stored alongside the encrypted data.
Use a dedicated key management system (KMS) to store and manage encryption keys.
Implement strong access controls and authentication mechanisms for the KMS.
Consider using hardware security modules (HSMs) for added security.
Regularly rotate encryption keys to minimize the impact of a potential compromise.
Q6. Advantage of mvp over mvc.
MVP offers better separation of concerns and easier unit testing compared to MVC.
MVP separates the presentation layer from the business logic, making it easier to maintain and modify the codebase.
MVP allows for easier unit testing as the presenter can be tested independently from the view.
MVP provides better decoupling between components, enabling easier code reuse and scalability.
MVP promotes a clear separation of concerns, making the codebase more modular and maintainable.
I...read more
Top Technical Lead Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month