Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android service do not start

$
0
0

Hi, my android service do not want to start:

here is alloy index.js code:

var SECONDS = 30; // every 30 seconds
    var intent = Titanium.Android.createServiceIntent({
      url: 'bg-service1-android.js'
    });
    intent.putExtra('interval', SECONDS * 1000); // Needs to be milliseconds
 
    //if(!Titanium.Android.isServiceRunning(intent))
        Titanium.Android.startService(intent);  
 
$.index.open();
and here is tiapp code:
<android xmlns:android="http://schemas.android.com/apk/res/android">
 
        <manifest package="***************">
            <services>
            <service url="bg-service1-android.js" type="interval"/>
          </services>
            <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/>
            <uses-permission android:name="android.permission.BLUETOOTH"/>
            <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
            <application>
                <service android:enabled="true" android:exported="true"
                    android:isolatedProcess="false"
                    android:label="iBeacon" android:name="com.radiusnetworks.ibeacon.service.IBeaconService"/>
                <service android:enabled="true" android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">
                    <meta-data android:name="background" android:value="true"/>
                    <intent-filter android:priority="1">
                        <action android:name="***************.DID_RANGING"/>
                        <action android:name="***************.DID_MONITORING"/>
                    </intent-filter>
                </service>
            </application>
        </manifest>
    </android>
Tried different options for tiap like service tag for bg-service1-android.js not in <services> but still no luck

any ideas ?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>