android app with it's robotium test code - android

Where can I find an android app code with its robotium test code online?
I'm looking for something really simple that can just display written content when pressing a button or something.

You can download an app and example test project from here:
https://code.google.com/p/robotium/wiki/Getting_Started

Related

How can I open a specific component of my React Native application from an Native Android Activity in Java?

Alert - This question is basically about an approach. So there wont be any working pen or code to share!
I was doing a POC where integrating an RN app into an Android App. I did successfully following this doc. Here is the previews - . onclick of click to got to RN button,RN activity started and page B get loaded. Upto here all good. Now i am wondering where i can introduce a RN component into page A. for example the button on page A can be RN component ? or How can I open a specific component of my React Native application from an Native Android Activity in Java? guess I have to check the ReactActivity in react-native repo to see how the a bundle gets rendered to the root view. The only thing that changes in my case is that I don't want to render to root view.
Here is files Link1 and Link2
This Q is asked in RN gitbub page - Link - and they redirected to SO.
So please share you suggestion or approach
This is really bad idea to combine Native app in Java and React Native app. But it's possible. You can get some code samples from here along with this tutorial

Android App development for image recognition using Caffe

I am working on a project in which the android app user is suppose to take an image as input and at the back end I have caffe's deployment.py file which takes an image as input and gives category (the image belongs to ) as output.
Now How should I connect both or how should I make my server side so that when the android app queries it goes to caffe and caffe gives category name as output which should be shown on android app.
I am novice to android app development.Please suggest if there are any sources I should read from.
can Flask-Restful be helpful?
Have a look at this repository. It's caffe ported to android. They have a sample app as well here. Here is something I worked on a while ago. It might be useful to you.

How to make a WebView android app with mobile friendly website as URL?

As I know i have to use android studio for this.
But i am looking for someone who can tell step by step process to change what all codes to make that app a web view app with a test URL foo.com .
What i did till now :
I open Android Studio
Choose a blank activity
Please let me know further steps that works
Please note that i am not looking to develop this on eclipse as new Android Studio is more preferable for me to work with
You need to make a setContentView(R.layout.your_layout) in your activity's onCreate method. You would then make an xml file in the layout folder containing the WebView. Those are the basics to get you started. You can look here for examples and the documentation. There are also lots of tutorials online.

Robotium Home Button and resuming to app

I'm new to Robotium testing and I want to test the following scenario:
1.) Start the app do something.
2.) Press the Home Button.(Close the app)
3.) Resume the app and test if everything is ok.
My question is how can I achieve steps 2 & 3 ?
You can't do this with robotium, neither with pure Android Instrumentation framework. You should rather take a look on UIAutomator, if you have to test such scenarios.

how do I run Android test project from another android application

I created an Android test project using instrumentation and it works find with eclipse running as Android Junit test. It also generated apk file.
My question is how do I run this test from another android application instead of from eclipse. For example, if the test project is named T and I have another Android application named A. Then I would like to open up T from A.
Thanks in advance..
I think it will be good if you try to call the appropriate intent on a button click or on whatever you want to start the program. For example:
startActivity(new Intent("com.yourprogram.T") I'm not sure but i think it will works.
Why do you need to open Test project from an app on Device. I dont think you can do it because Android does not allow any app to inject action or call functions from other apps.

Categories

Resources