Problem with integration on Android

Bug reports.
maciejk
Posts: 1
Joined: Thu Jan 29, 2015 2:54 pm

Problem with integration on Android

Post by maciejk » Thu Jan 29, 2015 3:03 pm

Hi Team,

I'm trying to integrare ranorex in my android application. I added Manifest declarations:

<meta-data android:name="RxVersion" android:value="5.0.0" />
<meta-data android:name="RxLibVersion" android:value="1.7.0" />

And
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INJECT_EVENTS" />

Also I created a BaseActivity class witch omResume, onPause and dispatchKeyEvent methods. Each of activity in my app extending this BaseActivity.

When I'm starting my app I get an error:

Code: Select all

01-29 14:48:17.459    3361-3405/pl.XXX I/System.out﹕ ------------------------------------------------------|
01-29 14:48:17.459    3361-3405/pl.XXX I/System.out﹕ E: Service Intent must be explicit: Intent { act=com.ra
01-29 14:48:17.459    3361-3405/pl.XXX I/System.out﹕ norex.services.deviceservice.RanorexIntentService (has
01-29 14:48:17.459    3361-3405/pl.XXX I/System.out﹕ extras) }
01-29 14:48:17.459    3361-3405/pl.XXX I/System.out﹕ ------------------------------------------------------|
Also, when I go to other activity I get this error:

Code: Select all

3361-3361/pl.XXX E/ActivityThread﹕ Activity pl.XXX.activities.MainActivity has leaked IntentReceiver c[email protected]1f785d22 that was originally registered here. Are you missing a call to unregisterReceiver()?
    android.app.IntentReceiverLeaked: Activity pl.XXX.activities.MainActivity has leaked IntentReceiver c[email protected]1f785d22 that was originally registered here. Are you missing a call to unregisterReceiver()?
            at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:898)
            at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:699)
            at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1637)
            at android.app.ContextImpl.registerReceiver(ContextImpl.java:1617)
            at android.app.ContextImpl.registerReceiver(ContextImpl.java:1611)
            at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:488)
            at com.ranorex.proxy.IntentServiceProxy.RequestPort(Unknown Source)
            at com.ranorex.android.RanorexAndroidAutomation.e(Unknown Source)
            at com.ranorex.android.RanorexAndroidAutomation.d(Unknown Source)
            at com.ranorex.android.RanorexAndroidAutomation$AsyncPrepareCommunicationChannelTask.run(Unknown Source)
            at java.lang.Thread.run(Thread.java:818)
Did you have any idea what can be a reason of that?

Best Regards
MaciejK

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problem with integration on Android

Post by Support Team » Fri Jan 30, 2015 3:58 pm

Hi MaciejK,

Unfortunately we are not aware of such an issue.
May i ask you to send your apk file or even better your project to [email protected]?
This will help us to analyze the issue in more detail.

Thank you!

Regards,
Markus (S)
.
Image

kkickstein
Posts: 1
Joined: Mon Nov 02, 2015 10:14 am

Re: Problem with integration on Android

Post by kkickstein » Mon Nov 02, 2015 10:17 am

Hello,

sorry for digging this Problem up, but I just ran into the same one.
Did you manage to solve it?

Heres my log-output:

Code: Select all

11-02 10:13:03.059 1269-1282/com.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:03.059 1269-1282/com.package.myapp I/System.out: E: Receiver not registered: com.ranorex.proxy.IntentSer
11-02 10:13:03.059 1269-1282/com.package.myapp I/System.out: [email protected]
11-02 10:13:03.059 1269-1282/com.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err: java.lang.IllegalArgumentException: Receiver not registered: c[email protected]528386f8
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:667)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1463)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:489)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at com.ranorex.proxy.IntentServiceProxy.RequestPort(Unknown Source)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at com.ranorex.android.RanorexAndroidAutomation.e(Unknown Source)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at com.ranorex.android.RanorexAndroidAutomation.d(Unknown Source)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at com.ranorex.android.RanorexAndroidAutomation$AsyncPrepareCommunicationChannelTask.run(Unknown Source)
11-02 10:13:03.059 1269-1282/com.package.myapp W/System.err:     at java.lang.Thread.run(Thread.java:841)
11-02 10:13:03.059 1269-1282/com.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:03.079 1269-1325/com.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:03.079 1269-1325/com.package.myapp I/System.out: E: Failed to resolve intent.
11-02 10:13:03.079 1269-1325/com.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err: java.lang.NullPointerException
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err:     at com.ranorex.proxy.IntentServiceProxy.TryResolveIntent(Unknown Source)
11-02 10:13:03.079 1269-1325/dcom.package.myapp W/System.err:     at com.ranorex.proxy.IntentServiceProxy.Call(Unknown Source)
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err:     at com.ranorex.proxy.IntentServiceProxy.RequestPort(Unknown Source)
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err:     at com.ranorex.android.RanorexAndroidAutomation.e(Unknown Source)
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err:     at com.ranorex.android.RanorexAndroidAutomation.d(Unknown Source)
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err:     at com.ranorex.android.RanorexAndroidAutomation$AsyncPrepareCommunicationChannelTask.run(Unknown Source)
11-02 10:13:03.079 1269-1325/com.package.myapp W/System.err:     at java.lang.Thread.run(Thread.java:841)
11-02 10:13:03.079 1269-1325/com.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:03.079 1269-1325/com.package.myapp W/ContextImpl: Implicit intents with startService are not safe: Intent { act=com.ranorex.services.deviceservice.RanorexIntentService (has extras) } android.content.ContextWrapper.startService:494 com.ranorex.proxy.IntentServiceProxy.Call:-1 com.ranorex.proxy.IntentServiceProxy.RequestPort:-1 
11-02 10:13:13.083 1269-1325/dcom.package.myapp I/System.out: ------------------------------------------------------|
11-02 10:13:13.083 1269-1325/com.package.myapp I/System.out: E: Failed to aquire port from service. No automation po
11-02 10:13:13.083 1269-1325/com.package.myapp I/System.out: ssible.
11-02 10:13:13.083 1269-1325/com.package.myapp I/System.out: ------------------------------------------------------|

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problem with integration on Android

Post by Support Team » Wed Nov 04, 2015 7:46 am

Hello,

kkickstein contacted us by email.

We were able to solve the issue by an update of Ranorex Studio to the latest version, 5.4.3.
More information about that release can be found in the release notes.

Regards,
Johannes
.
Image