android-boot | #Model View Controller | android / dagger2 rxjava retrofit / MVP

 by   tonyboxes Java Updated: 3 years ago - Current License: No License

Download this library from

Build Applications

kandi X-RAY | android-boot REVIEW AND RATINGS

android / dagger2 + rxjava + retrofit / MVP

kandi-support
Support

  • android-boot has a low active ecosystem.
  • It has 29 star(s) with 15 fork(s).
  • It had no major release in the last 12 months.
  • It has a neutral sentiment in the developer community.

quality kandi
Quality

  • android-boot has 0 bugs and 0 code smells.

security
Security

  • android-boot has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • android-boot code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.

license
License

  • android-boot does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.

build
Reuse

  • android-boot releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • android-boot saves you 558 person hours of effort in developing the same functionality from scratch.
  • It has 1304 lines of code, 128 functions and 65 files with 0 % test coverage
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA

Coming Soon for all Libraries!

Currently covering the most popular Java, JavaScript and Python libraries. See a SAMPLE HERE.
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.

android-boot Key Features

android / dagger2 + rxjava + retrofit / MVP

android-boot examples and code snippets

  • AndBoot
  • Dependencies
  • Tools (guava)
  • Where is AOSP surfaceflinger initiated?
  • I got an error message about python version error when installing appium using 'npm install -g appium@1.8.1'
  • Both Chrome & emulator is closing automatically when I run my protractor script which I wrote for mobile Site(Angular)
  • Launching (whatsapp) mobile application via Appium causes an "'com.whatsapp.Main' never started" error
  • How to use AndroidBootstrap without extends Application
  • Smart cast to BootsrapButton is imposible because endtrip is mutable property that have changed by this time

AndBoot

dagger2 + rxjava + retrofit / MVP

Dependencies

dependencies.gradle

// build.gradle
Map<String, String> dependency = rootProject.ext.dependencies;

compile dependency.v4
compile dependency.v7
compile dependency.gson
compile dependency.guava
compile dependency.logger
compile dependency.junit

Tools (guava)

Strings
    emptyToNull(String)
    nullToEmpty(String)
    isNullOrEmpty(String)
    ...
    
Lists
    newArrayList()
    newLinkedList()
    newCopyOnWriteArrayList()
    ...
    
Sets
    newHashSet()
    newTreeSet()
    newLinkedHashSet()
    newIdentityHashSet()
    newCopyOnWriteArraySet()
    ...
    
Maps
    newHashMap()
    newLinkedHashMap()
    newConcurrentHashSet()
    newCopyOnWriteArraySet()
    ...
     
Queues
    newArrayDeque()
    newPriorityQueue()
    newSynchronousQueue()
    newLinkedBlockingDeque()
    newConcurrentLinkedQueue()
    newPriorityBlockingQueue()
    ...

Caches
    Cache<Object, Object> caches = CacheBuilder.newBuilder()
        .maximumSize(1000)
        .expireAfterWrite(10, TimeUnit.MINUTES)
        .removalListener(listener)
        .build();
        
Files
    copy(File from, File to)
    write(byte[] from, File to)
    newWriter(File file, Charset charset)
    newReader(File file, Charset charset)
    toByteArray(File file)
    toString(File file, Charset charset)

Where is AOSP surfaceflinger initiated?

cc_binary {
    name: "surfaceflinger",
    defaults: ["libsurfaceflinger_binary"],
    init_rc: ["surfaceflinger.rc"],
    srcs: [":surfaceflinger_binary_sources"],
    shared_libs: [
        "libsurfaceflinger",
        "libSurfaceFlingerProp",
    ],
}

I got an error message about python version error when installing appium using 'npm install -g appium@1.8.1'

npm config set python python2.7

Both Chrome & emulator is closing automatically when I run my protractor script which I wrote for mobile Site(Angular)

'deviceName' : '192.168.56.101:5555'
'platformVersion' : '6'
-----------------------
'deviceName' : '192.168.56.101:5555'
'platformVersion' : '6'

Launching (whatsapp) mobile application via Appium causes an "'com.whatsapp.Main' never started" error

File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());
capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}
com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock
adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock
-----------------------
File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());
capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}
com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock
adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock
-----------------------
File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());
capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}
com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock
adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock
-----------------------
File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());
capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}
com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock
adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock
-----------------------
File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());
capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}
com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock
adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock
-----------------------
File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());
capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}
com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock
adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock

How to use AndroidBootstrap without extends Application

protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
         TypefaceProvider.registerDefaultIconSets();

}

Smart cast to BootsrapButton is imposible because endtrip is mutable property that have changed by this time

import com.beardedhen.androidbootstrap.BootstrapButton
class EndTrip : AppCompatActivity(){

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_end_trip)
 var endtrip: BootstrapButton = findViewById(R.id.endtrip) as BootstrapButton
endtrip.setOnClickListener(View.OnClickListener {
//Some code here
}
}
}
-----------------------
val endtrip: BootstrapButton ?=  null
var endtrip: BootstrapButton ?= null
val immutableEndtrip = endtrip // you can definitely use a different variable name

if(immutableEndtrip !=null)
{
endtrip = findViewById(R.id.endtrip) as BootstrapButton
}
-----------------------
val endtrip: BootstrapButton ?=  null
var endtrip: BootstrapButton ?= null
val immutableEndtrip = endtrip // you can definitely use a different variable name

if(immutableEndtrip !=null)
{
endtrip = findViewById(R.id.endtrip) as BootstrapButton
}
-----------------------
endtrip?.setOnClickListener(View.OnClickListener {
    //Some code here
}

COMMUNITY DISCUSSIONS

Top Trending Discussions on android-boot
  • Where is AOSP surfaceflinger initiated?
  • I got an error message about python version error when installing appium using 'npm install -g appium@1.8.1'
  • Both Chrome & emulator is closing automatically when I run my protractor script which I wrote for mobile Site(Angular)
  • How chat apps (e. g. Messenger) listen to incoming messages even if their activity haven't been started yet
  • How to get my automated code to connect with Appium
  • Launching (whatsapp) mobile application via Appium causes an "'com.whatsapp.Main' never started" error
  • How to use AndroidBootstrap without extends Application
  • Smart cast to BootsrapButton is imposible because endtrip is mutable property that have changed by this time
  • top white line and css reset not working
Top Trending Discussions on android-boot

QUESTION

Where is AOSP surfaceflinger initiated?

Asked 2021-Jan-20 at 08:25

SurfaceFlinger is essential in Android graphics rendering. I ve researched and found some code about surfaceflinger. This is its main: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/main_surfaceflinger.cpp

I couldnt find anything related to starting surfaceflinger on init.rc: https://android.googlesource.com/platform/system/core/+/refs/tags/android-11.0.0_r28/rootdir/init.rc

I ve found here: https://proandroiddev.com/how-android-boot-up-9864376d911c that surfaceflinger is started by SystemServer. So I found SystemServer source code here: https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-11.0.0_r28/services/java/com/android/server/SystemServer.java but I saw no mention of SurfaceFlinger/surfaceflinger or Surface Flinger

There is a surfaceflinger.rc file in the Surface Flinger directory but I couldn t find any file that includes it: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/surfaceflinger.rc

Where is the surfaceflinger service started in Android?

ANSWER

Answered 2021-Jan-20 at 08:25

There is a surfaceflinger.rc file in the Surface Flinger directory but I couldn t find any file that includes it: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/surfaceflinger.rc

It is here: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/Android.bp#253 init_rc:["surfaceflinger.rc"]:

cc_binary {
    name: "surfaceflinger",
    defaults: ["libsurfaceflinger_binary"],
    init_rc: ["surfaceflinger.rc"],
    srcs: [":surfaceflinger_binary_sources"],
    shared_libs: [
        "libsurfaceflinger",
        "libSurfaceFlingerProp",
    ],
}

Source https://stackoverflow.com/questions/65799681

QUESTION

I got an error message about python version error when installing appium using 'npm install -g appium@1.8.1'

Asked 2019-Apr-03 at 12:01

I tried to install appium using 'npm install -g appium@1.8.1' command. But this error appear.

https://www.screencast.com/t/iAJUYj59n4

Note: I have python 3.7 installed.

How do I install this particular version of appium correctly? I'm using this for katalon.

C:\Users\heri.susilo>npm install -g appium@1.8.1
npm WARN deprecated appium-android-bootstrap@2.11.0: Moved to appium-android-driver
npm WARN deprecated appium-android-ime@2.0.0: Moved to io.appium.settings
npm WARN deprecated appium-uiautomator@1.2.0: Moved to appium-android-bootstrap
npm WARN deprecated appium-unlock@2.0.0: Moved to io.appium.settings
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
C:\Users\heri.susilo\AppData\Roaming\npm\appium -> C:\Users\heri.susilo\AppData\Roaming\npm\node_modules\appium\build\lib\main.js

> heapdump@0.3.9 install C:\Users\heri.susilo\AppData\Roaming\npm\node_modules\appium\node_modules\heapdump
> node-gyp rebuild


C:\Users\heri.susilo\AppData\Roaming\npm\node_modules\appium\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\heri.susilo\AppData\Local\Programs\Python\Python37\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\heri.susilo\AppData\Roaming\npm\node_modules\appium\node_modules\heapdump
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\appium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 (node_modules\appium\node_modules\heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ appium@1.8.1
updated 1 package in 53.815s

ANSWER

Answered 2019-Apr-03 at 12:01

This is caused by wrong version of python in npm. Change it to python2 would solve the problem.

npm config set python python2.7

Source https://stackoverflow.com/questions/54799131

QUESTION

Both Chrome & emulator is closing automatically when I run my protractor script which I wrote for mobile Site(Angular)

Asked 2018-Oct-04 at 12:46

I started mobile site automation with protractor and appium, so when I run my script, then chrome & emulator are closing automatically, while passing URL [browser.get("https://www.purplle.com")] to the chrome then its happening. Please help me out this.

Conf.js :

exports.config = { 
  seleniumAddress: 'http://localhost:4723/wd/hub',
  capabilities: {
    'browserName': 'chrome',
    'appium-version' : '1.8.1',
    'platformName' : 'Android',
    'platformVersion' : '6',
    'deviceName' : '192.168.56.101:5555',
     waitforTimeout: 30000,
     commandTimeout: 30000
},

baseUrl: 'http://localhost:8000',


specs: ['First.js'],

 framework: 'jasmine',
  jasmineNodeOpts: {
defaultTimeoutInterval: 30000,
  }

};

First.js :

describe('angularjs homepage', function() {


 it('should greet the named user', function() {
browser.ignoreSynchronization = true;
browser.get('https://www.purplle.com');
Thread.sleep(2000);
  });
});

npm: 3.10.10
node: 6.14.2
protractor: 5.4.1
appium: 1.8.1

This is the screenshot of adb devices

appium logs:

[Appium] Appium support for versions of node < 8 has been deprecated and will be removed in a future version. Please upgrade!
[Appium] Welcome to Appium v1.8.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"browserName":"chrome","appium-version":"1.8.1","platformName":"Android","platformVersion":"6.0","deviceName":"192.168.56.101:5555","waitforTimeout":30000,"commandTimeout":30000,"count":1}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"chrome","appium-version":"1.8.1","platformName":"Android","platformVersion":"6.0","deviceName":"192.168.56.101:5555","waitforTimeout":30000,"commandTimeout":30000,"count":1},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1538656361017 (18:02:41 GMT+0530 (IST))
[Appium] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
[Appium] Creating new AndroidDriver (v2.7.0) session
[Appium] Capabilities:
[Appium]   browserName: chrome
[Appium]   appium-version: 1.8.1
[Appium]   platformName: Android
[Appium]   platformVersion: 6.0
[Appium]   deviceName: 192.168.56.101:5555
[Appium]   waitforTimeout: 30000
[Appium]   commandTimeout: 30000
[Appium]   count: 1
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"browserName":"chrome","ap...
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version, waitforTimeout, commandTimeout, count.
[BaseDriver] Session created with session id: 3fda2699-ba75-4025-ae77-5f5d974e8052
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_181
[AndroidDriver] We're going to run a Chrome-based session
[AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
[ADB] Checking whether adb is present
[ADB] Found 4 'build-tools' folders under '/home/jagadeesh/android-sdk-linux' (newest first):
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/28.0.0
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/27.0.3
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/26.0.0
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/23.0.1
[ADB] Using adb from /home/jagadeesh/android-sdk-linux/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Looking for a device with Android '6.0'
[debug] [ADB] Setting device id to 192.168.56.101:5555
[ADB] Getting device platform version
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 6.0
[AndroidDriver] Using device: 192.168.56.101:5555
[debug] [ADB] Setting device id to 192.168.56.101:5555
[AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
[debug] [AndroidDriver] Checking whether package is present on the device
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages com.android.chrome'
[AndroidDriver] Starting Android session
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 wait-for-device'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages io.appium.settings'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys package io.appium.settings'
[ADB] Checking whether aapt is present
[ADB] Using aapt from /home/jagadeesh/android-sdk-linux/build-tools/28.0.0/aapt
[debug] [ADB] The installed 'io.appium.settings' package does not require upgrade ('2.3.0' >= '2.3.0')
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell ps'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 23
[debug] [ADB] Device API level: 23
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] Device API level: 23
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell appops set io.appium.settings android\:mock_location allow'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'null' and country: 'null'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages io.appium.unlock'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.unlock'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys package io.appium.unlock'
[debug] [ADB] The installed 'io.appium.unlock' package does not require upgrade ('2.0.0' >= '2.0.0')
[ADB] Getting device platform version
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 6.0
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell wm size'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.product.model'
[debug] [ADB] Current device property 'ro.product.model': Google
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.product.manufacturer'
[debug] [ADB] Current device property 'ro.product.manufacturer': Genymotion
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [AndroidDriver] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for com.android.chrome
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages com.android.chrome'
[debug] [ADB] App is installed
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell am force-stop com.android.chrome'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm clear com.android.chrome'
[debug] [AndroidDriver] Performed fast reset on the installed 'com.android.chrome' application (stop and clear)
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 forward tcp\:4724 tcp\:4724'
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 push /usr/lib/node_modules/appium/node_modules/appium-android-bootstrap/bootstrap/bin/AppiumBootstrap.jar /data/local/tmp/'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell ps'
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","192.168.56.101:5555","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.android.chrome","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[debug] [UiAutomator] Moving to state 'online'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys window'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[AndroidDriver] Starting a chrome-based browser session
[debug] [AndroidDriver] A port was not given, using random port: 8000
[debug] [Chromedriver] Changed state to 'starting'
[debug] [Chromedriver] The following Chromedriver executables were found:
[debug] [Chromedriver]     /usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 (minimum Chrome version '65.0.3325')
[debug] [ADB] Getting package info for 'com.android.chrome'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys package com.android.chrome'
[debug] [Chromedriver] Found Chrome bundle 'com.android.chrome' version '69.0.3497'
[debug] [Chromedriver] Found 1 Chromedriver executable capable of automating Chrome '69.0.3497'.
[debug] [Chromedriver] Choosing the most recent, '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64'.
[debug] [Chromedriver] If a specific version is required, specify it with the `chromedriverExecutable`desired capability.
[Chromedriver] Set chromedriver binary as: /usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64
[debug] [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64.*--port=8000"
[Chromedriver] No old chromedrivers seemed to exist
[debug] [Chromedriver] Cleaning any old adb forwarded port socket connections
[debug] [ADB] List forwarding ports
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 forward --list'
[Chromedriver] Spawning chromedriver with: /usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
[debug] [Chromedriver] Chromedriver version: '2.38.552522'
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Linux\",\"version\":\"4.15.0-34-generic\"}}}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"5fe56d93525866425feed6dff4f0e8a0","status":100,"value":{"message":"chrome not reachable\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An error occurred (Original error: chrome not reachable
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"593b4f1c71de1e1a2ea525266575ea20","status":13,"value":{"message":"unknown error: com.android.chrome is not installed on device 192.168.56.101:5555\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"2051889893a66c52130ae6bc4afb303e","status":13,"value":{"message":"unknown error: com.android.chrome is not installed on device 192.168.56.101:5555\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"b8e7948c8df0faea272842f18e8ef562","status":13,"value":{"message":"unknown error: com.android.chrome is not installed on device 192.168.56.101:5555\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver] Changed state to 'stopped'
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [AndroidDriver] Shutting down Android driver
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell input keyevent 3'
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 66.336
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell ps'
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell am force-stop io.appium.unlock'
[debug] [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1538656434268 (18:03:54 GMT+0530 (IST))
[MJSONWP] Encountered internal error running command: Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[MJSONWP]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[MJSONWP]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[MJSONWP]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[MJSONWP]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 73263 ms - 467
[HTTP] 

Below logs is when i run the "protractor conf.js":

protractor conf.js 
[18:02:40] I/launcher - Running 1 instances of WebDriver
[18:02:40] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[18:03:54] E/launcher - An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[18:03:54] E/launcher - WebDriverError: An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
    at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
    at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
    at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
    at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
    at Hosted.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
    at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[18:03:54] E/launcher - Process exited with error code 199

ANSWER

Answered 2018-Oct-04 at 12:16

Double check following capabilities,

'deviceName' : '192.168.56.101:5555'

An ip cannot be a device name run following command to get device name adb devices. An ip can be a device name if you are running real device on wifi. Since you have written emulator so this cannot be case. The deviceName can be like emulator-5554

'platformVersion' : '6'

Device platform version should be exact version for which emulator is created e.g. 6.0.1

For more information please share server logs there might be issue like chrome browser version in emulator is not compatible with chromedriver.exe you are using through protractor. etc

Source https://stackoverflow.com/questions/52645429

QUESTION

How chat apps (e. g. Messenger) listen to incoming messages even if their activity haven't been started yet

Asked 2018-Jul-29 at 14:02

How chat apps (e. g. Messenger) listen to incoming messages even if their activity haven't been started yet since in android 3.1 and later this is not possible:

Manifest:

<service android:name=".ManagerService" android:enabled="true" />
<receiver
    android:name=".BootFinishedReceiver"
    android:directBootAware="true"
    android:enabled="true"
    android:exported="false"
    android:permission="android.permission.RECEIVE_BOOT_COMPLETED">

    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>

Receiver:

 public class BootFinishedReceiver extends BroadcastReceiver {
       @Override
       public void onReceive(Context context, Intent intent) {
            Intent serviceIntent = new Intent(context, ManagerService.class);
            context.startService(serviceIntent);
       }
   }

There have to be some way around as chat apps are still working this way.

Thanks for any informations or ideas

ANSWER

Answered 2018-Jul-27 at 10:04

Your question is quite open-ended and broad. But to the link that you have pointed about the broadcast receiver when the app is not running. There is a comment on the same answer that says:

Applications are in a stopped state when they are first installed but are not yet launched and when they are manually stopped by the user (in Manage Applications). That means, the user should launch the app at least once after installation to activate the application, then the app can receive all implicit broadcast from OS as normal.

The app is stopped when it is just installed. As soon as you launch the app for the first time, The application can listen to broadcast receivers and can run background services even when the app is closed.

The chat applications basically implement socket.io that keeps up the communication on both ends. Furthermore, you may implement FCM to get notifications and messages even when the app is killed.

I hope you, understand the concept :).

Source https://stackoverflow.com/questions/51555117

QUESTION

How to get my automated code to connect with Appium

Asked 2018-Mar-23 at 16:40

I am using a Linux/Ubuntu and trying to create an automated test case that logs the user in and logs out. However I just got my environment set up, and I know Appium doesn't have a GUI, and must be ran through the terminal. But my question is how do I know that my capabilities in my code connected with Appium, and is running my code? I created a "wait", because I need to pick up a button upon opening the app. I have included my current versions I'm using on the computer, my code to my automated test, and the terminal log. If you can resolve this I would really appreciate it.

Current Versions in use:
Ubuntu LTS 16.04
Selenium Standalone 3.11.0
Java_Client 2.2.0
IntelliJIdea: IntelliJ IDEA 2017.3.5 (Community Edition)
              Build #IC-173.4674.33, built on March 5, 2018
              JRE: 1.8.0_152-release-1024-b15 amd64
              JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
              Linux 4.8.0-56-generic

Code:
import io.appium.java_client.MobileElement;
import io.appium.java_client.TouchAction;
import io.appium.java_client.android.AndroidDriver;
import org.junit.Before;
import org.junit.Test;
import org.junit.After;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.CapabilityType;  
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Wait;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.lang.Object;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

public class TestSonic {

String begin = 
"com.myapk.myapk.debug:id/onboarding_inner_orbit";


AndroidDriver driver;

@Before
public void setup() throws MalformedURLException {

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("deviceName", "Android Emulator");
    File file = new File("/home/sonic/Documents/Automation", "Myapk.apk");
    capabilities.setCapability("app", "/home/sonic/Documents/Automation/Myapk.apk");
    driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    capabilities.setCapability("clearSystemFiles", "True");

}

@Test
public void LogIn() {
    Wait wait = new WebDriverWait(driver, 10);
    wait.until(ExpectedConditions.elementToBeClickable(By.id(begin)));

    driver.findElement(By.id(begin)).click();
    //WebElement starting = driver.findElementByAndroidUIAutomator(String.valueOf(By.id(begin)));
    //starting.click();

}

@After
public void teardown() {
    driver.quit();
}

}


   Appium Terminal:



[Appium] Welcome to Appium v1.7.2 (REV 7ad6d98cedde01809e32d56ab8ced064f6f28175)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/home/sonic/Documents/Automation/Sonic.apk","deviceName":"Android Emulator","platformName":"Android"},"capabilities":{"desiredCapabilities":{"app":"/home/sonic/Documents/Automation/Sonic.apk","deviceName":"Android Emulator","platformName":"Android"},"firstMatch":[{"platformName":"android"}]}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/home/sonic/Documents/Automation/Sonic.apk","deviceName":"Android Emulator","platformName":"Android"},null,{"desiredCapabilities":{"app":"/home/sonic/Documents/Automation/Sonic.apk","deviceName":"Android Emulator","platformName":"Android"},"firstMatch":[{"platformName":"android"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1521754646829 (16:37:26 GMT-0500 (CDT))
[Appium] Merged W3C capabilities {"desiredCapabilities":{"app":"/home/sonic/Docu... into desiredCapabilities object {"app":"/home/sonic/Documents/Automation/Sonic....
[Appium] Creating new AndroidDriver (v1.37.0) session
[Appium] Capabilities:
[Appium]   app: /home/sonic/Documents/Automation/Sonic.apk
[Appium]   deviceName: Android Emulator
[Appium]   platformName: android
[BaseDriver] Session created with session id: fe9c1ce5-c2b1-41ec-bb50-7c47b095b30e
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_161
[ADB] Checking whether adb is present
[ADB] Using adb from /home/sonic/Android/Sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Using local app '/home/sonic/Documents/Automation/Sonic.apk'
[debug] [AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","wait-for-device"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","echo","ping"]
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'null' and country: 'null'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","io.appium.settings"]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.settings"]
[ADB] Checking whether aapt is present
[ADB] Using aapt from /home/sonic/Android/Sdk/build-tools/27.0.3/aapt
[debug] [ADB] The installed 'io.appium.settings' package does not require upgrade (5 >= 5)
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.sdk"]
[debug] [ADB] Current device property 'ro.build.version.sdk': 27
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.settings"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","dump","io.appium.settings"]
[debug] [ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","io.appium.unlock"]
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.unlock
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.unlock"]
[ADB] Checking whether aapt is present
[debug] [ADB] The installed 'io.appium.unlock' package does not require upgrade (2 >= 2)
[ADB] Getting device platform version
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.release"]
[debug] [ADB] Current device property 'ro.build.version.release': 8.1.0
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","wm","size"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.model"]
[debug] [ADB] Current device property 'ro.product.model': Android SDK built for x86
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.manufacturer"]
[debug] [ADB] Current device property 'ro.product.manufacturer': Google
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Checking whether aapt is present
[ADB] Extracting package and launch activity from manifest
[debug] [ADB] badging package: com.sonic.sonicdrivein.debug
[debug] [ADB] badging act: com.sonic.sonicdrivein.ui.screen.splash.SplashActivity
[debug] [AndroidDriver] Parsed package and activity are: com.sonic.sonicdrivein.debug/com.sonic.sonicdrivein.ui.screen.splash.SplashActivity
[AndroidDriver] Remote apk path is /data/local/tmp/25a696eb8f803cd943564cda2e9d929a.apk
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ls","/data/local/tmp/25a696eb8f803cd943564cda2e9d929a.apk"]
[debug] [AndroidDriver] Checking if app is installed
[debug] [ADB] Getting install status for com.sonic.sonicdrivein.debug
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","com.sonic.sonicdrivein.debug"]
[debug] [ADB] App is installed
[AndroidDriver] Apk is already on remote and installed, resetting
[debug] [AndroidDriver] Running fast reset (stop and clear)
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","am","force-stop","com.sonic.sonicdrivein.debug"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","clear","com.sonic.sonicdrivein.debug"]
[debug] [AndroidDriver] Extracting strings from apk /home/sonic/Documents/Automation/Sonic.apk null /tmp/com.sonic.sonicdrivein.debug
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","persist.sys.locale"]
[debug] [ADB] Current device property 'persist.sys.locale': 
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.locale"]
[debug] [ADB] Current device property 'ro.product.locale': en-US
[debug] [ADB] No strings.xml for language 'en', getting default strings.xml
[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","push","/tmp/com.sonic.sonicdrivein.debug/strings.json","/data/local/tmp"]
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","forward","tcp:4724","tcp:4724"]
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","push","/home/sonic/.nvm/versions/node/v9.7.1/lib/node_modules/appium/node_modules/appium-android-bootstrap/bootstrap/bin/AppiumBootstrap.jar","/data/local/tmp/"]
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.sonic.sonicdrivein.debug","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[debug] [UiAutomator] Moving to state 'online'
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Getting connected devices...
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-n","com.sonic.sonicdrivein.debug/com.sonic.sonicdrivein.ui.screen.splash.SplashActivity","-S","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'com.sonic.sonicdrivein.debug' and activity: 'com.sonic.sonicdrivein.ui.screen.splash.SplashActivity' to be focused
[debug] [ADB] Possible activities, to be checked: 'com.sonic.sonicdrivein.ui.screen.splash.SplashActivity'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/sonic/Android/Sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","window","windows"]
[debug] [ADB] Found package: 'com.sonic.sonicdrivein.debug' and fully qualified activity name : 'com.sonic.sonicdrivein.ui.screen.splash.SplashActivity'
[Appium] New AndroidDriver session created successfully, session fe9c1ce5-c2b1-41ec-bb50-7c47b095b30e added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1521754654676 (16:37:34 GMT-0500 (CDT))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/home/sonic/Documents/Automation/Sonic.apk","deviceName":"Android Emulator","platformName":"android"},"app":"/home/sonic/Documents/Automation/Sonic.apk","deviceName":"emulator-5554","platformName":"android","deviceUDID":"emulator-5554","platformVersion":"8.1.0","deviceScreenSize":"1080x1920","deviceModel":"Android SDK built for x86","deviceManufacturer":"Google","appPackage":"com.myapk.myapk.debug","appWaitPackage":"com.myapk.myapk.debug","appActivity":"com.myapk.myapk.ui.screen.splash.SplashActivity","appWaitActivity":"com.myapk.myapk.ui.screen.splash.SplashActivity"}
[HTTP] <-- POST /wd/hub/session 200 7857 ms - 888 

ANSWER

Answered 2018-Mar-23 at 16:40

Add a Thread.sleep(60000); after the click. If clicking the element had the same effect through code as it does when manually interacting with the app, then Appium is connected and working.

If the click doesn't work, there could be many possible reasons why. Try clicking a different element and seeing if that has the desired result.

Source https://stackoverflow.com/questions/49438982

QUESTION

Launching (whatsapp) mobile application via Appium causes an "'com.whatsapp.Main' never started" error

Asked 2017-Nov-07 at 12:45

Executing the code via Appium server causes the application to start for a few seconds. Then program stops working with error:

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: 'com.whatsapp.Main' never started (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800' System info: host: 'DESKTOP-7P0AKLE', ip: '172.20.167.164', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '9' Driver info: driver.version: RemoteWebDriver at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:367) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158) at app.TestManager.createAppiumWebDriver(TestManager.java:227) at app.TestManager.runTests(TestManager.java:167) at app.TestManager.run(TestManager.java:43) at app.Launcher.main(Launcher.java:11)

I use Appium server v1.7.0

My capabilities:

    DesiredCapabilities capabilities = new DesiredCapabilities();

    capabilities.setCapability("deviceName", "Galaxy S6");
    capabilities.setCapability("platformVersion", "7.0");
    capabilities.setCapability("platformName", "Android");

    java.io.File file = new java.io.File("D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk");
    capabilities.setCapability("app", file.getAbsolutePath());

    //???
    capabilities.setCapability("app-wait-activity", "Main");
    capabilities.setCapability("app-wait-activity", "MainActivity");
    //???

From what I was able to research on my own about the problem: I guess I should somehow wait for the "Main" activity to run. I thought I´m doing that by adding app-wait-activity capability. But with no result... (Also the app starts for a few seconds, so that "Main" activity should be already running - shouldn´t it?)

Here is the log from the Appium server:

Appium log

And complete log here:

> The server is running

> [Appium] Welcome to Appium v1.7.0
[Appium] Non-default server args:
[Appium]   address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk","app-wait-activity":"MainActivity","platformVersion":"7.0","platformName":"Android","deviceName":"Galaxy S6"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk","app-wait-activity":"MainActivity","platformVersion":"7.0","platformName":"Android","deviceName":"Galaxy S6"},"requiredCapabilities":{}},"alwaysMatch":{"app":"D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk","app-wait-activity":"MainActivity","platformVersion":"7.0","platformName":"Android","deviceName":"Galaxy S6"},"firstMatch":[]}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk","app-wait-activity":"MainActivity","platformVersion":"7.0","platformName":"Android","deviceName":"Galaxy S6"},{},{"desiredCapabilities":{"app":"D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk","app-wait-activity":"MainActivity","platformVersion":"7.0","platformName":"Android","deviceName":"Galaxy S6"},"requiredCapabilities":{}}]
[BaseDriver] Event 'newSessionRequested' logged at 1508327732068 (13:55:32 GMT+0200 (Střední Evropa (letní čas)))
[Appium] Creating new AndroidDriver (v1.26.5) session
[Appium] Capabilities:
[Appium]   app: 'D:\\Prac\\JavaWorkspace\\TestAutomationPartners\\apk\\com.whatsapp.apk'
[Appium]   app-wait-activity: 'MainActivity'
[Appium]   platformVersion: '7.0'
[Appium]   platformName: 'Android'
[Appium]   deviceName: 'Galaxy S6'
[BaseDriver] The following capabilities were provided, but are not recognized by appium: app-wait-activity.
[BaseDriver] Session created with session id: 20bb4b00-509c-49dd-8796-e1d8ad0714dc
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 9
[ADB] Checking whether adb is present
[ADB] Using adb.exe from D:\Prac\AndroidSDK\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Looking for a device with Android '7.0'
[ADB] Setting device id to 04157df4f2639124
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.0
[AndroidDriver] Using device: 04157df4f2639124
[ADB] Checking whether adb is present
[ADB] Using adb.exe from D:\Prac\AndroidSDK\platform-tools\adb.exe
[ADB] Setting device id to 04157df4f2639124
[BaseDriver] Using local app 'D:\Prac\JavaWorkspace\TestAutomationPartners\apk\com.whatsapp.apk'
[AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","wait-for-device"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","echo","ping"]
[Logcat] Starting logcat capture
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","pm","list","packages","io.appium.settings"]
[ADB] App is installed
[ADB] Getting package info for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","dumpsys","package","io.appium.settings"]
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from D:\Prac\AndroidSDK\build-tools\25.0.3\aapt.exe
[ADB] The installed "io.appium.settings" package does not require upgrade (4 >= 4)
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","getprop","ro.build.version.sdk"]
[ADB] Current device property 'ro.build.version.sdk': 24
[ADB] Device API level: 24
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","dumpsys","package","io.appium.settings"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","pm","dump","io.appium.settings"]
[ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","ps"]
[ADB] Device API level: 24
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","install","C:\\Users\\Jan\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock\\bin\\unlock_apk-debug.apk"]
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","install","C:\\Users\\Jan\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock\\bin\\unlock_apk-debug.apk"]
[ADB] Application 'C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' already installed. Continuing.
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.0
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","wm","size"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","getprop","ro.product.model"]
[ADB] Current device property 'ro.product.model': SM-G920F
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","getprop","ro.product.manufacturer"]
[ADB] Current device property 'ro.product.manufacturer': samsung
[AndroidDriver] Parsing package and activity from app manifest
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from D:\Prac\AndroidSDK\build-tools\25.0.3\aapt.exe
[ADB] Extracting package and launch activity from manifest
[ADB] badging package: com.whatsapp
[ADB] badging act: com.whatsapp.Main
[AndroidDriver] Parsed package and activity are: com.whatsapp/com.whatsapp.Main
[AndroidDriver] Remote apk path is /data/local/tmp/3ce651a86314b8d232a800345c91a23c.apk
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","ls","/data/local/tmp/3ce651a86314b8d232a800345c91a23c.apk"]
[AndroidDriver] Checking if app is installed
[ADB] Getting install status for com.whatsapp
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","pm","list","packages","com.whatsapp"]
[ADB] App is installed
[AndroidDriver] Apk is already on remote and installed, resetting
[AndroidDriver] Running fast reset (stop and clear)
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","am","force-stop","com.whatsapp"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","pm","clear","com.whatsapp"]
[AndroidDriver] Extracting strings from apk D:\Prac\JavaWorkspace\TestAutomationPartners\apk\com.whatsapp.apk undefined C:\Users\Jan\AppData\Local\Temp\com.whatsapp
[ADB] Extracting strings for language: default
[ADB] Device API level: 24
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","getprop","persist.sys.locale"]
[ADB] Current device property 'persist.sys.locale': cs-CZ
[ADB] Reading strings from converted strings.json
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","push","C:\\Users\\Jan\\AppData\\Local\\Temp\\com.whatsapp\\strings.json","/data/local/tmp"]
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","forward","tcp:4724","tcp:4724"]
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state 'starting'
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","push","C:\\Users\\Jan\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-android-bootstrap\\bootstrap\\bin\\AppiumBootstrap.jar","/data/local/tmp/"]
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","04157df4f2639124","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.whatsapp","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[UiAutomator] Moving to state 'online'
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Getting connected devices...
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 24
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","am","start","-W","-n","com.whatsapp/com.whatsapp.Main","-S"]
[ADB] Waiting up to 20000ms for activity matching pkg: 'com.whatsapp' and activity: 'com.whatsapp.Main' to be focused
[ADB] Possible activities, to be checked: 'com.whatsapp.Main'
[ADB] Getting focused package and activity
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","dumpsys","window","windows"]
[ADB] Found package: 'com.whatsapp' and fully qualified activity name : 'com.whatsapp.registration.EULA'

Now there is

[ADB] Incorrect package and activity. Retrying.
    [ADB] Getting focused package and activity
    [ADB] Getting connected devices...
    [ADB] 1 device(s) connected
    [ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","dumpsys","window","windows"]
    [ADB] Found package: 'com.whatsapp' and fully qualified activity name : 'com.whatsapp.registration.EULA'

a lot of times...

[ADB] Incorrect package and activity. Retrying.
[ADB] Error: Error occured while starting App. Original error: 'com.whatsapp.Main' never started
    at Object.wrappedLogger.errorAndThrow (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
    at ADB.callee$0$0$ (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:101:9)
    at tryCatch (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
 Error: Error occured while starting App. Original error: 'com.whatsapp.Main' never started
    at Object.wrappedLogger.errorAndThrow (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
    at ADB.callee$0$0$ (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:101:9)
    at tryCatch (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[AndroidDriver] Shutting down Android driver
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","am","force-stop","com.whatsapp"]
[ADB] Pressing the HOME button
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","input","keyevent",3]
[AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] Received command result from bootstrap
[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state 'stopping'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[UiAutomator] UiAutomator shut down normally
[UiAutomator] Moving to state 'stopped'
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Moving to state 'stopped'
[Logcat] Stopping logcat capture
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\Prac\AndroidSDK\platform-tools\adb.exe' with args: ["-P",5037,"-s","04157df4f2639124","shell","am","force-stop","io.appium.unlock"]
[AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[MJSONWP] Encountered internal error running command: Error: Error occured while starting App. Original error: 'com.whatsapp.Main' never started
    at Object.wrappedLogger.errorAndThrow (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
    at ADB.callee$0$0$ (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:101:9)
    at tryCatch (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (C:\Users\Jan\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 64685 ms - 220 

ANSWER

Answered 2017-Oct-21 at 12:26

If you are providing the app capability then there is not need to specify the capabilties appPackage and appActivity

Incase you have pre-installed the application in our device then you can start the app with capabilties appPackage and appActivity

File app_apk = new File("/Users/Yash/Desktop/APK/Sample.apk");
capabilities.setCapability("app", file.getAbsolutePath());

There is no need to provide the appPackage & appActivity now

Lets say the app is installed you want to start it

capabilities.setCapability("appPackage", "Your-appPackage-name");
capabilities.setCapability("appActivity", "Your-appActivity-name");

How to get the app appPackage & appActivity?

make sure adb connected > Open the app in your device > Enter

adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"

Sample output for Clock app

mCurrentFocus=Window{ce2e95b u0 com.google.android.deskclock/com.android.deskclock.DeskClock}
mFocusedApp=AppWindowToken{3cac5b0 token=Token{c58d7d6 ActivityRecord{74c3ff1 u0 com.google.android.deskclock/com.android.deskclock.DeskClock t80}}}

From the above output we can find out appPackage and appActivity appPackage/appActivity

com.google.android.deskclock/com.android.deskclock.DeskClock
appPackage = com.google.android.deskclock
appActivity = com.android.deskclock.DeskClock

How can I check my appPackage/appActivity is correct?

Try this

adb shell am start -n appPackage/appActivity
adb shell am start -n com.google.android.deskclock/com.android.deskclock.DeskClock

Should start the Clock app

Man, I think by following any of the above method you will be able to solve your problem. Let me know otherwise.

Source https://stackoverflow.com/questions/46809977

QUESTION

How to use AndroidBootstrap without extends Application

Asked 2017-Sep-16 at 06:01

I am trying to use Android Bootstrap library. I followed Quick Start. In Quick Start, it says I should override my class like this:

public class SampleApplication extends Application {
    @Override public void onCreate() {
        super.onCreate();
        TypefaceProvider.registerDefaultIconSets();
    }
}

How can I use this library without extending Application class? I want to use this library in my Activity classes.

LoginActivity:

public class Login extends AppCompatActivity {
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TypefaceProvider.registerDefaultIconSets();
        setContentView(R.layout.activity_login);
    }
}

activity_login.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.merve.tev.Login">



    <com.beardedhen.androidbootstrap.BootstrapDropDown
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:bootstrapText="Medium {fa_thumbs_o_up}"
        app:bootstrapBrand="regular"
        app:roundedCorners="true"
        app:bootstrapSize="md"
        app:dropdownResource="@array/bootstrap_dropdown_example_data"
        app:bootstrapExpandDirection="down"
        tools:layout_editor_absoluteY="202dp"
        tools:layout_editor_absoluteX="115dp" />
</LinearLayout>

In my MainActivity class, I placed the button. When I click it, I should go LoginActivity class. However, I get an error:

java.lang.RuntimeException: Unable to start activity ComponentInfo: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class com.beardedhen.androidbootstrap.BootstrapDropDown

ANSWER

Answered 2017-Sep-15 at 09:08

In your activity class:

In onCreate() Method, write this line before setContentView();

protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
         TypefaceProvider.registerDefaultIconSets();

}

I hope it will work.

Source https://stackoverflow.com/questions/46234085

QUESTION

Smart cast to BootsrapButton is imposible because endtrip is mutable property that have changed by this time

Asked 2017-Aug-05 at 07:40

I am new to Kotlin. I have an android project which I opted to convert to kotlin. This is my piece of code.

import com.beardedhen.androidbootstrap.BootstrapButton
class EndTrip : AppCompatActivity(){
internal var endtrip: BootstrapButton ?=  null

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_end_trip)
endtrip.setOnClickListener(View.OnClickListener {
//Some code here
}
}
}

But I get this error on the endtrip

Smart cast to BootsrapButton is impossible because endtrip is mutable property that have changed by this time

A similar question has been answered here but i cant figure out the solution. I am using beardedhen Android Bootstrap Library. Thank you.

ANSWER

Answered 2017-Aug-05 at 05:40

val is the static, var is the mutable. kotlin prefers everything static even more so in the place you called it.

Just to clarify a little, Kotlin only really likes for you to use var inside a method, it doesn't like it up in the main. It wants val up there.

val is an immutable variable var is mutable.

Source https://stackoverflow.com/questions/45518564

QUESTION

top white line and css reset not working

Asked 2017-Jun-29 at 15:59

Here I have a typical problem with "a top white line" on a page which I'm constructing and in this situation, a classic css reset is not working.

There is a tiny white line between the black border of the table and the black line from my browser.

enter image description here


Here is the skeleton of the page:

* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
}

body {
  font-family: "Lato", sans-serif;
}

#menu {
  width: 12%;
  height: 100%;
  float: left;
  position: relative;
  background-color: #ff0000;
}

#list {
  top: 140px;
  width: 100%;
  position: absolute;
}

#list a:hover {
  color: #a6a6a6;
}

ul {
  list-style: none;
  background-color: #ff0000;
}

li {
  width: 95%;
  padding: 12px 0px 12px 15px;
}

li a {
  font-size: 25px;
  color: #ffffff;
  display: block;
  white-space: nowrap;
  text-decoration: none;
  transition: 1.0s;
}

#header {
  z-index: 1;
  height: 10%;
  width: 100%;
  position: relative;
  background-color: #0066ff;
}

table {
  width: 100%;
  height: 100%;
  position: absolute;
}

table,
td {
  border: 1px solid black;
}

td {
  color: #ffffff;
  text-align: center;
}

#title {
  font-size: 30px;
  width: 90%;
}

#logout {
  font-size: 20px;
  width: 10%;
}

img {
  float: right;
  width: 50%;
  height: 90%;
  margin: auto;
  opacity: 0.2;
}
<div id="menu">
  <div id="list">
    <ul>
      <li> </li>
      <li> <a href="#">Customers</a> </li>
      <li> <a href="#">Students</a> </li>
      <li> <a href="#">Teachers</a> </li>
      <li> <a href="#">Android</a> </li>
    </ul>
  </div>
</div>

<div id="header">
  <table>
    <tr>
      <td id="title">
        <p> Android Panel </p>
      </td>
      <td id="logout">
        <p> Logout </p>
      </td>
    </tr>
  </table>
</div>

<img src="https://image.freepik.com/free-vector/android-boot-logo_634639.jpg " />

As you can see, I'm applying a css reset, to every element from the page, as some questions on StackOveflow suggests.

I would like to understand, which configuration do I have in this css, which is presenting any resistance for the configuration of the css reset, or maybe, which configuration is missing here.

P.S: I'm using Google Chorme.

ANSWER

Answered 2017-Jun-29 at 15:59

One thing I would suggest doing is taking a look at the calculated box model for your page and the specific elements within it. This could help you locate what is causing what sounds like a 1px margin to me. Since you are using chrome, the dev tool shortcut is ctrl+shift+I.

I took a look at your page in both Firefox and Chrome and there doesn't seem to be a white line. It could possibly be the version of the browser you are using but this is likely not the case.

While looking at your screenshot I noticed the white line you may be talking about. This is just part of chromes browser interface. If you want to see your site without the interface just press f11 on your keyboard when in your browser. This puts you into fullscreen mode.

A custom theme for your browser could also be causing it to appear differently and look like it is a part of your webpage.

Source https://stackoverflow.com/questions/44829482

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

VULNERABILITIES

No vulnerabilities reported

INSTALL android-boot

You can use android-boot like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the android-boot component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

SUPPORT

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

Implement android-boot faster with kandi.

  • Use the support, quality, security, license, reuse scores and reviewed functions to confirm the fit for your project.
  • Use the, Q & A, Installation and Support guides to implement faster.

Discover Millions of Libraries and
Pre-built Use Cases on kandi