Touch Active Member Licensed User Longtime User Aug 29, 2014 #1 Hi! I have created a service named start: Code: Copy 'Activity Main Sub Activity_Create(FirstTime As Boolean) StartService(start) Activity.Finish End Sub Code: Copy 'Module Service Sub Service_Start (StartingIntent As Intent) StartServiceAt("", DateTime.Now + 0.1 * DateTime.TicksPerMinute, False) End Sub ... If I install the service everything works. Then I had the need to hide the icon from the app list, I made the change with the following code in the manifest Code: Copy 'Manifest AddReplacement(android.intent.action.MAIN, unused_action) with this change, the service is not listed in the background processes and therefore does not work. I also tried to enter this code in the manifest Code: Copy 'Manifest AddReplacement(android.intent.action.MAIN, unused_action) <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> But return this error Code: Copy Parsing code. 0.00 Compiling code. Error Error parsing manifest script: Line = 15, Word = < Command expected. At line 15 there is Code: Copy <intent-filter> ... What do you suggest?
Hi! I have created a service named start: Code: Copy 'Activity Main Sub Activity_Create(FirstTime As Boolean) StartService(start) Activity.Finish End Sub Code: Copy 'Module Service Sub Service_Start (StartingIntent As Intent) StartServiceAt("", DateTime.Now + 0.1 * DateTime.TicksPerMinute, False) End Sub ... If I install the service everything works. Then I had the need to hide the icon from the app list, I made the change with the following code in the manifest Code: Copy 'Manifest AddReplacement(android.intent.action.MAIN, unused_action) with this change, the service is not listed in the background processes and therefore does not work. I also tried to enter this code in the manifest Code: Copy 'Manifest AddReplacement(android.intent.action.MAIN, unused_action) <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> But return this error Code: Copy Parsing code. 0.00 Compiling code. Error Error parsing manifest script: Line = 15, Word = < Command expected. At line 15 there is Code: Copy <intent-filter> ... What do you suggest?
sirjo66 Well-Known Member Licensed User Longtime User Aug 30, 2014 #3 Non hai inserito il comando, e quindi il programma ti dice che il carattere "<" non è valido. Devi fare: Code: Copy AddReplacement(android.intent.action.MAIN, unused_action) AddManifestText( <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> ) Sergio Last edited: Aug 30, 2014
Non hai inserito il comando, e quindi il programma ti dice che il carattere "<" non è valido. Devi fare: Code: Copy AddReplacement(android.intent.action.MAIN, unused_action) AddManifestText( <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> ) Sergio
sirjo66 Well-Known Member Licensed User Longtime User Aug 30, 2014 #5 Rileggi il mio post precedente, l'ho modificato
Touch Active Member Licensed User Longtime User Aug 30, 2014 #6 sirjo66 said: Non hai inserito il comando, e quindi il programma ti dice che il carattere "<" non è valido. Devi fare: Code: Copy AddReplacement(android.intent.action.MAIN, unused_action) AddManifestText( <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> ) Sergio Click to expand... Appena posso provo e ti do conferma! Grazie
sirjo66 said: Non hai inserito il comando, e quindi il programma ti dice che il carattere "<" non è valido. Devi fare: Code: Copy AddReplacement(android.intent.action.MAIN, unused_action) AddManifestText( <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> ) Sergio Click to expand... Appena posso provo e ti do conferma! Grazie
Touch Active Member Licensed User Longtime User Aug 30, 2014 #7 sirjo66 said: Rileggi il mio post precedente, l'ho modificato Click to expand... Il codice che hai postato non produce errori in compilazione ma il servizio non funziona. E' come se il servizio non parta neanche. Non viene elencato nei servizi in background. Se tolgo il codice aggiunto nel manifest, funziona tutto alla perfezione. Non capisco dove sia il problema!
sirjo66 said: Rileggi il mio post precedente, l'ho modificato Click to expand... Il codice che hai postato non produce errori in compilazione ma il servizio non funziona. E' come se il servizio non parta neanche. Non viene elencato nei servizi in background. Se tolgo il codice aggiunto nel manifest, funziona tutto alla perfezione. Non capisco dove sia il problema!
sirjo66 Well-Known Member Licensed User Longtime User Aug 31, 2014 #8 Ho trovato questo esempio, forse ti può essere utile, invece che usare AddManifestText usano AddReceiverText Sergio Code: Copy AddReceiverText(PushService, <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="anywheresoftware.b4a.samples.push" /> </intent-filter>)
Ho trovato questo esempio, forse ti può essere utile, invece che usare AddManifestText usano AddReceiverText Sergio Code: Copy AddReceiverText(PushService, <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="anywheresoftware.b4a.samples.push" /> </intent-filter>)
Touch Active Member Licensed User Longtime User Aug 31, 2014 #9 sirjo66 said: Ho trovato questo esempio, forse ti può essere utile, invece che usare AddManifestText usano AddReceiverText Sergio Code: Copy AddReceiverText(PushService, <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="anywheresoftware.b4a.samples.push" /> </intent-filter>) Click to expand... In fase di compilazione mi torna questo errore: Code: Copy Parsing code. 0.02 Compiling code. Error Module: pushservice_br not found.
sirjo66 said: Ho trovato questo esempio, forse ti può essere utile, invece che usare AddManifestText usano AddReceiverText Sergio Code: Copy AddReceiverText(PushService, <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="anywheresoftware.b4a.samples.push" /> </intent-filter>) Click to expand... In fase di compilazione mi torna questo errore: Code: Copy Parsing code. 0.02 Compiling code. Error Module: pushservice_br not found.
sirjo66 Well-Known Member Licensed User Longtime User Aug 31, 2014 #10 Al posto di PushService penso dovrai mettere il nome del tuo servizio (anzi del Receiver)
Touch Active Member Licensed User Longtime User Aug 31, 2014 #11 sirjo66 said: Al posto di PushService penso dovrai mettere il nome del tuo servizio (anzi del Receiver) Click to expand... Come in altri casi, Il servizio si avvia e funziona, ma è visibile l'icona nella lista delle app!
sirjo66 said: Al posto di PushService penso dovrai mettere il nome del tuo servizio (anzi del Receiver) Click to expand... Come in altri casi, Il servizio si avvia e funziona, ma è visibile l'icona nella lista delle app!
LucaMs Expert Licensed User Longtime User Aug 31, 2014 #12 Prova a seguire i post #2 #3 #4 di questo thread (io non ho provato, eh!)